From 11c195e9a979b56d9b12e18c2116fb8fe1f3c8fa Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 20:33:43 +0300 Subject: [PATCH 01/21] Add `shopify store info ` command Adds a new read-only command that surfaces shop metadata from BP Destinations and BP Organizations APIs, with optional Admin API enrichment via `--verbose`. Supports `--json` output and per-field graceful degradation via a `_field_errors` envelope. Tier 1 + Tier 2 fields work without `store auth` for the shop; Tier 3 fields (shop_owner, timezone, features, setup_required) require `store auth` and are opt-in via `--verbose`. Fixes #22724 Co-Authored-By: Claude Opus 4.7 (1M context) --- .changeset/store-info-command.md | 5 + .../interfaces/store-info.interface.ts | 24 ++ .../generated/generated_docs_data_v2.json | 38 ++++ packages/cli/README.md | 36 +++ packages/cli/oclif.manifest.json | 55 +++++ .../store/src/cli/commands/store/info.test.ts | 51 +++++ packages/store/src/cli/commands/store/info.ts | 48 ++++ .../services/store/info/admin-shop.test.ts | 102 +++++++++ .../src/cli/services/store/info/admin-shop.ts | 104 +++++++++ .../services/store/info/auth-status.test.ts | 54 +++++ .../cli/services/store/info/auth-status.ts | 14 ++ .../services/store/info/destinations.test.ts | 124 +++++++++++ .../cli/services/store/info/destinations.ts | 125 +++++++++++ .../src/cli/services/store/info/index.test.ts | 207 ++++++++++++++++++ .../src/cli/services/store/info/index.ts | 184 ++++++++++++++++ .../store/info/organization-shop.test.ts | 84 +++++++ .../services/store/info/organization-shop.ts | 84 +++++++ .../cli/services/store/info/result.test.ts | 126 +++++++++++ .../src/cli/services/store/info/result.ts | 111 ++++++++++ .../src/cli/services/store/info/types.ts | 110 ++++++++++ packages/store/src/index.ts | 2 + 21 files changed, 1688 insertions(+) create mode 100644 .changeset/store-info-command.md create mode 100644 docs-shopify.dev/commands/interfaces/store-info.interface.ts create mode 100644 packages/store/src/cli/commands/store/info.test.ts create mode 100644 packages/store/src/cli/commands/store/info.ts create mode 100644 packages/store/src/cli/services/store/info/admin-shop.test.ts create mode 100644 packages/store/src/cli/services/store/info/admin-shop.ts create mode 100644 packages/store/src/cli/services/store/info/auth-status.test.ts create mode 100644 packages/store/src/cli/services/store/info/auth-status.ts create mode 100644 packages/store/src/cli/services/store/info/destinations.test.ts create mode 100644 packages/store/src/cli/services/store/info/destinations.ts create mode 100644 packages/store/src/cli/services/store/info/index.test.ts create mode 100644 packages/store/src/cli/services/store/info/index.ts create mode 100644 packages/store/src/cli/services/store/info/organization-shop.test.ts create mode 100644 packages/store/src/cli/services/store/info/organization-shop.ts create mode 100644 packages/store/src/cli/services/store/info/result.test.ts create mode 100644 packages/store/src/cli/services/store/info/result.ts create mode 100644 packages/store/src/cli/services/store/info/types.ts diff --git a/.changeset/store-info-command.md b/.changeset/store-info-command.md new file mode 100644 index 00000000000..3379a9e767f --- /dev/null +++ b/.changeset/store-info-command.md @@ -0,0 +1,5 @@ +--- +'@shopify/cli': minor +--- + +Add `shopify store info ` command for surfacing shop metadata from the Business Platform Destinations and Organizations APIs. Tier 1 and Tier 2 fields are returned without `store auth`; Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are included only with `--verbose`. Individual backend failures degrade gracefully via `_field_errors` rather than aborting the command. diff --git a/docs-shopify.dev/commands/interfaces/store-info.interface.ts b/docs-shopify.dev/commands/interfaces/store-info.interface.ts new file mode 100644 index 00000000000..02a8cec1efb --- /dev/null +++ b/docs-shopify.dev/commands/interfaces/store-info.interface.ts @@ -0,0 +1,24 @@ +// This is an autogenerated file. Don't edit this file manually. +/** + * The following flags are available for the `store info` command: + * @publicDocs + */ +export interface storeinfo { + /** + * Output the result as JSON. Automatically disables color output. + * @environment SHOPIFY_FLAG_JSON + */ + '-j, --json'?: '' + + /** + * Disable color output. + * @environment SHOPIFY_FLAG_NO_COLOR + */ + '--no-color'?: '' + + /** + * Increase the verbosity of the output. + * @environment SHOPIFY_FLAG_VERBOSE + */ + '--verbose'?: '' +} diff --git a/docs-shopify.dev/generated/generated_docs_data_v2.json b/docs-shopify.dev/generated/generated_docs_data_v2.json index 4965084de82..d69a6b8835a 100644 --- a/docs-shopify.dev/generated/generated_docs_data_v2.json +++ b/docs-shopify.dev/generated/generated_docs_data_v2.json @@ -4293,6 +4293,44 @@ "value": "export interface storeexecute {\n /**\n * Allow GraphQL mutations to run against the target store.\n * @environment SHOPIFY_FLAG_ALLOW_MUTATIONS\n */\n '--allow-mutations'?: ''\n\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The file name where results should be written, instead of STDOUT.\n * @environment SHOPIFY_FLAG_OUTPUT_FILE\n */\n '--output-file '?: string\n\n /**\n * The GraphQL query or mutation, as a string.\n * @environment SHOPIFY_FLAG_QUERY\n */\n '-q, --query '?: string\n\n /**\n * Path to a file containing the GraphQL query or mutation. Can't be used with --query.\n * @environment SHOPIFY_FLAG_QUERY_FILE\n */\n '--query-file '?: string\n\n /**\n * The myshopify.com domain of the store to execute against.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.\n * @environment SHOPIFY_FLAG_VARIABLE_FILE\n */\n '--variable-file '?: string\n\n /**\n * The values for any GraphQL variables in your query or mutation, in JSON format.\n * @environment SHOPIFY_FLAG_VARIABLES\n */\n '-v, --variables '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n\n /**\n * The API version to use for the query or mutation. Defaults to the latest stable version.\n * @environment SHOPIFY_FLAG_VERSION\n */\n '--version '?: string\n}" } }, + "storeinfo": { + "docs-shopify.dev/commands/interfaces/store-info.interface.ts": { + "filePath": "docs-shopify.dev/commands/interfaces/store-info.interface.ts", + "name": "storeinfo", + "description": "The following flags are available for the `store info` command:", + "isPublicDocs": true, + "members": [ + { + "filePath": "docs-shopify.dev/commands/interfaces/store-info.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--no-color", + "value": "''", + "description": "Disable color output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_NO_COLOR" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/store-info.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--verbose", + "value": "''", + "description": "Increase the verbosity of the output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_VERBOSE" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/store-info.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-j, --json", + "value": "''", + "description": "Output the result as JSON. Automatically disables color output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_JSON" + } + ], + "value": "export interface storeinfo {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + } + }, "themecheck": { "docs-shopify.dev/commands/interfaces/theme-check.interface.ts": { "filePath": "docs-shopify.dev/commands/interfaces/theme-check.interface.ts", diff --git a/packages/cli/README.md b/packages/cli/README.md index d96a305ea8a..ef83fe0187b 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -78,6 +78,7 @@ * [`shopify search [query]`](#shopify-search-query) * [`shopify store auth`](#shopify-store-auth) * [`shopify store execute`](#shopify-store-execute) +* [`shopify store info STORE`](#shopify-store-info-store) * [`shopify theme check`](#shopify-theme-check) * [`shopify theme console`](#shopify-theme-console) * [`shopify theme delete`](#shopify-theme-delete) @@ -2178,6 +2179,41 @@ EXAMPLES $ shopify store execute --store shop.myshopify.com --query "query { shop { name } }" --json ``` +## `shopify store info STORE` + +Surface metadata about a Shopify store. + +``` +USAGE + $ shopify store info STORE [-j] [--no-color] [--verbose] + +ARGUMENTS + STORE The myshopify.com domain of the store to inspect. + +FLAGS + -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color output. + --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. + --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. + +DESCRIPTION + Surface metadata about a Shopify store. + + Reads metadata for a store from the Business Platform Destinations and Organizations APIs. + + Tier 1 and Tier 2 fields work without `store auth`. Tier 3 fields (shop owner, timezone, features, setup required) + require `store auth` and are only included when `--verbose` is set. + + Backend failures degrade gracefully: a single failing call populates `_field_errors` rather than aborting the whole + command. The command does fail when the destination cannot be resolved. + +EXAMPLES + $ shopify store info shop.myshopify.com + + $ shopify store info shop.myshopify.com --json + + $ shopify store info shop.myshopify.com --verbose +``` + ## `shopify theme check` Validate the theme. diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index b73dd5a6473..c0880697e91 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -5862,6 +5862,61 @@ "strict": true, "summary": "Execute GraphQL queries and mutations on a store." }, + "store:info": { + "aliases": [ + ], + "args": { + "store": { + "description": "The myshopify.com domain of the store to inspect.", + "name": "store", + "required": true + } + }, + "customPluginName": "@shopify/store", + "description": "Reads metadata for a store from the Business Platform Destinations and Organizations APIs.\n\nTier 1 and Tier 2 fields work without `store auth`. Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are only included when `--verbose` is set.\n\nBackend failures degrade gracefully: a single failing call populates `_field_errors` rather than aborting the whole command. The command does fail when the destination cannot be resolved.", + "descriptionWithMarkdown": "Reads metadata for a store from the Business Platform Destinations and Organizations APIs.\n\nTier 1 and Tier 2 fields work without `store auth`. Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are only included when `--verbose` is set.\n\nBackend failures degrade gracefully: a single failing call populates `_field_errors` rather than aborting the whole command. The command does fail when the destination cannot be resolved.", + "examples": [ + "<%= config.bin %> <%= command.id %> shop.myshopify.com", + "<%= config.bin %> <%= command.id %> shop.myshopify.com --json", + "<%= config.bin %> <%= command.id %> shop.myshopify.com --verbose" + ], + "flags": { + "json": { + "allowNo": false, + "char": "j", + "description": "Output the result as JSON. Automatically disables color output.", + "env": "SHOPIFY_FLAG_JSON", + "hidden": false, + "name": "json", + "type": "boolean" + }, + "no-color": { + "allowNo": false, + "description": "Disable color output.", + "env": "SHOPIFY_FLAG_NO_COLOR", + "hidden": false, + "name": "no-color", + "type": "boolean" + }, + "verbose": { + "allowNo": false, + "description": "Increase the verbosity of the output.", + "env": "SHOPIFY_FLAG_VERBOSE", + "hidden": false, + "name": "verbose", + "type": "boolean" + } + }, + "hasDynamicHelp": false, + "hiddenAliases": [ + ], + "id": "store:info", + "pluginAlias": "@shopify/cli", + "pluginName": "@shopify/cli", + "pluginType": "core", + "strict": true, + "summary": "Surface metadata about a Shopify store." + }, "theme:check": { "aliases": [ ], diff --git a/packages/store/src/cli/commands/store/info.test.ts b/packages/store/src/cli/commands/store/info.test.ts new file mode 100644 index 00000000000..e1632d59380 --- /dev/null +++ b/packages/store/src/cli/commands/store/info.test.ts @@ -0,0 +1,51 @@ +import StoreInfo from './info.js' +import {getStoreInfo} from '../../services/store/info/index.js' +import {renderStoreInfoResult} from '../../services/store/info/result.js' +import {beforeEach, describe, expect, test, vi} from 'vitest' + +vi.mock('../../services/store/info/index.js') +vi.mock('../../services/store/info/result.js') +vi.mock('../../services/store/attribution.js') + +describe('store info command', () => { + beforeEach(() => { + vi.mocked(getStoreInfo).mockResolvedValue({ + shop_domain: 'shop.myshopify.com', + auth_status: {authed: false, source: 'store-auth'}, + }) + }) + + test('passes store and verbose=false through to the service', async () => { + await StoreInfo.run(['shop.myshopify.com']) + + expect(getStoreInfo).toHaveBeenCalledWith({ + store: 'shop.myshopify.com', + verbose: false, + }) + expect(renderStoreInfoResult).toHaveBeenCalledWith( + expect.objectContaining({shop_domain: 'shop.myshopify.com'}), + 'text', + ) + }) + + test('passes verbose=true when --verbose flag is set', async () => { + await StoreInfo.run(['shop.myshopify.com', '--verbose']) + + expect(getStoreInfo).toHaveBeenCalledWith({ + store: 'shop.myshopify.com', + verbose: true, + }) + }) + + test('renders json format when --json flag is set', async () => { + await StoreInfo.run(['shop.myshopify.com', '--json']) + + expect(renderStoreInfoResult).toHaveBeenCalledWith(expect.anything(), 'json') + }) + + test('defines the expected flags and positional arg', () => { + expect(StoreInfo.args.store).toBeDefined() + expect(StoreInfo.flags.json).toBeDefined() + expect(StoreInfo.flags.verbose).toBeDefined() + }) +}) diff --git a/packages/store/src/cli/commands/store/info.ts b/packages/store/src/cli/commands/store/info.ts new file mode 100644 index 00000000000..fc2cbcf1e33 --- /dev/null +++ b/packages/store/src/cli/commands/store/info.ts @@ -0,0 +1,48 @@ +import {getStoreInfo} from '../../services/store/info/index.js' +import {renderStoreInfoResult} from '../../services/store/info/result.js' +import StoreCommand from '../../utilities/store-command.js' +import {globalFlags, jsonFlag} from '@shopify/cli-kit/node/cli' +import {normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn' +import {Args} from '@oclif/core' + +export default class StoreInfo extends StoreCommand { + static summary = 'Surface metadata about a Shopify store.' + + static descriptionWithMarkdown = `Reads metadata for a store from the Business Platform Destinations and Organizations APIs. + +Tier 1 and Tier 2 fields work without \`store auth\`. Tier 3 fields (shop owner, timezone, features, setup required) require \`store auth\` and are only included when \`--verbose\` is set. + +Backend failures degrade gracefully: a single failing call populates \`_field_errors\` rather than aborting the whole command. The command does fail when the destination cannot be resolved.` + + static description = this.descriptionWithoutMarkdown() + + static examples = [ + '<%= config.bin %> <%= command.id %> shop.myshopify.com', + '<%= config.bin %> <%= command.id %> shop.myshopify.com --json', + '<%= config.bin %> <%= command.id %> shop.myshopify.com --verbose', + ] + + static args = { + store: Args.string({ + description: 'The myshopify.com domain of the store to inspect.', + required: true, + parse: async (input) => normalizeStoreFqdn(input), + }), + } + + static flags = { + ...globalFlags, + ...jsonFlag, + } + + public async run(): Promise { + const {args, flags} = await this.parse(StoreInfo) + + const result = await getStoreInfo({ + store: args.store, + verbose: Boolean(flags.verbose), + }) + + renderStoreInfoResult(result, flags.json ? 'json' : 'text') + } +} diff --git a/packages/store/src/cli/services/store/info/admin-shop.test.ts b/packages/store/src/cli/services/store/info/admin-shop.test.ts new file mode 100644 index 00000000000..6985371e564 --- /dev/null +++ b/packages/store/src/cli/services/store/info/admin-shop.test.ts @@ -0,0 +1,102 @@ +import {fetchAdminShop} from './admin-shop.js' +import {prepareAdminStoreGraphQLContext} from '../execute/admin-context.js' +import {graphqlRequest} from '@shopify/cli-kit/node/api/graphql' +import {AbortError} from '@shopify/cli-kit/node/error' +import {describe, test, expect, vi, beforeEach} from 'vitest' + +vi.mock('../execute/admin-context.js') +vi.mock('@shopify/cli-kit/node/api/graphql') +vi.mock('@shopify/cli-kit/node/api/admin', () => ({ + adminUrl: (fqdn: string, version: string) => `https://${fqdn}/admin/api/${version}/graphql.json`, +})) + +const SHOP = 'shop.myshopify.com' + +function adminContext() { + return { + adminSession: {storeFqdn: SHOP, token: 'admin-tok'}, + version: '2026-01', + session: {} as never, + } +} + +describe('fetchAdminShop', () => { + beforeEach(() => { + vi.resetAllMocks() + }) + + test('returns skipped with a hint when no stored auth exists', async () => { + vi.mocked(prepareAdminStoreGraphQLContext).mockRejectedValueOnce( + new AbortError('Run `shopify store auth` to authenticate before executing operations against this store.'), + ) + + const result = await fetchAdminShop(SHOP) + + expect(result.skipped).toBe(true) + if (result.skipped) { + expect(result.reason).toContain('store auth') + expect(result.reason).toContain(SHOP) + } + }) + + test('returns mapped shop fields on success', async () => { + vi.mocked(prepareAdminStoreGraphQLContext).mockResolvedValueOnce(adminContext() as never) + vi.mocked(graphqlRequest).mockResolvedValueOnce({ + shop: { + shopOwnerName: 'Alice', + ianaTimezone: 'America/New_York', + setupRequired: false, + features: { + storefront: true, + shopifyPlus: false, + harmonizedSystemCode: true, + branding: null, + }, + }, + } as never) + + const result = await fetchAdminShop(SHOP) + expect(result.skipped).toBe(false) + if (!result.skipped) { + expect(result.shop).toEqual({ + shopOwnerName: 'Alice', + ianaTimezone: 'America/New_York', + setupRequired: false, + features: { + storefront: true, + shopifyPlus: false, + harmonizedSystemCode: true, + }, + }) + } + }) + + test('omits features object entirely when no feature flags are present', async () => { + vi.mocked(prepareAdminStoreGraphQLContext).mockResolvedValueOnce(adminContext() as never) + vi.mocked(graphqlRequest).mockResolvedValueOnce({ + shop: { + shopOwnerName: 'Bob', + ianaTimezone: null, + setupRequired: null, + features: null, + }, + } as never) + + const result = await fetchAdminShop(SHOP) + expect(result.skipped).toBe(false) + if (!result.skipped) { + expect(result.shop).toEqual({shopOwnerName: 'Bob'}) + } + }) + + test('returns skipped with the error message when the Admin request fails', async () => { + vi.mocked(prepareAdminStoreGraphQLContext).mockResolvedValueOnce(adminContext() as never) + vi.mocked(graphqlRequest).mockRejectedValueOnce(new Error('network down')) + + const result = await fetchAdminShop(SHOP) + expect(result.skipped).toBe(true) + if (result.skipped) { + expect(result.reason).toContain('network down') + } + }) +}) diff --git a/packages/store/src/cli/services/store/info/admin-shop.ts b/packages/store/src/cli/services/store/info/admin-shop.ts new file mode 100644 index 00000000000..3c2b12c6e4a --- /dev/null +++ b/packages/store/src/cli/services/store/info/admin-shop.ts @@ -0,0 +1,104 @@ +import {prepareAdminStoreGraphQLContext} from '../execute/admin-context.js' +import {adminUrl} from '@shopify/cli-kit/node/api/admin' +import {graphqlRequest} from '@shopify/cli-kit/node/api/graphql' +import {AbortError} from '@shopify/cli-kit/node/error' +import type {AdminShopFetchOutcome, AdminShopFields, StoreInfoFeatures} from './types.js' + +const ADMIN_SHOP_QUERY = ` + query StoreInfoAdminShop { + shop { + shopOwnerName + ianaTimezone + setupRequired + features { + storefront + shopifyPlus + harmonizedSystemCode + branding + } + } + } +` + +interface AdminShopResponse { + shop: { + shopOwnerName?: string | null + ianaTimezone?: string | null + setupRequired?: boolean | null + features?: { + storefront?: boolean | null + shopifyPlus?: boolean | null + harmonizedSystemCode?: boolean | null + branding?: boolean | null + } | null + } +} + +export async function fetchAdminShop(store: string): Promise { + let context + try { + context = await prepareAdminStoreGraphQLContext({store}) + } catch (error) { + return { + skipped: true, + reason: skipReasonForContextError(error, store), + } + } + + try { + const response = await graphqlRequest({ + query: ADMIN_SHOP_QUERY, + api: 'Admin', + url: adminUrl(context.adminSession.storeFqdn, context.version, context.adminSession), + token: context.adminSession.token, + responseOptions: {handleErrors: false}, + }) + + return { + skipped: false, + shop: mapAdminShop(response.shop), + } + // eslint-disable-next-line no-catch-all/no-catch-all + } catch (error) { + return { + skipped: true, + reason: `Admin API request failed: ${errorMessage(error)}`, + } + } +} + +function mapAdminShop(shop: AdminShopResponse['shop']): AdminShopFields { + const features: StoreInfoFeatures = {} + if (shop.features) { + if (shop.features.storefront != null) features.storefront = shop.features.storefront + if (shop.features.shopifyPlus != null) features.shopifyPlus = shop.features.shopifyPlus + if (shop.features.harmonizedSystemCode != null) features.harmonizedSystemCode = shop.features.harmonizedSystemCode + if (shop.features.branding != null) features.branding = shop.features.branding + } + + const result: AdminShopFields = {} + if (shop.shopOwnerName) result.shopOwnerName = shop.shopOwnerName + if (shop.ianaTimezone) result.ianaTimezone = shop.ianaTimezone + if (shop.setupRequired != null) result.setupRequired = shop.setupRequired + if (Object.keys(features).length > 0) result.features = features + return result +} + +function skipReasonForContextError(error: unknown, store: string): string { + if (error instanceof AbortError) { + // Most common: no stored session for this shop. Distinguish from other AbortErrors + // (e.g. refresh failure) by surfacing the underlying message verbatim, with a hint + // to run `store auth` when the message indicates a missing/expired session. + const message = error.message + if (/store auth|not authenticated|no stored|reauthenticate/i.test(message)) { + return `No \`store auth\` for ${store} — run \`shopify store auth --store ${store}\` to enable Tier 3 fields.` + } + return message + } + return `Could not prepare Admin context for ${store}: ${errorMessage(error)}` +} + +function errorMessage(error: unknown): string { + if (error instanceof Error) return error.message + return String(error) +} diff --git a/packages/store/src/cli/services/store/info/auth-status.test.ts b/packages/store/src/cli/services/store/info/auth-status.test.ts new file mode 100644 index 00000000000..81d3cd583d1 --- /dev/null +++ b/packages/store/src/cli/services/store/info/auth-status.test.ts @@ -0,0 +1,54 @@ +import {readAuthStatus} from './auth-status.js' +import {getCurrentStoredStoreAppSession} from '../auth/session-store.js' +import {describe, test, expect, vi, beforeEach} from 'vitest' + +vi.mock('../auth/session-store.js') + +describe('readAuthStatus', () => { + beforeEach(() => { + vi.resetAllMocks() + }) + + test('returns authed=false when no session is stored', () => { + vi.mocked(getCurrentStoredStoreAppSession).mockReturnValue(undefined) + + expect(readAuthStatus('shop.myshopify.com')).toEqual({ + authed: false, + source: 'store-auth', + }) + }) + + test('returns authed=true with expires_at when session has an expiry', () => { + vi.mocked(getCurrentStoredStoreAppSession).mockReturnValue({ + store: 'shop.myshopify.com', + clientId: 'client-id', + userId: '42', + accessToken: 'tok', + scopes: ['read_products'], + acquiredAt: '2026-05-01T00:00:00.000Z', + expiresAt: '2026-06-01T00:00:00.000Z', + }) + + expect(readAuthStatus('shop.myshopify.com')).toEqual({ + authed: true, + source: 'store-auth', + expires_at: '2026-06-01T00:00:00.000Z', + }) + }) + + test('omits expires_at when the session has no expiry', () => { + vi.mocked(getCurrentStoredStoreAppSession).mockReturnValue({ + store: 'shop.myshopify.com', + clientId: 'client-id', + userId: '42', + accessToken: 'tok', + scopes: ['read_products'], + acquiredAt: '2026-05-01T00:00:00.000Z', + }) + + expect(readAuthStatus('shop.myshopify.com')).toEqual({ + authed: true, + source: 'store-auth', + }) + }) +}) diff --git a/packages/store/src/cli/services/store/info/auth-status.ts b/packages/store/src/cli/services/store/info/auth-status.ts new file mode 100644 index 00000000000..3920dca4ed1 --- /dev/null +++ b/packages/store/src/cli/services/store/info/auth-status.ts @@ -0,0 +1,14 @@ +import {getCurrentStoredStoreAppSession} from '../auth/session-store.js' +import type {StoreInfoAuthStatus} from './types.js' + +export function readAuthStatus(store: string): StoreInfoAuthStatus { + const session = getCurrentStoredStoreAppSession(store) + if (!session) { + return {authed: false, source: 'store-auth'} + } + return { + authed: true, + source: 'store-auth', + ...(session.expiresAt ? {expires_at: session.expiresAt} : {}), + } +} diff --git a/packages/store/src/cli/services/store/info/destinations.test.ts b/packages/store/src/cli/services/store/info/destinations.test.ts new file mode 100644 index 00000000000..4c96f7975f7 --- /dev/null +++ b/packages/store/src/cli/services/store/info/destinations.test.ts @@ -0,0 +1,124 @@ +import {fetchDestinationsContext} from './destinations.js' +import type {DestinationsQueryResponse, OrganizationForDestinationResponse} from './destinations.js' +import {businessPlatformRequest} from '@shopify/cli-kit/node/api/business-platform' +import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' +import {AbortError} from '@shopify/cli-kit/node/error' +import {describe, test, expect, vi, beforeEach} from 'vitest' + +vi.mock('@shopify/cli-kit/node/api/business-platform') +vi.mock('@shopify/cli-kit/node/session') + +const SHOP = 'shop.myshopify.com' + +function destinationNode(overrides: Record = {}) { + return { + id: 'gid://destination/Destination/1', + publicId: 'dest-public-1', + name: 'Shop', + handle: 'shop', + shortName: 'shop', + primaryDomain: SHOP, + webUrl: `https://${SHOP}`, + status: 'ACTIVE', + accountStatus: 'ACTIVE', + isAppDevelopment: false, + lastAccess: '2026-05-20T00:00:00.000Z', + ...overrides, + } +} + +describe('fetchDestinationsContext', () => { + beforeEach(() => { + vi.resetAllMocks() + vi.mocked(ensureAuthenticatedBusinessPlatform).mockResolvedValue('bp-token') + }) + + test('throws AbortError when no destination matches the domain', async () => { + vi.mocked(businessPlatformRequest).mockResolvedValueOnce({ + currentUserAccount: {destinations: {nodes: []}}, + } as DestinationsQueryResponse) + + const err = await fetchDestinationsContext({store: SHOP}).catch((e: unknown) => e) + expect(err).toBeInstanceOf(AbortError) + expect((err as AbortError).message).toContain(SHOP) + }) + + test('throws AbortError when domain match is missing from results', async () => { + vi.mocked(businessPlatformRequest).mockResolvedValueOnce({ + currentUserAccount: { + destinations: {nodes: [destinationNode({primaryDomain: 'other.myshopify.com'})]}, + }, + } as DestinationsQueryResponse) + + const err = await fetchDestinationsContext({store: SHOP}).catch((e: unknown) => e) + expect(err).toBeInstanceOf(AbortError) + expect((err as AbortError).message).toContain(SHOP) + }) + + test('returns destination + owning org on success', async () => { + vi.mocked(businessPlatformRequest) + .mockResolvedValueOnce({ + currentUserAccount: {destinations: {nodes: [destinationNode()]}}, + } as DestinationsQueryResponse) + .mockResolvedValueOnce({ + currentUserAccount: { + organizationForDestination: { + id: Buffer.from('gid://organization/Organization/123').toString('base64'), + name: 'Acme Org', + }, + }, + } as OrganizationForDestinationResponse) + + const ctx = await fetchDestinationsContext({store: SHOP}) + + expect(ctx.destination.primaryDomain).toBe(SHOP) + expect(ctx.owningOrg).toEqual({name: 'Acme Org', id: '123'}) + expect(ctx.owningOrgError).toBeUndefined() + }) + + test('records owning_org field error when the org request throws', async () => { + vi.mocked(businessPlatformRequest) + .mockResolvedValueOnce({ + currentUserAccount: {destinations: {nodes: [destinationNode()]}}, + } as DestinationsQueryResponse) + .mockRejectedValueOnce(new Error('boom')) + + const ctx = await fetchDestinationsContext({store: SHOP}) + + expect(ctx.destination.primaryDomain).toBe(SHOP) + expect(ctx.owningOrg).toBeUndefined() + expect(ctx.owningOrgError).toEqual({ + source: 'bp_destinations', + reason: 'Request failed: boom', + }) + }) + + test('records owning_org field error when the org is missing from response', async () => { + vi.mocked(businessPlatformRequest) + .mockResolvedValueOnce({ + currentUserAccount: {destinations: {nodes: [destinationNode()]}}, + } as DestinationsQueryResponse) + .mockResolvedValueOnce({ + currentUserAccount: {organizationForDestination: null}, + } as OrganizationForDestinationResponse) + + const ctx = await fetchDestinationsContext({store: SHOP}) + + expect(ctx.owningOrg).toBeUndefined() + expect(ctx.owningOrgError?.source).toBe('bp_destinations') + }) + + test('uses a provided token without re-authenticating', async () => { + vi.mocked(businessPlatformRequest).mockResolvedValueOnce({ + currentUserAccount: {destinations: {nodes: [destinationNode()]}}, + } as DestinationsQueryResponse) + vi.mocked(businessPlatformRequest).mockResolvedValueOnce({ + currentUserAccount: {organizationForDestination: {id: 'gid', name: 'O'}}, + } as OrganizationForDestinationResponse) + + await fetchDestinationsContext({store: SHOP, token: 'preset'}) + + expect(ensureAuthenticatedBusinessPlatform).not.toHaveBeenCalled() + expect(vi.mocked(businessPlatformRequest).mock.calls[0]?.[1]).toBe('preset') + }) +}) diff --git a/packages/store/src/cli/services/store/info/destinations.ts b/packages/store/src/cli/services/store/info/destinations.ts new file mode 100644 index 00000000000..4427b0506e6 --- /dev/null +++ b/packages/store/src/cli/services/store/info/destinations.ts @@ -0,0 +1,125 @@ +import {AbortError} from '@shopify/cli-kit/node/error' +import {businessPlatformRequest} from '@shopify/cli-kit/node/api/business-platform' +import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' +import type {DestinationNode, DestinationsContext, StoreInfoFieldError, StoreInfoOwningOrg} from './types.js' + +const DESTINATIONS_QUERY = ` + query StoreInfoDestinations($search: String!) { + currentUserAccount { + destinations(search: $search, shopsOnly: true, first: 25) { + nodes { + id + publicId + name + handle + shortName + primaryDomain + webUrl + status + accountStatus + isAppDevelopment + lastAccess + } + } + } + } +` + +const ORGANIZATION_FOR_DESTINATION_QUERY = ` + query StoreInfoOwningOrg($destinationPublicId: DestinationPublicID!) { + currentUserAccount { + organizationForDestination(destinationPublicId: $destinationPublicId) { + id + name + } + } + } +` + +export interface DestinationsQueryResponse { + currentUserAccount?: { + destinations: { + nodes: DestinationNode[] + } + } | null +} + +export interface OrganizationForDestinationResponse { + currentUserAccount?: { + organizationForDestination?: { + id: string + name: string + } | null + } | null +} + +export interface FetchDestinationsContextOptions { + store: string + token?: string +} + +export async function fetchDestinationsContext(options: FetchDestinationsContextOptions): Promise { + const token = options.token ?? (await ensureAuthenticatedBusinessPlatform()) + + const response = await businessPlatformRequest(DESTINATIONS_QUERY, token, { + search: options.store, + }) + + const nodes = response.currentUserAccount?.destinations.nodes ?? [] + const matched = nodes.find((node) => node.primaryDomain?.toLowerCase() === options.store.toLowerCase()) + + if (!matched) { + throw new AbortError( + `Couldn't find a store with domain ${options.store} for the current account.`, + 'Verify the domain (must be the canonical `myshopify.com` FQDN) and that your business-platform session has access to it. Inactive shops are not searchable in v1 of this command.', + ) + } + + let owningOrg: StoreInfoOwningOrg | undefined + let owningOrgError: StoreInfoFieldError | undefined + + try { + const orgResponse = await businessPlatformRequest( + ORGANIZATION_FOR_DESTINATION_QUERY, + token, + {destinationPublicId: matched.publicId}, + ) + const org = orgResponse.currentUserAccount?.organizationForDestination + if (org) { + owningOrg = { + name: org.name, + ...(org.id ? {id: decodeOrganizationGid(org.id)} : {}), + } + } else { + owningOrgError = { + source: 'bp_destinations', + reason: 'organizationForDestination returned no organization for this destination.', + } + } + // eslint-disable-next-line no-catch-all/no-catch-all + } catch (error) { + owningOrgError = { + source: 'bp_destinations', + reason: `Request failed: ${errorMessage(error)}`, + } + } + + return { + destination: matched, + ...(owningOrg ? {owningOrg} : {}), + ...(owningOrgError ? {owningOrgError} : {}), + } +} + +function decodeOrganizationGid(gid: string): string | undefined { + // Org ids come back as base64-encoded GraphQL global ids: "gid://organization/Organization/123". + // We want the bare numeric id; if the shape doesn't match, fall back to the raw value. + const decoded = Buffer.from(gid, 'base64').toString('ascii') + const match = decoded.match(/\/(\d+)$/) + return match ? match[1] : gid +} + +function errorMessage(error: unknown): string { + if (error instanceof Error) return error.message + return String(error) +} diff --git a/packages/store/src/cli/services/store/info/index.test.ts b/packages/store/src/cli/services/store/info/index.test.ts new file mode 100644 index 00000000000..059ec524f92 --- /dev/null +++ b/packages/store/src/cli/services/store/info/index.test.ts @@ -0,0 +1,207 @@ +import {getStoreInfo} from './index.js' +import {fetchDestinationsContext} from './destinations.js' +import {fetchOrganizationShop} from './organization-shop.js' +import {fetchAdminShop} from './admin-shop.js' +import {readAuthStatus} from './auth-status.js' +import type {DestinationNode} from './types.js' +import {AbortError} from '@shopify/cli-kit/node/error' +import {describe, test, expect, vi, beforeEach} from 'vitest' + +vi.mock('./destinations.js') +vi.mock('./organization-shop.js') +vi.mock('./admin-shop.js') +vi.mock('./auth-status.js') + +const SHOP = 'shop.myshopify.com' + +function destination(overrides: Partial = {}): DestinationNode { + return { + id: 'gid-dest', + publicId: 'pub-1', + name: 'My Shop', + handle: 'my-shop', + shortName: 'my-shop', + primaryDomain: SHOP, + webUrl: `https://${SHOP}`, + status: 'ACTIVE', + accountStatus: 'ACTIVE', + isAppDevelopment: false, + lastAccess: '2026-05-20T00:00:00.000Z', + ...overrides, + } +} + +function orgShop(overrides: Record = {}) { + return { + id: 'gid-shop', + externalId: 'ext-1', + shopifyShopId: '12345', + name: 'My Shop (Org)', + primaryDomain: SHOP, + storeType: 'PRODUCTION', + status: 'active', + planName: 'Basic', + planVariantName: 'monthly', + billingCurrency: 'USD', + createdAt: '2025-01-01T00:00:00.000Z', + isMainShop: true, + shortName: 'my-shop', + url: `https://${SHOP}`, + ...overrides, + } +} + +describe('getStoreInfo', () => { + beforeEach(() => { + vi.resetAllMocks() + vi.mocked(readAuthStatus).mockReturnValue({authed: false, source: 'store-auth'}) + }) + + test('throws AbortError when no store is provided', async () => { + const err = await getStoreInfo({verbose: false}).catch((e: unknown) => e) + expect(err).toBeInstanceOf(AbortError) + expect((err as AbortError).message).toContain('No store') + }) + + test('composes Tier 1 + Tier 2 fields from destinations + org-shop', async () => { + vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ + destination: destination(), + owningOrg: {name: 'Acme', id: '42'}, + }) + vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) + + const result = await getStoreInfo({store: SHOP, verbose: false}) + + expect(result.shop_domain).toBe(SHOP) + expect(result.display_name).toBe('My Shop (Org)') + expect(result.shop_id).toBe('gid-dest') + expect(result.store_type).toBe('PRODUCTION') + expect(result.status).toBe('active') + expect(result.primary_url).toBe(`https://${SHOP}`) + expect(result.admin_url).toBe('https://admin.shopify.com/store/my-shop') + expect(result.owning_org).toEqual({name: 'Acme', id: '42'}) + expect(result.plan).toEqual({name: 'Basic', variant: 'monthly'}) + expect(result.shopify_shop_id).toBe('12345') + expect(result.billing_currency).toBe('USD') + expect(result.is_main_shop).toBe(true) + expect(result.last_access).toBe('2026-05-20T00:00:00.000Z') + expect(result.auth_status).toEqual({authed: false, source: 'store-auth'}) + expect(result._field_errors).toBeUndefined() + expect(fetchAdminShop).not.toHaveBeenCalled() + }) + + test('records _field_errors for Tier 2 fields when org-shop fails', async () => { + vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ + destination: destination(), + owningOrg: {name: 'Acme', id: '42'}, + }) + vi.mocked(fetchOrganizationShop).mockRejectedValueOnce(new Error('5xx')) + + const result = await getStoreInfo({store: SHOP, verbose: false}) + + expect(result.shopify_shop_id).toBeUndefined() + expect(result.plan).toBeUndefined() + expect(result._field_errors?.plan?.source).toBe('bp_organizations') + expect(result._field_errors?.plan?.reason).toContain('5xx') + expect(result._field_errors?.shopify_shop_id).toBeDefined() + }) + + test('records _field_errors when owning org id is unknown (skips org-shop)', async () => { + vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ + destination: destination(), + owningOrgError: {source: 'bp_destinations', reason: 'no match'}, + }) + + const result = await getStoreInfo({store: SHOP, verbose: false}) + + expect(fetchOrganizationShop).not.toHaveBeenCalled() + expect(result._field_errors?.owning_org?.reason).toBe('no match') + expect(result._field_errors?.plan?.reason).toBe('no match') + }) + + test('with --verbose and not authed, records cli-source errors for Tier 3 fields', async () => { + vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ + destination: destination(), + owningOrg: {name: 'Acme', id: '42'}, + }) + vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) + + const result = await getStoreInfo({store: SHOP, verbose: true}) + + expect(result.shop_owner).toBeUndefined() + expect(result._field_errors?.shop_owner?.source).toBe('cli') + expect(result._field_errors?.shop_owner?.reason).toContain('store auth') + }) + + test('with --verbose and authed, includes Tier 3 fields from admin response', async () => { + vi.mocked(readAuthStatus).mockReturnValue({ + authed: true, + source: 'store-auth', + expires_at: '2026-12-01T00:00:00.000Z', + }) + vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ + destination: destination(), + owningOrg: {name: 'Acme', id: '42'}, + }) + vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) + vi.mocked(fetchAdminShop).mockResolvedValueOnce({ + skipped: false, + shop: { + shopOwnerName: 'Alice', + ianaTimezone: 'America/New_York', + setupRequired: false, + features: {storefront: true, shopifyPlus: false}, + }, + }) + + const result = await getStoreInfo({store: SHOP, verbose: true}) + + expect(result.shop_owner).toEqual({name: 'Alice'}) + expect(result.timezone).toBe('America/New_York') + expect(result.setup_required).toBe(false) + expect(result.features).toEqual({storefront: true, shopifyPlus: false}) + expect(result._field_errors).toBeUndefined() + }) + + test('with --verbose authed and admin skipped, records admin-source field errors', async () => { + vi.mocked(readAuthStatus).mockReturnValue({authed: true, source: 'store-auth'}) + vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ + destination: destination(), + owningOrg: {name: 'Acme', id: '42'}, + }) + vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) + vi.mocked(fetchAdminShop).mockResolvedValueOnce({skipped: true, reason: 'Admin 5xx'}) + + const result = await getStoreInfo({store: SHOP, verbose: true}) + + expect(result._field_errors?.shop_owner?.source).toBe('admin') + expect(result._field_errors?.shop_owner?.reason).toBe('Admin 5xx') + expect(result._field_errors?.timezone?.reason).toBe('Admin 5xx') + }) + + test('falls back to destination fields when org-shop is unavailable', async () => { + vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ + destination: destination({isAppDevelopment: true}), + owningOrgError: {source: 'bp_destinations', reason: 'no match'}, + }) + + const result = await getStoreInfo({store: SHOP, verbose: false}) + + expect(result.display_name).toBe('My Shop') + expect(result.store_type).toBe('DEVELOPMENT') + expect(result.status).toBe('ACTIVE') + expect(result.primary_url).toBe(`https://${SHOP}`) + }) + + test('builds admin_url from shortName when handle is missing', async () => { + vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ + destination: destination({handle: null, shortName: 'fallback-handle'}), + owningOrg: {name: 'Acme', id: '42'}, + }) + vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) + + const result = await getStoreInfo({store: SHOP, verbose: false}) + + expect(result.admin_url).toBe('https://admin.shopify.com/store/fallback-handle') + }) +}) diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts new file mode 100644 index 00000000000..660bc0310ef --- /dev/null +++ b/packages/store/src/cli/services/store/info/index.ts @@ -0,0 +1,184 @@ +import {readAuthStatus} from './auth-status.js' +import {fetchDestinationsContext} from './destinations.js' +import {fetchOrganizationShop} from './organization-shop.js' +import {fetchAdminShop} from './admin-shop.js' +import type { + AdminShopFetchOutcome, + DestinationsContext, + OrganizationShopFields, + StoreInfoAuthStatus, + StoreInfoFieldError, + StoreInfoPlan, + StoreInfoResult, +} from './types.js' +import {AbortError, FatalError} from '@shopify/cli-kit/node/error' + +export interface GetStoreInfoOptions { + store?: string + verbose: boolean +} + +const TIER_3_FIELDS = ['shop_owner', 'timezone', 'features', 'setup_required'] as const + +export async function getStoreInfo(options: GetStoreInfoOptions): Promise { + const store = options.store + if (!store) { + throw new AbortError( + 'No store specified.', + 'Pass the `myshopify.com` domain of the store as the first argument, e.g. `shopify store info shop.myshopify.com`.', + ) + } + + const fieldErrors: Record = {} + + const destinationsCtx = await fetchDestinationsContext({store}) + + const auth = readAuthStatus(store) + + const [orgShopOutcome, adminOutcome] = await Promise.all([ + safeFetchOrganizationShop(destinationsCtx, store, fieldErrors), + options.verbose && auth.authed ? fetchAdminShop(store) : Promise.resolve(null), + ]) + + const result = buildResult({ + store, + destinationsCtx, + orgShop: orgShopOutcome, + admin: adminOutcome, + verbose: options.verbose, + auth, + fieldErrors, + }) + + return result +} + +async function safeFetchOrganizationShop( + ctx: DestinationsContext, + store: string, + fieldErrors: Record, +): Promise { + if (!ctx.owningOrg?.id) { + // Without an org id we can't address the BP Organizations API. Surface the reason on + // every Tier-2 field that depends on it so the caller sees why each is missing. + const reason = ctx.owningOrgError?.reason ?? 'Owning organization id is unknown.' + for (const field of ['plan', 'shopify_shop_id', 'billing_currency', 'created_at', 'is_main_shop']) { + fieldErrors[field] = {source: 'bp_organizations', reason} + } + return undefined + } + try { + return await fetchOrganizationShop({store, organizationId: ctx.owningOrg.id}) + // eslint-disable-next-line no-catch-all/no-catch-all + } catch (error) { + const reason = `Request failed: ${buildErrorReason(error)}` + for (const field of ['plan', 'shopify_shop_id', 'billing_currency', 'created_at', 'is_main_shop']) { + fieldErrors[field] = {source: 'bp_organizations', reason} + } + return undefined + } +} + +interface BuildResultArgs { + store: string + destinationsCtx: DestinationsContext + orgShop: OrganizationShopFields | undefined + admin: AdminShopFetchOutcome | null + verbose: boolean + auth: StoreInfoAuthStatus + fieldErrors: Record +} + +function buildResult(args: BuildResultArgs): StoreInfoResult { + const {store, destinationsCtx, orgShop, admin, verbose, auth, fieldErrors} = args + const destination = destinationsCtx.destination + + if (destinationsCtx.owningOrgError) { + fieldErrors.owning_org = destinationsCtx.owningOrgError + } + + const result: StoreInfoResult = { + shop_domain: store, + display_name: orgShop?.name ?? destination.name, + shop_id: destination.id, + store_type: orgShop?.storeType ?? (destination.isAppDevelopment ? 'DEVELOPMENT' : undefined), + status: orgShop?.status ?? destination.status, + primary_url: orgShop?.url ?? destination.webUrl, + admin_url: buildAdminUrl(destination.handle ?? destination.shortName ?? undefined), + owning_org: destinationsCtx.owningOrg, + auth_status: auth, + } + + if (orgShop) { + const plan = buildPlan(orgShop) + if (plan) result.plan = plan + if (orgShop.shopifyShopId) result.shopify_shop_id = orgShop.shopifyShopId + if (orgShop.billingCurrency) result.billing_currency = orgShop.billingCurrency + if (orgShop.createdAt) result.created_at = orgShop.createdAt + if (orgShop.isMainShop != null) result.is_main_shop = orgShop.isMainShop + } + + if (destination.lastAccess) result.last_access = destination.lastAccess + + if (verbose) { + applyVerboseFields(result, admin, auth.authed, store, fieldErrors) + } + + if (Object.keys(fieldErrors).length > 0) { + result._field_errors = fieldErrors + } + + return result +} + +function applyVerboseFields( + result: StoreInfoResult, + admin: AdminShopFetchOutcome | null, + authed: boolean, + store: string, + fieldErrors: Record, +): void { + if (!authed) { + const reason = `Tier 3 fields require \`store auth\`. Run \`shopify store auth --store ${store}\` first.` + for (const field of TIER_3_FIELDS) { + fieldErrors[field] = {source: 'cli', reason} + } + return + } + + if (!admin || admin.skipped) { + const reason = admin?.reason ?? 'Admin API was not queried.' + for (const field of TIER_3_FIELDS) { + fieldErrors[field] = {source: 'admin', reason} + } + return + } + + const shop = admin.shop + if (shop.shopOwnerName) result.shop_owner = {name: shop.shopOwnerName} + if (shop.ianaTimezone) result.timezone = shop.ianaTimezone + if (shop.features) result.features = shop.features + if (shop.setupRequired != null) result.setup_required = shop.setupRequired +} + +function buildAdminUrl(handle: string | undefined): string | undefined { + if (!handle) return undefined + return `https://admin.shopify.com/store/${encodeURIComponent(handle)}` +} + +function buildPlan(shop: OrganizationShopFields): StoreInfoPlan | undefined { + const plan: StoreInfoPlan = {} + if (shop.planName) plan.name = shop.planName + if (shop.planVariantName) plan.variant = shop.planVariantName + if (!plan.name && !plan.variant) return undefined + return plan +} + +function buildErrorReason(error: unknown): string { + if (error instanceof FatalError && error.tryMessage) { + const tryMsg = typeof error.tryMessage === 'string' ? error.tryMessage : String(error.tryMessage) + return `${error.message} (${tryMsg})` + } + if (error instanceof Error) return error.message + return String(error) +} diff --git a/packages/store/src/cli/services/store/info/organization-shop.test.ts b/packages/store/src/cli/services/store/info/organization-shop.test.ts new file mode 100644 index 00000000000..9f582495c3c --- /dev/null +++ b/packages/store/src/cli/services/store/info/organization-shop.test.ts @@ -0,0 +1,84 @@ +import {fetchOrganizationShop} from './organization-shop.js' +import type {OrganizationShopResponse} from './organization-shop.js' +import {businessPlatformOrganizationsRequest} from '@shopify/cli-kit/node/api/business-platform' +import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' +import {BugError} from '@shopify/cli-kit/node/error' +import {describe, test, expect, vi, beforeEach} from 'vitest' + +vi.mock('@shopify/cli-kit/node/api/business-platform') +vi.mock('@shopify/cli-kit/node/session') + +const SHOP = 'shop.myshopify.com' +const ORG_ID = '123' + +function shopNode(overrides: Record = {}) { + return { + id: 'gid://shop/Shop/1', + externalId: 'public-1', + shopifyShopId: '9999', + name: 'My Shop', + primaryDomain: SHOP, + storeType: 'PRODUCTION', + status: 'active', + planName: 'Basic', + planVariantName: 'monthly', + billingCurrency: 'USD', + createdAt: '2025-01-01T00:00:00.000Z', + isMainShop: true, + shortName: 'my-shop', + url: `https://${SHOP}`, + ...overrides, + } +} + +describe('fetchOrganizationShop', () => { + beforeEach(() => { + vi.resetAllMocks() + vi.mocked(ensureAuthenticatedBusinessPlatform).mockResolvedValue('bp-token') + }) + + test('returns the matched shop node', async () => { + vi.mocked(businessPlatformOrganizationsRequest).mockResolvedValueOnce({ + organization: { + id: 'gid', + name: 'Acme', + accessibleShops: {edges: [{node: shopNode()}]}, + }, + } as OrganizationShopResponse) + + const shop = await fetchOrganizationShop({store: SHOP, organizationId: ORG_ID}) + expect(shop.shopifyShopId).toBe('9999') + expect(shop.primaryDomain).toBe(SHOP) + }) + + test('throws BugError when no shop matches the domain', async () => { + vi.mocked(businessPlatformOrganizationsRequest).mockResolvedValueOnce({ + organization: { + id: 'gid', + name: 'Acme', + accessibleShops: {edges: [{node: shopNode({primaryDomain: 'other.myshopify.com'})}]}, + }, + } as OrganizationShopResponse) + + await expect(fetchOrganizationShop({store: SHOP, organizationId: ORG_ID})).rejects.toBeInstanceOf(BugError) + }) + + test('passes organizationId and search variable to the request', async () => { + vi.mocked(businessPlatformOrganizationsRequest).mockResolvedValueOnce({ + organization: {id: 'gid', name: 'Acme', accessibleShops: {edges: [{node: shopNode()}]}}, + } as OrganizationShopResponse) + + await fetchOrganizationShop({store: SHOP, organizationId: ORG_ID, token: 'preset'}) + + const call = vi.mocked(businessPlatformOrganizationsRequest).mock.calls[0]?.[0] + expect(call?.organizationId).toBe(ORG_ID) + expect(call?.variables).toEqual({search: SHOP}) + expect(call?.token).toBe('preset') + expect(ensureAuthenticatedBusinessPlatform).not.toHaveBeenCalled() + }) + + test('throws when organization is missing', async () => { + vi.mocked(businessPlatformOrganizationsRequest).mockResolvedValueOnce({organization: null} as OrganizationShopResponse) + await expect(fetchOrganizationShop({store: SHOP, organizationId: ORG_ID})).rejects.toBeInstanceOf(BugError) + }) +}) diff --git a/packages/store/src/cli/services/store/info/organization-shop.ts b/packages/store/src/cli/services/store/info/organization-shop.ts new file mode 100644 index 00000000000..2b28733bf1b --- /dev/null +++ b/packages/store/src/cli/services/store/info/organization-shop.ts @@ -0,0 +1,84 @@ +import {BugError} from '@shopify/cli-kit/node/error' +import {businessPlatformOrganizationsRequest} from '@shopify/cli-kit/node/api/business-platform' +import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' +import type {OrganizationShopFields} from './types.js' + +const ORGANIZATION_SHOP_QUERY = ` + query StoreInfoShop($search: String) { + organization { + id + name + accessibleShops(first: 5, search: $search) { + edges { + node { + id + externalId + shopifyShopId + name + primaryDomain + storeType + status + planName + planVariantName + billingCurrency + createdAt + isMainShop + shortName + url + } + } + } + } + } +` + +export interface OrganizationShopResponse { + organization?: { + id: string + name: string + accessibleShops?: { + edges: { + node: OrganizationShopFields + }[] + } + } | null +} + +export interface FetchOrganizationShopOptions { + store: string + organizationId: string + token?: string +} + +export async function fetchOrganizationShop( + options: FetchOrganizationShopOptions, +): Promise { + const token = options.token ?? (await ensureAuthenticatedBusinessPlatform()) + const unauthorizedHandler = { + type: 'token_refresh' as const, + handler: async () => { + const newToken = await ensureAuthenticatedBusinessPlatform() + return {token: newToken} + }, + } + + const response = await businessPlatformOrganizationsRequest({ + query: ORGANIZATION_SHOP_QUERY, + token, + organizationId: options.organizationId, + variables: {search: options.store}, + unauthorizedHandler, + }) + + const edges = response.organization?.accessibleShops?.edges ?? [] + const matched = edges.map((edge) => edge.node).find((node) => node.primaryDomain?.toLowerCase() === options.store.toLowerCase()) + + if (!matched) { + throw new BugError( + `Couldn't find shop ${options.store} inside organization ${options.organizationId}.`, + 'The destination resolved against the business platform, but the organizations API does not list this shop. This usually means the search service is stale; try again in a moment.', + ) + } + + return matched +} diff --git a/packages/store/src/cli/services/store/info/result.test.ts b/packages/store/src/cli/services/store/info/result.test.ts new file mode 100644 index 00000000000..7a0b538eb2e --- /dev/null +++ b/packages/store/src/cli/services/store/info/result.test.ts @@ -0,0 +1,126 @@ +import {renderStoreInfoResult} from './result.js' +import type {StoreInfoResult} from './types.js' +import {outputResult} from '@shopify/cli-kit/node/output' +import {renderInfo} from '@shopify/cli-kit/node/ui' +import {describe, test, expect, vi, beforeEach} from 'vitest' + +vi.mock('@shopify/cli-kit/node/output') +vi.mock('@shopify/cli-kit/node/ui') + +function baseResult(overrides: Partial = {}): StoreInfoResult { + return { + shop_domain: 'shop.myshopify.com', + display_name: 'My Shop', + shop_id: 'gid-dest', + auth_status: {authed: false, source: 'store-auth'}, + ...overrides, + } +} + +describe('renderStoreInfoResult', () => { + beforeEach(() => { + vi.resetAllMocks() + }) + + test('emits JSON via outputResult when format is json', () => { + renderStoreInfoResult( + baseResult({ + shopify_shop_id: '99', + _field_errors: {shop_owner: {source: 'cli', reason: 'not authed'}}, + }), + 'json', + ) + expect(outputResult).toHaveBeenCalledOnce() + const payload = vi.mocked(outputResult).mock.calls[0]?.[0] as string + expect(JSON.parse(payload)).toEqual({ + shop_domain: 'shop.myshopify.com', + display_name: 'My Shop', + shop_id: 'gid-dest', + auth_status: {authed: false, source: 'store-auth'}, + shopify_shop_id: '99', + _field_errors: {shop_owner: {source: 'cli', reason: 'not authed'}}, + }) + expect(renderInfo).not.toHaveBeenCalled() + }) + + test('emits complete JSON shape when Tier 3 fields are populated', () => { + renderStoreInfoResult( + baseResult({ + store_type: 'PRODUCTION', + status: 'active', + primary_url: 'https://shop.myshopify.com', + admin_url: 'https://admin.shopify.com/store/my-shop', + owning_org: {name: 'Acme', id: '42'}, + plan: {name: 'Basic', variant: 'monthly'}, + shopify_shop_id: '12345', + billing_currency: 'USD', + created_at: '2025-01-01T00:00:00.000Z', + last_access: '2026-05-20T00:00:00.000Z', + is_main_shop: true, + shop_owner: {name: 'Alice'}, + timezone: 'America/New_York', + features: {storefront: true, shopifyPlus: false}, + setup_required: false, + auth_status: {authed: true, source: 'store-auth', expires_at: '2026-12-01T00:00:00.000Z'}, + }), + 'json', + ) + const payload = vi.mocked(outputResult).mock.calls[0]?.[0] as string + expect(JSON.parse(payload)).toEqual({ + shop_domain: 'shop.myshopify.com', + display_name: 'My Shop', + shop_id: 'gid-dest', + store_type: 'PRODUCTION', + status: 'active', + primary_url: 'https://shop.myshopify.com', + admin_url: 'https://admin.shopify.com/store/my-shop', + owning_org: {name: 'Acme', id: '42'}, + auth_status: {authed: true, source: 'store-auth', expires_at: '2026-12-01T00:00:00.000Z'}, + plan: {name: 'Basic', variant: 'monthly'}, + shopify_shop_id: '12345', + billing_currency: 'USD', + created_at: '2025-01-01T00:00:00.000Z', + last_access: '2026-05-20T00:00:00.000Z', + is_main_shop: true, + shop_owner: {name: 'Alice'}, + timezone: 'America/New_York', + features: {storefront: true, shopifyPlus: false}, + setup_required: false, + }) + }) + + test('text format includes identity section', () => { + renderStoreInfoResult(baseResult(), 'text') + expect(renderInfo).toHaveBeenCalledOnce() + const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as {customSections: {title: string}[]} + const titles = opts.customSections.map((s) => s.title) + expect(titles).toContain('Identity') + }) + + test('text format includes Plan & lifecycle when Tier 2 data present', () => { + renderStoreInfoResult( + baseResult({plan: {name: 'Basic'}, shopify_shop_id: '99', billing_currency: 'USD'}), + 'text', + ) + const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as {customSections: {title: string}[]} + expect(opts.customSections.map((s) => s.title)).toContain('Plan & lifecycle') + }) + + test('text format includes Admin details when Tier 3 data present', () => { + renderStoreInfoResult( + baseResult({shop_owner: {name: 'Alice'}, timezone: 'America/New_York'}), + 'text', + ) + const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as {customSections: {title: string}[]} + expect(opts.customSections.map((s) => s.title)).toContain('Admin details') + }) + + test('text format adds Missing or partial fields section when _field_errors is non-empty', () => { + renderStoreInfoResult( + baseResult({_field_errors: {plan: {source: 'bp_organizations', reason: '5xx'}}}), + 'text', + ) + const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as {customSections: {title: string}[]} + expect(opts.customSections.map((s) => s.title)).toContain('Missing or partial fields') + }) +}) diff --git a/packages/store/src/cli/services/store/info/result.ts b/packages/store/src/cli/services/store/info/result.ts new file mode 100644 index 00000000000..13488adfef3 --- /dev/null +++ b/packages/store/src/cli/services/store/info/result.ts @@ -0,0 +1,111 @@ +import type {StoreInfoFieldError, StoreInfoResult} from './types.js' +import {outputResult} from '@shopify/cli-kit/node/output' +import {renderInfo} from '@shopify/cli-kit/node/ui' +import type {AlertCustomSection} from '@shopify/cli-kit/node/ui' + +export type StoreInfoOutputFormat = 'text' | 'json' + +export function renderStoreInfoResult(result: StoreInfoResult, format: StoreInfoOutputFormat): void { + if (format === 'json') { + outputResult(JSON.stringify(result, null, 2)) + return + } + renderInfo({ + headline: `Store info: ${result.shop_domain}`, + customSections: buildTextSections(result), + }) +} + +function buildTextSections(result: StoreInfoResult): AlertCustomSection[] { + const sections: AlertCustomSection[] = [] + + sections.push({ + title: 'Identity', + body: {list: {items: identityItems(result)}}, + }) + + const tier2 = tier2Items(result) + if (tier2.length > 0) { + sections.push({ + title: 'Plan & lifecycle', + body: {list: {items: tier2}}, + }) + } + + const tier3 = tier3Items(result) + if (tier3.length > 0) { + sections.push({ + title: 'Admin details', + body: {list: {items: tier3}}, + }) + } + + if (result._field_errors && Object.keys(result._field_errors).length > 0) { + sections.push({ + title: 'Missing or partial fields', + body: {list: {items: fieldErrorItems(result._field_errors)}}, + }) + } + + return sections +} + +function identityItems(result: StoreInfoResult): string[] { + const items: string[] = [] + items.push(`shop_domain: ${result.shop_domain}`) + pushIfPresent(items, 'display_name', result.display_name) + pushIfPresent(items, 'shop_id', result.shop_id) + pushIfPresent(items, 'store_type', result.store_type) + pushIfPresent(items, 'status', result.status) + pushIfPresent(items, 'primary_url', result.primary_url) + pushIfPresent(items, 'admin_url', result.admin_url) + if (result.owning_org) { + const orgLine = result.owning_org.id + ? `${result.owning_org.name} (id: ${result.owning_org.id})` + : result.owning_org.name + items.push(`owning_org: ${orgLine}`) + } + items.push(`auth_status: ${formatAuthStatus(result.auth_status)}`) + return items +} + +function tier2Items(result: StoreInfoResult): string[] { + const items: string[] = [] + if (result.plan) { + const planText = [result.plan.name, result.plan.variant].filter(Boolean).join(' / ') + if (planText) items.push(`plan: ${planText}`) + } + pushIfPresent(items, 'shopify_shop_id', result.shopify_shop_id) + pushIfPresent(items, 'billing_currency', result.billing_currency) + pushIfPresent(items, 'created_at', result.created_at) + pushIfPresent(items, 'last_access', result.last_access) + if (result.is_main_shop != null) items.push(`is_main_shop: ${String(result.is_main_shop)}`) + return items +} + +function tier3Items(result: StoreInfoResult): string[] { + const items: string[] = [] + if (result.shop_owner?.name) items.push(`shop_owner: ${result.shop_owner.name}`) + pushIfPresent(items, 'timezone', result.timezone) + if (result.setup_required != null) items.push(`setup_required: ${String(result.setup_required)}`) + if (result.features && Object.keys(result.features).length > 0) { + const featureText = Object.entries(result.features) + .map(([key, value]) => `${key}=${String(value)}`) + .join(', ') + items.push(`features: ${featureText}`) + } + return items +} + +function fieldErrorItems(errors: Record): string[] { + return Object.entries(errors).map(([field, err]) => `${field} [${err.source}]: ${err.reason}`) +} + +function pushIfPresent(items: string[], label: string, value: string | undefined): void { + if (value) items.push(`${label}: ${value}`) +} + +function formatAuthStatus(auth: StoreInfoResult['auth_status']): string { + if (!auth.authed) return 'not authenticated' + return auth.expires_at ? `authenticated (expires ${auth.expires_at})` : 'authenticated' +} diff --git a/packages/store/src/cli/services/store/info/types.ts b/packages/store/src/cli/services/store/info/types.ts new file mode 100644 index 00000000000..c0cbbac1078 --- /dev/null +++ b/packages/store/src/cli/services/store/info/types.ts @@ -0,0 +1,110 @@ +export type StoreInfoFieldErrorSource = 'bp_destinations' | 'bp_organizations' | 'admin' | 'cli' + +export interface StoreInfoFieldError { + source: StoreInfoFieldErrorSource + reason: string +} + +export interface StoreInfoFeatures { + storefront?: boolean + shopifyPlus?: boolean + harmonizedSystemCode?: boolean + branding?: boolean +} + +export interface StoreInfoOwningOrg { + name: string + id?: string +} + +export interface StoreInfoShopOwner { + name?: string +} + +export interface StoreInfoPlan { + name?: string + variant?: string +} + +export interface StoreInfoAuthStatus { + authed: boolean + source: 'store-auth' + expires_at?: string +} + +export interface StoreInfoResult { + // Tier 1 + shop_domain: string + display_name?: string + shop_id?: string + store_type?: string + status?: string + primary_url?: string + admin_url?: string + owning_org?: StoreInfoOwningOrg + auth_status: StoreInfoAuthStatus + + // Tier 2 + plan?: StoreInfoPlan + shopify_shop_id?: string + billing_currency?: string + created_at?: string + last_access?: string + is_main_shop?: boolean + + // Tier 3 (verbose + authed only) + shop_owner?: StoreInfoShopOwner + timezone?: string + features?: StoreInfoFeatures + setup_required?: boolean + + _field_errors?: Record +} + +export interface DestinationNode { + id: string + publicId: string + name: string + handle?: string | null + shortName?: string | null + primaryDomain?: string | null + webUrl: string + status: 'ACTIVE' | 'INACTIVE' + accountStatus?: string | null + isAppDevelopment?: boolean | null + lastAccess?: string | null +} + +export interface DestinationsContext { + destination: DestinationNode + owningOrg?: StoreInfoOwningOrg + owningOrgError?: StoreInfoFieldError +} + +export interface OrganizationShopFields { + id?: string + externalId?: string + shopifyShopId?: string + name?: string + primaryDomain?: string + storeType?: string + status?: string + planName?: string + planVariantName?: string + billingCurrency?: string + createdAt?: string + isMainShop?: boolean + shortName?: string + url?: string +} + +export type AdminShopFetchOutcome = + | {skipped: true; reason: string} + | {skipped: false; shop: AdminShopFields} + +export interface AdminShopFields { + shopOwnerName?: string + ianaTimezone?: string + setupRequired?: boolean + features?: StoreInfoFeatures +} diff --git a/packages/store/src/index.ts b/packages/store/src/index.ts index 73e67d78154..98924c2328f 100644 --- a/packages/store/src/index.ts +++ b/packages/store/src/index.ts @@ -1,9 +1,11 @@ import StoreAuth from './cli/commands/store/auth.js' import StoreExecute from './cli/commands/store/execute.js' +import StoreInfo from './cli/commands/store/info.js' const COMMANDS = { 'store:auth': StoreAuth, 'store:execute': StoreExecute, + 'store:info': StoreInfo, } export default COMMANDS From 62d62588da354cfd96e3f857dac602e1e3c28e3c Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 21:09:59 +0300 Subject: [PATCH 02/21] Use compact() to drop nullish optional fields in store info result Replaces repeated `if (value) result.field = value` chains with a single `compact()` pass from `@shopify/cli-kit/common/object`, flattening buildResult, applyVerboseFields, buildPlan, and mapAdminShop. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../src/cli/services/store/info/admin-shop.ts | 28 +++++++------ .../src/cli/services/store/info/index.ts | 41 +++++++++---------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/packages/store/src/cli/services/store/info/admin-shop.ts b/packages/store/src/cli/services/store/info/admin-shop.ts index 3c2b12c6e4a..a82881c29a9 100644 --- a/packages/store/src/cli/services/store/info/admin-shop.ts +++ b/packages/store/src/cli/services/store/info/admin-shop.ts @@ -2,6 +2,7 @@ import {prepareAdminStoreGraphQLContext} from '../execute/admin-context.js' import {adminUrl} from '@shopify/cli-kit/node/api/admin' import {graphqlRequest} from '@shopify/cli-kit/node/api/graphql' import {AbortError} from '@shopify/cli-kit/node/error' +import {compact} from '@shopify/cli-kit/common/object' import type {AdminShopFetchOutcome, AdminShopFields, StoreInfoFeatures} from './types.js' const ADMIN_SHOP_QUERY = ` @@ -68,20 +69,21 @@ export async function fetchAdminShop(store: string): Promise 0) result.features = features - return result + return compact({ + shopOwnerName: shop.shopOwnerName, + ianaTimezone: shop.ianaTimezone, + setupRequired: shop.setupRequired, + features: Object.keys(features).length > 0 ? features : undefined, + }) as AdminShopFields } function skipReasonForContextError(error: unknown, store: string): string { diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index 660bc0310ef..c724c523972 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -12,6 +12,7 @@ import type { StoreInfoResult, } from './types.js' import {AbortError, FatalError} from '@shopify/cli-kit/node/error' +import {compact} from '@shopify/cli-kit/common/object' export interface GetStoreInfoOptions { store?: string @@ -97,7 +98,7 @@ function buildResult(args: BuildResultArgs): StoreInfoResult { fieldErrors.owning_org = destinationsCtx.owningOrgError } - const result: StoreInfoResult = { + const baseFields: Partial = { shop_domain: store, display_name: orgShop?.name ?? destination.name, shop_id: destination.id, @@ -106,19 +107,15 @@ function buildResult(args: BuildResultArgs): StoreInfoResult { primary_url: orgShop?.url ?? destination.webUrl, admin_url: buildAdminUrl(destination.handle ?? destination.shortName ?? undefined), owning_org: destinationsCtx.owningOrg, - auth_status: auth, + plan: orgShop ? buildPlan(orgShop) : undefined, + shopify_shop_id: orgShop?.shopifyShopId, + billing_currency: orgShop?.billingCurrency, + created_at: orgShop?.createdAt, + is_main_shop: orgShop?.isMainShop, + last_access: destination.lastAccess ?? undefined, } - if (orgShop) { - const plan = buildPlan(orgShop) - if (plan) result.plan = plan - if (orgShop.shopifyShopId) result.shopify_shop_id = orgShop.shopifyShopId - if (orgShop.billingCurrency) result.billing_currency = orgShop.billingCurrency - if (orgShop.createdAt) result.created_at = orgShop.createdAt - if (orgShop.isMainShop != null) result.is_main_shop = orgShop.isMainShop - } - - if (destination.lastAccess) result.last_access = destination.lastAccess + const result = {...compact(baseFields), auth_status: auth} as StoreInfoResult if (verbose) { applyVerboseFields(result, admin, auth.authed, store, fieldErrors) @@ -155,10 +152,15 @@ function applyVerboseFields( } const shop = admin.shop - if (shop.shopOwnerName) result.shop_owner = {name: shop.shopOwnerName} - if (shop.ianaTimezone) result.timezone = shop.ianaTimezone - if (shop.features) result.features = shop.features - if (shop.setupRequired != null) result.setup_required = shop.setupRequired + Object.assign( + result, + compact({ + shop_owner: shop.shopOwnerName ? {name: shop.shopOwnerName} : undefined, + timezone: shop.ianaTimezone, + features: shop.features, + setup_required: shop.setupRequired, + }), + ) } function buildAdminUrl(handle: string | undefined): string | undefined { @@ -167,11 +169,8 @@ function buildAdminUrl(handle: string | undefined): string | undefined { } function buildPlan(shop: OrganizationShopFields): StoreInfoPlan | undefined { - const plan: StoreInfoPlan = {} - if (shop.planName) plan.name = shop.planName - if (shop.planVariantName) plan.variant = shop.planVariantName - if (!plan.name && !plan.variant) return undefined - return plan + const plan = compact({name: shop.planName, variant: shop.planVariantName}) as StoreInfoPlan + return Object.keys(plan).length > 0 ? plan : undefined } function buildErrorReason(error: unknown): string { From 43ef6e9eb1b9cec7fa764297cfa65cb35d0af98e Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 21:20:18 +0300 Subject: [PATCH 03/21] Convert store info to --store flag instead of positional arg Aligns with the rest of the store: namespace (e.g. store execute) which takes the shop domain via `-s, --store` rather than a positional. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../interfaces/store-info.interface.ts | 6 +++++ .../generated/generated_docs_data_v2.json | 10 ++++++- packages/cli/README.md | 22 +++++++-------- packages/cli/oclif.manifest.json | 21 +++++++++------ .../store/src/cli/commands/store/info.test.ts | 10 +++---- packages/store/src/cli/commands/store/info.ts | 27 +++++++++---------- .../src/cli/services/store/info/index.ts | 2 +- 7 files changed, 57 insertions(+), 41 deletions(-) diff --git a/docs-shopify.dev/commands/interfaces/store-info.interface.ts b/docs-shopify.dev/commands/interfaces/store-info.interface.ts index 02a8cec1efb..7573399509f 100644 --- a/docs-shopify.dev/commands/interfaces/store-info.interface.ts +++ b/docs-shopify.dev/commands/interfaces/store-info.interface.ts @@ -16,6 +16,12 @@ export interface storeinfo { */ '--no-color'?: '' + /** + * The myshopify.com domain of the store to inspect. + * @environment SHOPIFY_FLAG_STORE + */ + '-s, --store ': string + /** * Increase the verbosity of the output. * @environment SHOPIFY_FLAG_VERBOSE diff --git a/docs-shopify.dev/generated/generated_docs_data_v2.json b/docs-shopify.dev/generated/generated_docs_data_v2.json index d69a6b8835a..b5764f33745 100644 --- a/docs-shopify.dev/generated/generated_docs_data_v2.json +++ b/docs-shopify.dev/generated/generated_docs_data_v2.json @@ -4326,9 +4326,17 @@ "description": "Output the result as JSON. Automatically disables color output.", "isOptional": true, "environmentValue": "SHOPIFY_FLAG_JSON" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/store-info.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-s, --store ", + "value": "string", + "description": "The myshopify.com domain of the store to inspect.", + "environmentValue": "SHOPIFY_FLAG_STORE" } ], - "value": "export interface storeinfo {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface storeinfo {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The myshopify.com domain of the store to inspect.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } }, "themecheck": { diff --git a/packages/cli/README.md b/packages/cli/README.md index ef83fe0187b..79e4e2c737d 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -78,7 +78,7 @@ * [`shopify search [query]`](#shopify-search-query) * [`shopify store auth`](#shopify-store-auth) * [`shopify store execute`](#shopify-store-execute) -* [`shopify store info STORE`](#shopify-store-info-store) +* [`shopify store info`](#shopify-store-info) * [`shopify theme check`](#shopify-theme-check) * [`shopify theme console`](#shopify-theme-console) * [`shopify theme delete`](#shopify-theme-delete) @@ -2179,21 +2179,19 @@ EXAMPLES $ shopify store execute --store shop.myshopify.com --query "query { shop { name } }" --json ``` -## `shopify store info STORE` +## `shopify store info` Surface metadata about a Shopify store. ``` USAGE - $ shopify store info STORE [-j] [--no-color] [--verbose] - -ARGUMENTS - STORE The myshopify.com domain of the store to inspect. + $ shopify store info -s [-j] [--no-color] [--verbose] FLAGS - -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color output. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. + -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color output. + -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store to inspect. + --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. + --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. DESCRIPTION Surface metadata about a Shopify store. @@ -2207,11 +2205,11 @@ DESCRIPTION command. The command does fail when the destination cannot be resolved. EXAMPLES - $ shopify store info shop.myshopify.com + $ shopify store info --store shop.myshopify.com - $ shopify store info shop.myshopify.com --json + $ shopify store info --store shop.myshopify.com --json - $ shopify store info shop.myshopify.com --verbose + $ shopify store info --store shop.myshopify.com --verbose ``` ## `shopify theme check` diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index c0880697e91..f98d2005834 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -5866,19 +5866,14 @@ "aliases": [ ], "args": { - "store": { - "description": "The myshopify.com domain of the store to inspect.", - "name": "store", - "required": true - } }, "customPluginName": "@shopify/store", "description": "Reads metadata for a store from the Business Platform Destinations and Organizations APIs.\n\nTier 1 and Tier 2 fields work without `store auth`. Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are only included when `--verbose` is set.\n\nBackend failures degrade gracefully: a single failing call populates `_field_errors` rather than aborting the whole command. The command does fail when the destination cannot be resolved.", "descriptionWithMarkdown": "Reads metadata for a store from the Business Platform Destinations and Organizations APIs.\n\nTier 1 and Tier 2 fields work without `store auth`. Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are only included when `--verbose` is set.\n\nBackend failures degrade gracefully: a single failing call populates `_field_errors` rather than aborting the whole command. The command does fail when the destination cannot be resolved.", "examples": [ - "<%= config.bin %> <%= command.id %> shop.myshopify.com", - "<%= config.bin %> <%= command.id %> shop.myshopify.com --json", - "<%= config.bin %> <%= command.id %> shop.myshopify.com --verbose" + "<%= config.bin %> <%= command.id %> --store shop.myshopify.com", + "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json", + "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --verbose" ], "flags": { "json": { @@ -5898,6 +5893,16 @@ "name": "no-color", "type": "boolean" }, + "store": { + "char": "s", + "description": "The myshopify.com domain of the store to inspect.", + "env": "SHOPIFY_FLAG_STORE", + "hasDynamicHelp": false, + "multiple": false, + "name": "store", + "required": true, + "type": "option" + }, "verbose": { "allowNo": false, "description": "Increase the verbosity of the output.", diff --git a/packages/store/src/cli/commands/store/info.test.ts b/packages/store/src/cli/commands/store/info.test.ts index e1632d59380..c29969f65d4 100644 --- a/packages/store/src/cli/commands/store/info.test.ts +++ b/packages/store/src/cli/commands/store/info.test.ts @@ -16,7 +16,7 @@ describe('store info command', () => { }) test('passes store and verbose=false through to the service', async () => { - await StoreInfo.run(['shop.myshopify.com']) + await StoreInfo.run(['--store', 'shop.myshopify.com']) expect(getStoreInfo).toHaveBeenCalledWith({ store: 'shop.myshopify.com', @@ -29,7 +29,7 @@ describe('store info command', () => { }) test('passes verbose=true when --verbose flag is set', async () => { - await StoreInfo.run(['shop.myshopify.com', '--verbose']) + await StoreInfo.run(['--store', 'shop.myshopify.com', '--verbose']) expect(getStoreInfo).toHaveBeenCalledWith({ store: 'shop.myshopify.com', @@ -38,13 +38,13 @@ describe('store info command', () => { }) test('renders json format when --json flag is set', async () => { - await StoreInfo.run(['shop.myshopify.com', '--json']) + await StoreInfo.run(['--store', 'shop.myshopify.com', '--json']) expect(renderStoreInfoResult).toHaveBeenCalledWith(expect.anything(), 'json') }) - test('defines the expected flags and positional arg', () => { - expect(StoreInfo.args.store).toBeDefined() + test('defines the expected flags', () => { + expect(StoreInfo.flags.store).toBeDefined() expect(StoreInfo.flags.json).toBeDefined() expect(StoreInfo.flags.verbose).toBeDefined() }) diff --git a/packages/store/src/cli/commands/store/info.ts b/packages/store/src/cli/commands/store/info.ts index fc2cbcf1e33..3f46460a857 100644 --- a/packages/store/src/cli/commands/store/info.ts +++ b/packages/store/src/cli/commands/store/info.ts @@ -3,7 +3,7 @@ import {renderStoreInfoResult} from '../../services/store/info/result.js' import StoreCommand from '../../utilities/store-command.js' import {globalFlags, jsonFlag} from '@shopify/cli-kit/node/cli' import {normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn' -import {Args} from '@oclif/core' +import {Flags} from '@oclif/core' export default class StoreInfo extends StoreCommand { static summary = 'Surface metadata about a Shopify store.' @@ -17,29 +17,28 @@ Backend failures degrade gracefully: a single failing call populates \`_field_er static description = this.descriptionWithoutMarkdown() static examples = [ - '<%= config.bin %> <%= command.id %> shop.myshopify.com', - '<%= config.bin %> <%= command.id %> shop.myshopify.com --json', - '<%= config.bin %> <%= command.id %> shop.myshopify.com --verbose', + '<%= config.bin %> <%= command.id %> --store shop.myshopify.com', + '<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json', + '<%= config.bin %> <%= command.id %> --store shop.myshopify.com --verbose', ] - static args = { - store: Args.string({ - description: 'The myshopify.com domain of the store to inspect.', - required: true, - parse: async (input) => normalizeStoreFqdn(input), - }), - } - static flags = { ...globalFlags, ...jsonFlag, + store: Flags.string({ + char: 's', + description: 'The myshopify.com domain of the store to inspect.', + env: 'SHOPIFY_FLAG_STORE', + parse: async (input) => normalizeStoreFqdn(input), + required: true, + }), } public async run(): Promise { - const {args, flags} = await this.parse(StoreInfo) + const {flags} = await this.parse(StoreInfo) const result = await getStoreInfo({ - store: args.store, + store: flags.store, verbose: Boolean(flags.verbose), }) diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index c724c523972..e7377f6408e 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -26,7 +26,7 @@ export async function getStoreInfo(options: GetStoreInfoOptions): Promise Date: Thu, 28 May 2026 21:27:08 +0300 Subject: [PATCH 04/21] Extract shared storeFlags.store across store: commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hoists the `-s, --store` flag definition into packages/store/src/cli/flags.ts following the themeFlags/appFlags precedent. `store auth`, `store execute`, and `store info` now share the same flag declaration. Side effect: the per-command verbal description ("…to authenticate against", "…to execute against", "…to inspect") collapses into "The myshopify.com domain of the store." — visible only in --help. The verb is redundant with the command name. Co-Authored-By: Claude Opus 4.7 (1M context) --- .changeset/store-info-command.md | 2 +- .../commands/interfaces/store-auth.interface.ts | 2 +- .../commands/interfaces/store-execute.interface.ts | 2 +- .../commands/interfaces/store-info.interface.ts | 2 +- .../generated/generated_docs_data_v2.json | 12 ++++++------ packages/cli/README.md | 8 +++----- packages/cli/oclif.manifest.json | 6 +++--- packages/store/src/cli/commands/store/auth.ts | 10 ++-------- packages/store/src/cli/commands/store/execute.ts | 10 ++-------- packages/store/src/cli/commands/store/info.ts | 11 ++--------- packages/store/src/cli/flags.ts | 12 ++++++++++++ 11 files changed, 34 insertions(+), 43 deletions(-) create mode 100644 packages/store/src/cli/flags.ts diff --git a/.changeset/store-info-command.md b/.changeset/store-info-command.md index 3379a9e767f..34b9ef22241 100644 --- a/.changeset/store-info-command.md +++ b/.changeset/store-info-command.md @@ -2,4 +2,4 @@ '@shopify/cli': minor --- -Add `shopify store info ` command for surfacing shop metadata from the Business Platform Destinations and Organizations APIs. Tier 1 and Tier 2 fields are returned without `store auth`; Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are included only with `--verbose`. Individual backend failures degrade gracefully via `_field_errors` rather than aborting the command. +Add `shopify store info --store ` command for surfacing shop metadata from the Business Platform Destinations and Organizations APIs. Tier 1 and Tier 2 fields are returned without `store auth`; Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are included only with `--verbose`. Individual backend failures degrade gracefully via `_field_errors` rather than aborting the command. diff --git a/docs-shopify.dev/commands/interfaces/store-auth.interface.ts b/docs-shopify.dev/commands/interfaces/store-auth.interface.ts index 926550e5104..16f479cc306 100644 --- a/docs-shopify.dev/commands/interfaces/store-auth.interface.ts +++ b/docs-shopify.dev/commands/interfaces/store-auth.interface.ts @@ -23,7 +23,7 @@ export interface storeauth { '--scopes ': string /** - * The myshopify.com domain of the store to authenticate against. + * The myshopify.com domain of the store. * @environment SHOPIFY_FLAG_STORE */ '-s, --store ': string diff --git a/docs-shopify.dev/commands/interfaces/store-execute.interface.ts b/docs-shopify.dev/commands/interfaces/store-execute.interface.ts index be6a7e3c915..5897fffbb58 100644 --- a/docs-shopify.dev/commands/interfaces/store-execute.interface.ts +++ b/docs-shopify.dev/commands/interfaces/store-execute.interface.ts @@ -41,7 +41,7 @@ export interface storeexecute { '--query-file '?: string /** - * The myshopify.com domain of the store to execute against. + * The myshopify.com domain of the store. * @environment SHOPIFY_FLAG_STORE */ '-s, --store ': string diff --git a/docs-shopify.dev/commands/interfaces/store-info.interface.ts b/docs-shopify.dev/commands/interfaces/store-info.interface.ts index 7573399509f..01c264dca63 100644 --- a/docs-shopify.dev/commands/interfaces/store-info.interface.ts +++ b/docs-shopify.dev/commands/interfaces/store-info.interface.ts @@ -17,7 +17,7 @@ export interface storeinfo { '--no-color'?: '' /** - * The myshopify.com domain of the store to inspect. + * The myshopify.com domain of the store. * @environment SHOPIFY_FLAG_STORE */ '-s, --store ': string diff --git a/docs-shopify.dev/generated/generated_docs_data_v2.json b/docs-shopify.dev/generated/generated_docs_data_v2.json index b5764f33745..16f31211e65 100644 --- a/docs-shopify.dev/generated/generated_docs_data_v2.json +++ b/docs-shopify.dev/generated/generated_docs_data_v2.json @@ -4177,11 +4177,11 @@ "syntaxKind": "PropertySignature", "name": "-s, --store ", "value": "string", - "description": "The myshopify.com domain of the store to authenticate against.", + "description": "The myshopify.com domain of the store.", "environmentValue": "SHOPIFY_FLAG_STORE" } ], - "value": "export interface storeauth {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Comma-separated Admin API scopes to request for the app.\n * @environment SHOPIFY_FLAG_SCOPES\n */\n '--scopes ': string\n\n /**\n * The myshopify.com domain of the store to authenticate against.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface storeauth {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Comma-separated Admin API scopes to request for the app.\n * @environment SHOPIFY_FLAG_SCOPES\n */\n '--scopes ': string\n\n /**\n * The myshopify.com domain of the store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } }, "storeexecute": { @@ -4277,7 +4277,7 @@ "syntaxKind": "PropertySignature", "name": "-s, --store ", "value": "string", - "description": "The myshopify.com domain of the store to execute against.", + "description": "The myshopify.com domain of the store.", "environmentValue": "SHOPIFY_FLAG_STORE" }, { @@ -4290,7 +4290,7 @@ "environmentValue": "SHOPIFY_FLAG_VARIABLES" } ], - "value": "export interface storeexecute {\n /**\n * Allow GraphQL mutations to run against the target store.\n * @environment SHOPIFY_FLAG_ALLOW_MUTATIONS\n */\n '--allow-mutations'?: ''\n\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The file name where results should be written, instead of STDOUT.\n * @environment SHOPIFY_FLAG_OUTPUT_FILE\n */\n '--output-file '?: string\n\n /**\n * The GraphQL query or mutation, as a string.\n * @environment SHOPIFY_FLAG_QUERY\n */\n '-q, --query '?: string\n\n /**\n * Path to a file containing the GraphQL query or mutation. Can't be used with --query.\n * @environment SHOPIFY_FLAG_QUERY_FILE\n */\n '--query-file '?: string\n\n /**\n * The myshopify.com domain of the store to execute against.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.\n * @environment SHOPIFY_FLAG_VARIABLE_FILE\n */\n '--variable-file '?: string\n\n /**\n * The values for any GraphQL variables in your query or mutation, in JSON format.\n * @environment SHOPIFY_FLAG_VARIABLES\n */\n '-v, --variables '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n\n /**\n * The API version to use for the query or mutation. Defaults to the latest stable version.\n * @environment SHOPIFY_FLAG_VERSION\n */\n '--version '?: string\n}" + "value": "export interface storeexecute {\n /**\n * Allow GraphQL mutations to run against the target store.\n * @environment SHOPIFY_FLAG_ALLOW_MUTATIONS\n */\n '--allow-mutations'?: ''\n\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The file name where results should be written, instead of STDOUT.\n * @environment SHOPIFY_FLAG_OUTPUT_FILE\n */\n '--output-file '?: string\n\n /**\n * The GraphQL query or mutation, as a string.\n * @environment SHOPIFY_FLAG_QUERY\n */\n '-q, --query '?: string\n\n /**\n * Path to a file containing the GraphQL query or mutation. Can't be used with --query.\n * @environment SHOPIFY_FLAG_QUERY_FILE\n */\n '--query-file '?: string\n\n /**\n * The myshopify.com domain of the store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.\n * @environment SHOPIFY_FLAG_VARIABLE_FILE\n */\n '--variable-file '?: string\n\n /**\n * The values for any GraphQL variables in your query or mutation, in JSON format.\n * @environment SHOPIFY_FLAG_VARIABLES\n */\n '-v, --variables '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n\n /**\n * The API version to use for the query or mutation. Defaults to the latest stable version.\n * @environment SHOPIFY_FLAG_VERSION\n */\n '--version '?: string\n}" } }, "storeinfo": { @@ -4332,11 +4332,11 @@ "syntaxKind": "PropertySignature", "name": "-s, --store ", "value": "string", - "description": "The myshopify.com domain of the store to inspect.", + "description": "The myshopify.com domain of the store.", "environmentValue": "SHOPIFY_FLAG_STORE" } ], - "value": "export interface storeinfo {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The myshopify.com domain of the store to inspect.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface storeinfo {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The myshopify.com domain of the store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } }, "themecheck": { diff --git a/packages/cli/README.md b/packages/cli/README.md index 79e4e2c737d..f321ec848c8 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -2111,8 +2111,7 @@ USAGE FLAGS -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color output. - -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store to authenticate - against. + -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store. --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. --scopes= (required) [env: SHOPIFY_FLAG_SCOPES] Comma-separated Admin API scopes to request for the app. --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. @@ -2143,8 +2142,7 @@ USAGE FLAGS -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color output. -q, --query= [env: SHOPIFY_FLAG_QUERY] The GraphQL query or mutation, as a string. - -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store to execute - against. + -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store. -v, --variables= [env: SHOPIFY_FLAG_VARIABLES] The values for any GraphQL variables in your query or mutation, in JSON format. --allow-mutations [env: SHOPIFY_FLAG_ALLOW_MUTATIONS] Allow GraphQL mutations to run against the target @@ -2189,7 +2187,7 @@ USAGE FLAGS -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color output. - -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store to inspect. + -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store. --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index f98d2005834..bfa9a24030a 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -5710,7 +5710,7 @@ }, "store": { "char": "s", - "description": "The myshopify.com domain of the store to authenticate against.", + "description": "The myshopify.com domain of the store.", "env": "SHOPIFY_FLAG_STORE", "hasDynamicHelp": false, "multiple": false, @@ -5804,7 +5804,7 @@ }, "store": { "char": "s", - "description": "The myshopify.com domain of the store to execute against.", + "description": "The myshopify.com domain of the store.", "env": "SHOPIFY_FLAG_STORE", "hasDynamicHelp": false, "multiple": false, @@ -5895,7 +5895,7 @@ }, "store": { "char": "s", - "description": "The myshopify.com domain of the store to inspect.", + "description": "The myshopify.com domain of the store.", "env": "SHOPIFY_FLAG_STORE", "hasDynamicHelp": false, "multiple": false, diff --git a/packages/store/src/cli/commands/store/auth.ts b/packages/store/src/cli/commands/store/auth.ts index 9a7c0eb2fdf..e78e594e1d3 100644 --- a/packages/store/src/cli/commands/store/auth.ts +++ b/packages/store/src/cli/commands/store/auth.ts @@ -1,8 +1,8 @@ import {authenticateStoreWithApp} from '../../services/store/auth/index.js' import {createStoreAuthPresenter} from '../../services/store/auth/result.js' import StoreCommand from '../../utilities/store-command.js' +import {storeFlags} from '../../flags.js' import {globalFlags, jsonFlag} from '@shopify/cli-kit/node/cli' -import {normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn' import {Flags} from '@oclif/core' export default class StoreAuth extends StoreCommand { @@ -22,13 +22,7 @@ Re-run this command if the stored token is missing, expires, or no longer has th static flags = { ...globalFlags, ...jsonFlag, - store: Flags.string({ - char: 's', - description: 'The myshopify.com domain of the store to authenticate against.', - env: 'SHOPIFY_FLAG_STORE', - parse: async (input) => normalizeStoreFqdn(input), - required: true, - }), + store: storeFlags.store, scopes: Flags.string({ description: 'Comma-separated Admin API scopes to request for the app.', env: 'SHOPIFY_FLAG_SCOPES', diff --git a/packages/store/src/cli/commands/store/execute.ts b/packages/store/src/cli/commands/store/execute.ts index e3f0bd3fc3b..f1648d232d4 100644 --- a/packages/store/src/cli/commands/store/execute.ts +++ b/packages/store/src/cli/commands/store/execute.ts @@ -1,8 +1,8 @@ import {executeStoreOperation} from '../../services/store/execute/index.js' import {writeOrOutputStoreExecuteResult} from '../../services/store/execute/result.js' import StoreCommand from '../../utilities/store-command.js' +import {storeFlags} from '../../flags.js' import {globalFlags, jsonFlag} from '@shopify/cli-kit/node/cli' -import {normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn' import {resolvePath} from '@shopify/cli-kit/node/path' import {Flags} from '@oclif/core' @@ -52,13 +52,7 @@ Mutations are disabled by default. Re-run with \`--allow-mutations\` if you inte parse: async (input) => resolvePath(input), exclusive: ['variables'], }), - store: Flags.string({ - char: 's', - description: 'The myshopify.com domain of the store to execute against.', - env: 'SHOPIFY_FLAG_STORE', - parse: async (input) => normalizeStoreFqdn(input), - required: true, - }), + store: storeFlags.store, version: Flags.string({ description: 'The API version to use for the query or mutation. Defaults to the latest stable version.', env: 'SHOPIFY_FLAG_VERSION', diff --git a/packages/store/src/cli/commands/store/info.ts b/packages/store/src/cli/commands/store/info.ts index 3f46460a857..8c66a1925b6 100644 --- a/packages/store/src/cli/commands/store/info.ts +++ b/packages/store/src/cli/commands/store/info.ts @@ -1,9 +1,8 @@ import {getStoreInfo} from '../../services/store/info/index.js' import {renderStoreInfoResult} from '../../services/store/info/result.js' import StoreCommand from '../../utilities/store-command.js' +import {storeFlags} from '../../flags.js' import {globalFlags, jsonFlag} from '@shopify/cli-kit/node/cli' -import {normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn' -import {Flags} from '@oclif/core' export default class StoreInfo extends StoreCommand { static summary = 'Surface metadata about a Shopify store.' @@ -25,13 +24,7 @@ Backend failures degrade gracefully: a single failing call populates \`_field_er static flags = { ...globalFlags, ...jsonFlag, - store: Flags.string({ - char: 's', - description: 'The myshopify.com domain of the store to inspect.', - env: 'SHOPIFY_FLAG_STORE', - parse: async (input) => normalizeStoreFqdn(input), - required: true, - }), + store: storeFlags.store, } public async run(): Promise { diff --git a/packages/store/src/cli/flags.ts b/packages/store/src/cli/flags.ts new file mode 100644 index 00000000000..541d7ecda73 --- /dev/null +++ b/packages/store/src/cli/flags.ts @@ -0,0 +1,12 @@ +import {normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn' +import {Flags} from '@oclif/core' + +export const storeFlags = { + store: Flags.string({ + char: 's', + description: 'The myshopify.com domain of the store.', + env: 'SHOPIFY_FLAG_STORE', + parse: async (input) => normalizeStoreFqdn(input), + required: true, + }), +} From e93ae378766a2a372326ec33e8aa1a53ae3693b2 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 21:55:30 +0300 Subject: [PATCH 05/21] Fix store info shop matching against BP URL fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BP's Destinations + Organizations APIs return primaryDomain/webUrl as full URLs with scheme ("https://shop.myshopify.com"), not bare hosts. Strict string equality against the requested store FQDN missed every real shop. They also return `handle: null` and a non-subdomain `shortName` (e.g. "ACT"), so admin_url construction had nothing to work with. - Extract host from URL fields before comparing (new info/host.ts). - Derive the canonical myshopify subdomain from primaryDomain/webUrl and overwrite destination.handle with it so admin_url is built from the actual shop subdomain. - Use primaryDomain (storefront URL) for primary_url instead of webUrl/url (both are admin URLs ending in /admin). - Drop the misleading `url` field from OrganizationShopFields and the Org GraphQL selection — it's the admin URL, not the storefront. - Correct features.branding type from boolean to string (it's an enum like "SHOPIFY", not a flag). Verified live against ariel-caplan-test: Tier 1, 2, and 3 all populate. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../src/cli/services/store/info/admin-shop.ts | 2 +- .../services/store/info/destinations.test.ts | 56 +++++++++++++++++-- .../cli/services/store/info/destinations.ts | 27 ++++++++- .../store/src/cli/services/store/info/host.ts | 16 ++++++ .../src/cli/services/store/info/index.test.ts | 7 +-- .../src/cli/services/store/info/index.ts | 2 +- .../store/info/organization-shop.test.ts | 7 +-- .../services/store/info/organization-shop.ts | 5 +- .../src/cli/services/store/info/types.ts | 3 +- 9 files changed, 103 insertions(+), 22 deletions(-) create mode 100644 packages/store/src/cli/services/store/info/host.ts diff --git a/packages/store/src/cli/services/store/info/admin-shop.ts b/packages/store/src/cli/services/store/info/admin-shop.ts index a82881c29a9..f077cbaed00 100644 --- a/packages/store/src/cli/services/store/info/admin-shop.ts +++ b/packages/store/src/cli/services/store/info/admin-shop.ts @@ -30,7 +30,7 @@ interface AdminShopResponse { storefront?: boolean | null shopifyPlus?: boolean | null harmonizedSystemCode?: boolean | null - branding?: boolean | null + branding?: string | null } | null } } diff --git a/packages/store/src/cli/services/store/info/destinations.test.ts b/packages/store/src/cli/services/store/info/destinations.test.ts index 4c96f7975f7..f6835ceaf55 100644 --- a/packages/store/src/cli/services/store/info/destinations.test.ts +++ b/packages/store/src/cli/services/store/info/destinations.test.ts @@ -17,8 +17,8 @@ function destinationNode(overrides: Record = {}) { name: 'Shop', handle: 'shop', shortName: 'shop', - primaryDomain: SHOP, - webUrl: `https://${SHOP}`, + primaryDomain: `https://${SHOP}`, + webUrl: `https://${SHOP}/admin`, status: 'ACTIVE', accountStatus: 'ACTIVE', isAppDevelopment: false, @@ -46,7 +46,14 @@ describe('fetchDestinationsContext', () => { test('throws AbortError when domain match is missing from results', async () => { vi.mocked(businessPlatformRequest).mockResolvedValueOnce({ currentUserAccount: { - destinations: {nodes: [destinationNode({primaryDomain: 'other.myshopify.com'})]}, + destinations: { + nodes: [ + destinationNode({ + primaryDomain: 'https://other.myshopify.com', + webUrl: 'https://other.myshopify.com/admin', + }), + ], + }, }, } as DestinationsQueryResponse) @@ -55,6 +62,45 @@ describe('fetchDestinationsContext', () => { expect((err as AbortError).message).toContain(SHOP) }) + test('derives canonical myshopify handle from primaryDomain when BP returns handle: null', async () => { + vi.mocked(businessPlatformRequest) + .mockResolvedValueOnce({ + currentUserAccount: { + destinations: { + nodes: [ + destinationNode({ + handle: null, + shortName: 'ACT', + primaryDomain: `https://${SHOP}`, + webUrl: `https://${SHOP}/admin`, + }), + ], + }, + }, + } as DestinationsQueryResponse) + .mockResolvedValueOnce({ + currentUserAccount: {organizationForDestination: {id: 'gid', name: 'Org'}}, + } as OrganizationForDestinationResponse) + + const ctx = await fetchDestinationsContext({store: SHOP}) + + expect(ctx.destination.handle).toBe('shop') + }) + + test('searches BP with the subdomain rather than the full FQDN', async () => { + vi.mocked(businessPlatformRequest) + .mockResolvedValueOnce({ + currentUserAccount: {destinations: {nodes: [destinationNode()]}}, + } as DestinationsQueryResponse) + .mockResolvedValueOnce({ + currentUserAccount: {organizationForDestination: {id: 'gid', name: 'Org'}}, + } as OrganizationForDestinationResponse) + + await fetchDestinationsContext({store: SHOP}) + + expect(vi.mocked(businessPlatformRequest).mock.calls[0]?.[2]).toEqual({search: 'shop'}) + }) + test('returns destination + owning org on success', async () => { vi.mocked(businessPlatformRequest) .mockResolvedValueOnce({ @@ -71,7 +117,7 @@ describe('fetchDestinationsContext', () => { const ctx = await fetchDestinationsContext({store: SHOP}) - expect(ctx.destination.primaryDomain).toBe(SHOP) + expect(ctx.destination.primaryDomain).toBe(`https://${SHOP}`) expect(ctx.owningOrg).toEqual({name: 'Acme Org', id: '123'}) expect(ctx.owningOrgError).toBeUndefined() }) @@ -85,7 +131,7 @@ describe('fetchDestinationsContext', () => { const ctx = await fetchDestinationsContext({store: SHOP}) - expect(ctx.destination.primaryDomain).toBe(SHOP) + expect(ctx.destination.primaryDomain).toBe(`https://${SHOP}`) expect(ctx.owningOrg).toBeUndefined() expect(ctx.owningOrgError).toEqual({ source: 'bp_destinations', diff --git a/packages/store/src/cli/services/store/info/destinations.ts b/packages/store/src/cli/services/store/info/destinations.ts index 4427b0506e6..3e93375b90b 100644 --- a/packages/store/src/cli/services/store/info/destinations.ts +++ b/packages/store/src/cli/services/store/info/destinations.ts @@ -1,3 +1,4 @@ +import {extractHost, extractMyshopifyHandle} from './host.js' import {AbortError} from '@shopify/cli-kit/node/error' import {businessPlatformRequest} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' @@ -61,20 +62,33 @@ export interface FetchDestinationsContextOptions { export async function fetchDestinationsContext(options: FetchDestinationsContextOptions): Promise { const token = options.token ?? (await ensureAuthenticatedBusinessPlatform()) + // BP's destinations.search matches against handle/name; using the subdomain widens the hit + // rate vs. passing the full FQDN. + const lowerStore = options.store.toLowerCase() + const subdomain = lowerStore.replace(/\.myshopify\.com$/, '') + const response = await businessPlatformRequest(DESTINATIONS_QUERY, token, { - search: options.store, + search: subdomain, }) const nodes = response.currentUserAccount?.destinations.nodes ?? [] - const matched = nodes.find((node) => node.primaryDomain?.toLowerCase() === options.store.toLowerCase()) + const matchedNode = nodes.find((node) => matchesStore(node, lowerStore)) - if (!matched) { + if (!matchedNode) { throw new AbortError( `Couldn't find a store with domain ${options.store} for the current account.`, 'Verify the domain (must be the canonical `myshopify.com` FQDN) and that your business-platform session has access to it. Inactive shops are not searchable in v1 of this command.', ) } + // BP returns `handle: null` and a non-subdomain `shortName` for many shops; derive the + // canonical myshopify handle from the URL fields so admin_url construction works. + const canonicalHandle = extractMyshopifyHandle(matchedNode.primaryDomain) ?? extractMyshopifyHandle(matchedNode.webUrl) + const matched: DestinationNode = { + ...matchedNode, + handle: canonicalHandle ?? matchedNode.handle, + } + let owningOrg: StoreInfoOwningOrg | undefined let owningOrgError: StoreInfoFieldError | undefined @@ -111,6 +125,13 @@ export async function fetchDestinationsContext(options: FetchDestinationsContext } } +function matchesStore(node: DestinationNode, lowerStore: string): boolean { + // BP returns URL strings (sometimes with scheme, sometimes bare) in primaryDomain/webUrl; + // extract the hostname and compare. handle/shortName are unreliable (often null or an + // abbreviation rather than the myshopify subdomain). + return [node.primaryDomain, node.webUrl].some((value) => extractHost(value) === lowerStore) +} + function decodeOrganizationGid(gid: string): string | undefined { // Org ids come back as base64-encoded GraphQL global ids: "gid://organization/Organization/123". // We want the bare numeric id; if the shape doesn't match, fall back to the raw value. diff --git a/packages/store/src/cli/services/store/info/host.ts b/packages/store/src/cli/services/store/info/host.ts new file mode 100644 index 00000000000..5ab00cbe8c1 --- /dev/null +++ b/packages/store/src/cli/services/store/info/host.ts @@ -0,0 +1,16 @@ +export function extractHost(value: string | null | undefined): string | undefined { + if (!value) return undefined + const lowered = value.toLowerCase() + try { + return new URL(lowered).hostname + } catch { + return lowered.replace(/^https?:\/\//, '').split('/')[0] + } +} + +export function extractMyshopifyHandle(value: string | null | undefined): string | undefined { + const host = extractHost(value) + if (!host) return undefined + const match = host.match(/^([^.]+)\.myshopify\.com$/) + return match ? match[1] : undefined +} diff --git a/packages/store/src/cli/services/store/info/index.test.ts b/packages/store/src/cli/services/store/info/index.test.ts index 059ec524f92..8c3a0459de8 100644 --- a/packages/store/src/cli/services/store/info/index.test.ts +++ b/packages/store/src/cli/services/store/info/index.test.ts @@ -21,8 +21,8 @@ function destination(overrides: Partial = {}): DestinationNode name: 'My Shop', handle: 'my-shop', shortName: 'my-shop', - primaryDomain: SHOP, - webUrl: `https://${SHOP}`, + primaryDomain: `https://${SHOP}`, + webUrl: `https://${SHOP}/admin`, status: 'ACTIVE', accountStatus: 'ACTIVE', isAppDevelopment: false, @@ -37,7 +37,7 @@ function orgShop(overrides: Record = {}) { externalId: 'ext-1', shopifyShopId: '12345', name: 'My Shop (Org)', - primaryDomain: SHOP, + primaryDomain: `https://${SHOP}`, storeType: 'PRODUCTION', status: 'active', planName: 'Basic', @@ -46,7 +46,6 @@ function orgShop(overrides: Record = {}) { createdAt: '2025-01-01T00:00:00.000Z', isMainShop: true, shortName: 'my-shop', - url: `https://${SHOP}`, ...overrides, } } diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index e7377f6408e..d3911cc5f89 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -104,7 +104,7 @@ function buildResult(args: BuildResultArgs): StoreInfoResult { shop_id: destination.id, store_type: orgShop?.storeType ?? (destination.isAppDevelopment ? 'DEVELOPMENT' : undefined), status: orgShop?.status ?? destination.status, - primary_url: orgShop?.url ?? destination.webUrl, + primary_url: orgShop?.primaryDomain ?? destination.primaryDomain ?? undefined, admin_url: buildAdminUrl(destination.handle ?? destination.shortName ?? undefined), owning_org: destinationsCtx.owningOrg, plan: orgShop ? buildPlan(orgShop) : undefined, diff --git a/packages/store/src/cli/services/store/info/organization-shop.test.ts b/packages/store/src/cli/services/store/info/organization-shop.test.ts index 9f582495c3c..8ecd70b0326 100644 --- a/packages/store/src/cli/services/store/info/organization-shop.test.ts +++ b/packages/store/src/cli/services/store/info/organization-shop.test.ts @@ -17,7 +17,7 @@ function shopNode(overrides: Record = {}) { externalId: 'public-1', shopifyShopId: '9999', name: 'My Shop', - primaryDomain: SHOP, + primaryDomain: `https://${SHOP}`, storeType: 'PRODUCTION', status: 'active', planName: 'Basic', @@ -26,7 +26,6 @@ function shopNode(overrides: Record = {}) { createdAt: '2025-01-01T00:00:00.000Z', isMainShop: true, shortName: 'my-shop', - url: `https://${SHOP}`, ...overrides, } } @@ -48,7 +47,7 @@ describe('fetchOrganizationShop', () => { const shop = await fetchOrganizationShop({store: SHOP, organizationId: ORG_ID}) expect(shop.shopifyShopId).toBe('9999') - expect(shop.primaryDomain).toBe(SHOP) + expect(shop.primaryDomain).toBe(`https://${SHOP}`) }) test('throws BugError when no shop matches the domain', async () => { @@ -56,7 +55,7 @@ describe('fetchOrganizationShop', () => { organization: { id: 'gid', name: 'Acme', - accessibleShops: {edges: [{node: shopNode({primaryDomain: 'other.myshopify.com'})}]}, + accessibleShops: {edges: [{node: shopNode({primaryDomain: 'https://other.myshopify.com'})}]}, }, } as OrganizationShopResponse) diff --git a/packages/store/src/cli/services/store/info/organization-shop.ts b/packages/store/src/cli/services/store/info/organization-shop.ts index 2b28733bf1b..806eb264a57 100644 --- a/packages/store/src/cli/services/store/info/organization-shop.ts +++ b/packages/store/src/cli/services/store/info/organization-shop.ts @@ -1,3 +1,4 @@ +import {extractHost} from './host.js' import {BugError} from '@shopify/cli-kit/node/error' import {businessPlatformOrganizationsRequest} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' @@ -24,7 +25,6 @@ const ORGANIZATION_SHOP_QUERY = ` createdAt isMainShop shortName - url } } } @@ -71,7 +71,8 @@ export async function fetchOrganizationShop( }) const edges = response.organization?.accessibleShops?.edges ?? [] - const matched = edges.map((edge) => edge.node).find((node) => node.primaryDomain?.toLowerCase() === options.store.toLowerCase()) + const lowerStore = options.store.toLowerCase() + const matched = edges.map((edge) => edge.node).find((node) => extractHost(node.primaryDomain) === lowerStore) if (!matched) { throw new BugError( diff --git a/packages/store/src/cli/services/store/info/types.ts b/packages/store/src/cli/services/store/info/types.ts index c0cbbac1078..b1cb7355922 100644 --- a/packages/store/src/cli/services/store/info/types.ts +++ b/packages/store/src/cli/services/store/info/types.ts @@ -9,7 +9,7 @@ export interface StoreInfoFeatures { storefront?: boolean shopifyPlus?: boolean harmonizedSystemCode?: boolean - branding?: boolean + branding?: string } export interface StoreInfoOwningOrg { @@ -95,7 +95,6 @@ export interface OrganizationShopFields { createdAt?: string isMainShop?: boolean shortName?: string - url?: string } export type AdminShopFetchOutcome = From ef344439721a1b4fab062f1427dae294539e2076 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 22:55:53 +0300 Subject: [PATCH 06/21] Humanize labels and enum values in store info text output Keys render as "Store Type" instead of "store_type", and GraphQL enum strings like APP_DEVELOPMENT render as "App Development". Currency codes like USD pass through unchanged. --- .../src/cli/services/store/info/result.ts | 56 +++++++++++++------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/packages/store/src/cli/services/store/info/result.ts b/packages/store/src/cli/services/store/info/result.ts index 13488adfef3..220fea3491e 100644 --- a/packages/store/src/cli/services/store/info/result.ts +++ b/packages/store/src/cli/services/store/info/result.ts @@ -1,10 +1,13 @@ import type {StoreInfoFieldError, StoreInfoResult} from './types.js' import {outputResult} from '@shopify/cli-kit/node/output' import {renderInfo} from '@shopify/cli-kit/node/ui' +import {capitalizeWords, formatLocalDate} from '@shopify/cli-kit/common/string' import type {AlertCustomSection} from '@shopify/cli-kit/node/ui' export type StoreInfoOutputFormat = 'text' | 'json' +const DATE_FIELDS = new Set(['created_at', 'last_access']) + export function renderStoreInfoResult(result: StoreInfoResult, format: StoreInfoOutputFormat): void { if (format === 'json') { outputResult(JSON.stringify(result, null, 2)) @@ -52,7 +55,7 @@ function buildTextSections(result: StoreInfoResult): AlertCustomSection[] { function identityItems(result: StoreInfoResult): string[] { const items: string[] = [] - items.push(`shop_domain: ${result.shop_domain}`) + items.push(line('shop_domain', result.shop_domain)) pushIfPresent(items, 'display_name', result.display_name) pushIfPresent(items, 'shop_id', result.shop_id) pushIfPresent(items, 'store_type', result.store_type) @@ -63,49 +66,68 @@ function identityItems(result: StoreInfoResult): string[] { const orgLine = result.owning_org.id ? `${result.owning_org.name} (id: ${result.owning_org.id})` : result.owning_org.name - items.push(`owning_org: ${orgLine}`) + items.push(line('owning_org', orgLine)) } - items.push(`auth_status: ${formatAuthStatus(result.auth_status)}`) + items.push(line('auth_status', formatAuthStatus(result.auth_status))) return items } function tier2Items(result: StoreInfoResult): string[] { const items: string[] = [] if (result.plan) { - const planText = [result.plan.name, result.plan.variant].filter(Boolean).join(' / ') - if (planText) items.push(`plan: ${planText}`) + const planText = [result.plan.name, result.plan.variant] + .filter((value): value is string => Boolean(value)) + .map(capitalizeWords) + .join(' / ') + if (planText) items.push(line('plan', planText)) } pushIfPresent(items, 'shopify_shop_id', result.shopify_shop_id) pushIfPresent(items, 'billing_currency', result.billing_currency) pushIfPresent(items, 'created_at', result.created_at) pushIfPresent(items, 'last_access', result.last_access) - if (result.is_main_shop != null) items.push(`is_main_shop: ${String(result.is_main_shop)}`) + if (result.is_main_shop != null) items.push(line('is_main_shop', formatValue(result.is_main_shop))) return items } function tier3Items(result: StoreInfoResult): string[] { const items: string[] = [] - if (result.shop_owner?.name) items.push(`shop_owner: ${result.shop_owner.name}`) + if (result.shop_owner?.name) items.push(line('shop_owner', result.shop_owner.name)) pushIfPresent(items, 'timezone', result.timezone) - if (result.setup_required != null) items.push(`setup_required: ${String(result.setup_required)}`) - if (result.features && Object.keys(result.features).length > 0) { - const featureText = Object.entries(result.features) - .map(([key, value]) => `${key}=${String(value)}`) - .join(', ') - items.push(`features: ${featureText}`) + if (result.setup_required != null) items.push(line('setup_required', formatValue(result.setup_required))) + if (result.features) { + for (const [key, value] of Object.entries(result.features)) { + items.push(`${capitalizeWords(key)}: ${formatValue(value)}`) + } } return items } function fieldErrorItems(errors: Record): string[] { - return Object.entries(errors).map(([field, err]) => `${field} [${err.source}]: ${err.reason}`) + return Object.entries(errors).map(([field, err]) => `${capitalizeWords(field)} [${err.source}]: ${err.reason}`) +} + +function pushIfPresent(items: string[], key: string, value: string | undefined): void { + if (value) items.push(line(key, formatValue(value, key))) } -function pushIfPresent(items: string[], label: string, value: string | undefined): void { - if (value) items.push(`${label}: ${value}`) +function line(key: string, value: string): string { + return `${capitalizeWords(key)}: ${value}` +} + +function formatValue(value: unknown, key?: string): string { + if (typeof value === 'boolean') return value ? 'Yes' : 'No' + if (typeof value === 'string') { + if (key && DATE_FIELDS.has(key)) return formatLocalDate(value) + // GraphQL enum values like APP_DEVELOPMENT → "App Development". Skip short all-caps + // tokens (USD, ID) that are conventionally codes, not enums. + if (/^[A-Z][A-Z0-9_]*$/.test(value) && (value.includes('_') || value.length > 4)) { + return capitalizeWords(value) + } + } + return String(value) } function formatAuthStatus(auth: StoreInfoResult['auth_status']): string { if (!auth.authed) return 'not authenticated' - return auth.expires_at ? `authenticated (expires ${auth.expires_at})` : 'authenticated' + return auth.expires_at ? `authenticated (expires ${formatLocalDate(auth.expires_at)})` : 'authenticated' } From ce17561f3df873e68129b050e7aee7a3822f5601 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:04:59 +0300 Subject: [PATCH 07/21] Drop internal IDs and is_main_shop from store info output CLI commands take --store as a domain, so BP/Core shop IDs and the owning-org id have no follow-on use for users of this command. is_main_shop is a billing-contract internal that almost no user cares about. Removed from both text and JSON output; org id is kept as an internal-only type to drive the BP Organizations request. --- .../src/cli/services/store/info/destinations.ts | 4 ++-- .../src/cli/services/store/info/index.test.ts | 13 +++---------- .../store/src/cli/services/store/info/index.ts | 11 +++++------ .../store/info/organization-shop.test.ts | 6 +----- .../services/store/info/organization-shop.ts | 4 ---- .../src/cli/services/store/info/result.test.ts | 17 +++++------------ .../store/src/cli/services/store/info/result.ts | 10 +--------- .../store/src/cli/services/store/info/types.ts | 17 +++++++++-------- 8 files changed, 26 insertions(+), 56 deletions(-) diff --git a/packages/store/src/cli/services/store/info/destinations.ts b/packages/store/src/cli/services/store/info/destinations.ts index 3e93375b90b..8c4a1decb68 100644 --- a/packages/store/src/cli/services/store/info/destinations.ts +++ b/packages/store/src/cli/services/store/info/destinations.ts @@ -2,7 +2,7 @@ import {extractHost, extractMyshopifyHandle} from './host.js' import {AbortError} from '@shopify/cli-kit/node/error' import {businessPlatformRequest} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' -import type {DestinationNode, DestinationsContext, StoreInfoFieldError, StoreInfoOwningOrg} from './types.js' +import type {DestinationNode, DestinationsContext, OwningOrgInternal, StoreInfoFieldError} from './types.js' const DESTINATIONS_QUERY = ` query StoreInfoDestinations($search: String!) { @@ -89,7 +89,7 @@ export async function fetchDestinationsContext(options: FetchDestinationsContext handle: canonicalHandle ?? matchedNode.handle, } - let owningOrg: StoreInfoOwningOrg | undefined + let owningOrg: OwningOrgInternal | undefined let owningOrgError: StoreInfoFieldError | undefined try { diff --git a/packages/store/src/cli/services/store/info/index.test.ts b/packages/store/src/cli/services/store/info/index.test.ts index 8c3a0459de8..1fcd4d8b979 100644 --- a/packages/store/src/cli/services/store/info/index.test.ts +++ b/packages/store/src/cli/services/store/info/index.test.ts @@ -33,9 +33,6 @@ function destination(overrides: Partial = {}): DestinationNode function orgShop(overrides: Record = {}) { return { - id: 'gid-shop', - externalId: 'ext-1', - shopifyShopId: '12345', name: 'My Shop (Org)', primaryDomain: `https://${SHOP}`, storeType: 'PRODUCTION', @@ -44,7 +41,6 @@ function orgShop(overrides: Record = {}) { planVariantName: 'monthly', billingCurrency: 'USD', createdAt: '2025-01-01T00:00:00.000Z', - isMainShop: true, shortName: 'my-shop', ...overrides, } @@ -73,16 +69,13 @@ describe('getStoreInfo', () => { expect(result.shop_domain).toBe(SHOP) expect(result.display_name).toBe('My Shop (Org)') - expect(result.shop_id).toBe('gid-dest') expect(result.store_type).toBe('PRODUCTION') expect(result.status).toBe('active') expect(result.primary_url).toBe(`https://${SHOP}`) expect(result.admin_url).toBe('https://admin.shopify.com/store/my-shop') - expect(result.owning_org).toEqual({name: 'Acme', id: '42'}) + expect(result.owning_org).toEqual({name: 'Acme'}) expect(result.plan).toEqual({name: 'Basic', variant: 'monthly'}) - expect(result.shopify_shop_id).toBe('12345') expect(result.billing_currency).toBe('USD') - expect(result.is_main_shop).toBe(true) expect(result.last_access).toBe('2026-05-20T00:00:00.000Z') expect(result.auth_status).toEqual({authed: false, source: 'store-auth'}) expect(result._field_errors).toBeUndefined() @@ -98,11 +91,11 @@ describe('getStoreInfo', () => { const result = await getStoreInfo({store: SHOP, verbose: false}) - expect(result.shopify_shop_id).toBeUndefined() expect(result.plan).toBeUndefined() + expect(result.billing_currency).toBeUndefined() expect(result._field_errors?.plan?.source).toBe('bp_organizations') expect(result._field_errors?.plan?.reason).toContain('5xx') - expect(result._field_errors?.shopify_shop_id).toBeDefined() + expect(result._field_errors?.billing_currency).toBeDefined() }) test('records _field_errors when owning org id is unknown (skips org-shop)', async () => { diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index d3911cc5f89..10b8e5ffec9 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -63,7 +63,7 @@ async function safeFetchOrganizationShop( // Without an org id we can't address the BP Organizations API. Surface the reason on // every Tier-2 field that depends on it so the caller sees why each is missing. const reason = ctx.owningOrgError?.reason ?? 'Owning organization id is unknown.' - for (const field of ['plan', 'shopify_shop_id', 'billing_currency', 'created_at', 'is_main_shop']) { + for (const field of TIER_2_ORG_FIELDS) { fieldErrors[field] = {source: 'bp_organizations', reason} } return undefined @@ -73,13 +73,15 @@ async function safeFetchOrganizationShop( // eslint-disable-next-line no-catch-all/no-catch-all } catch (error) { const reason = `Request failed: ${buildErrorReason(error)}` - for (const field of ['plan', 'shopify_shop_id', 'billing_currency', 'created_at', 'is_main_shop']) { + for (const field of TIER_2_ORG_FIELDS) { fieldErrors[field] = {source: 'bp_organizations', reason} } return undefined } } +const TIER_2_ORG_FIELDS = ['plan', 'billing_currency', 'created_at'] as const + interface BuildResultArgs { store: string destinationsCtx: DestinationsContext @@ -101,17 +103,14 @@ function buildResult(args: BuildResultArgs): StoreInfoResult { const baseFields: Partial = { shop_domain: store, display_name: orgShop?.name ?? destination.name, - shop_id: destination.id, store_type: orgShop?.storeType ?? (destination.isAppDevelopment ? 'DEVELOPMENT' : undefined), status: orgShop?.status ?? destination.status, primary_url: orgShop?.primaryDomain ?? destination.primaryDomain ?? undefined, admin_url: buildAdminUrl(destination.handle ?? destination.shortName ?? undefined), - owning_org: destinationsCtx.owningOrg, + owning_org: destinationsCtx.owningOrg ? {name: destinationsCtx.owningOrg.name} : undefined, plan: orgShop ? buildPlan(orgShop) : undefined, - shopify_shop_id: orgShop?.shopifyShopId, billing_currency: orgShop?.billingCurrency, created_at: orgShop?.createdAt, - is_main_shop: orgShop?.isMainShop, last_access: destination.lastAccess ?? undefined, } diff --git a/packages/store/src/cli/services/store/info/organization-shop.test.ts b/packages/store/src/cli/services/store/info/organization-shop.test.ts index 8ecd70b0326..015a4e0ce92 100644 --- a/packages/store/src/cli/services/store/info/organization-shop.test.ts +++ b/packages/store/src/cli/services/store/info/organization-shop.test.ts @@ -13,9 +13,6 @@ const ORG_ID = '123' function shopNode(overrides: Record = {}) { return { - id: 'gid://shop/Shop/1', - externalId: 'public-1', - shopifyShopId: '9999', name: 'My Shop', primaryDomain: `https://${SHOP}`, storeType: 'PRODUCTION', @@ -24,7 +21,6 @@ function shopNode(overrides: Record = {}) { planVariantName: 'monthly', billingCurrency: 'USD', createdAt: '2025-01-01T00:00:00.000Z', - isMainShop: true, shortName: 'my-shop', ...overrides, } @@ -46,7 +42,7 @@ describe('fetchOrganizationShop', () => { } as OrganizationShopResponse) const shop = await fetchOrganizationShop({store: SHOP, organizationId: ORG_ID}) - expect(shop.shopifyShopId).toBe('9999') + expect(shop.name).toBe('My Shop') expect(shop.primaryDomain).toBe(`https://${SHOP}`) }) diff --git a/packages/store/src/cli/services/store/info/organization-shop.ts b/packages/store/src/cli/services/store/info/organization-shop.ts index 806eb264a57..ea2c1337962 100644 --- a/packages/store/src/cli/services/store/info/organization-shop.ts +++ b/packages/store/src/cli/services/store/info/organization-shop.ts @@ -12,9 +12,6 @@ const ORGANIZATION_SHOP_QUERY = ` accessibleShops(first: 5, search: $search) { edges { node { - id - externalId - shopifyShopId name primaryDomain storeType @@ -23,7 +20,6 @@ const ORGANIZATION_SHOP_QUERY = ` planVariantName billingCurrency createdAt - isMainShop shortName } } diff --git a/packages/store/src/cli/services/store/info/result.test.ts b/packages/store/src/cli/services/store/info/result.test.ts index 7a0b538eb2e..c28d15f65b6 100644 --- a/packages/store/src/cli/services/store/info/result.test.ts +++ b/packages/store/src/cli/services/store/info/result.test.ts @@ -11,7 +11,6 @@ function baseResult(overrides: Partial = {}): StoreInfoResult { return { shop_domain: 'shop.myshopify.com', display_name: 'My Shop', - shop_id: 'gid-dest', auth_status: {authed: false, source: 'store-auth'}, ...overrides, } @@ -25,7 +24,7 @@ describe('renderStoreInfoResult', () => { test('emits JSON via outputResult when format is json', () => { renderStoreInfoResult( baseResult({ - shopify_shop_id: '99', + billing_currency: 'USD', _field_errors: {shop_owner: {source: 'cli', reason: 'not authed'}}, }), 'json', @@ -35,9 +34,8 @@ describe('renderStoreInfoResult', () => { expect(JSON.parse(payload)).toEqual({ shop_domain: 'shop.myshopify.com', display_name: 'My Shop', - shop_id: 'gid-dest', auth_status: {authed: false, source: 'store-auth'}, - shopify_shop_id: '99', + billing_currency: 'USD', _field_errors: {shop_owner: {source: 'cli', reason: 'not authed'}}, }) expect(renderInfo).not.toHaveBeenCalled() @@ -50,13 +48,11 @@ describe('renderStoreInfoResult', () => { status: 'active', primary_url: 'https://shop.myshopify.com', admin_url: 'https://admin.shopify.com/store/my-shop', - owning_org: {name: 'Acme', id: '42'}, + owning_org: {name: 'Acme'}, plan: {name: 'Basic', variant: 'monthly'}, - shopify_shop_id: '12345', billing_currency: 'USD', created_at: '2025-01-01T00:00:00.000Z', last_access: '2026-05-20T00:00:00.000Z', - is_main_shop: true, shop_owner: {name: 'Alice'}, timezone: 'America/New_York', features: {storefront: true, shopifyPlus: false}, @@ -69,19 +65,16 @@ describe('renderStoreInfoResult', () => { expect(JSON.parse(payload)).toEqual({ shop_domain: 'shop.myshopify.com', display_name: 'My Shop', - shop_id: 'gid-dest', store_type: 'PRODUCTION', status: 'active', primary_url: 'https://shop.myshopify.com', admin_url: 'https://admin.shopify.com/store/my-shop', - owning_org: {name: 'Acme', id: '42'}, + owning_org: {name: 'Acme'}, auth_status: {authed: true, source: 'store-auth', expires_at: '2026-12-01T00:00:00.000Z'}, plan: {name: 'Basic', variant: 'monthly'}, - shopify_shop_id: '12345', billing_currency: 'USD', created_at: '2025-01-01T00:00:00.000Z', last_access: '2026-05-20T00:00:00.000Z', - is_main_shop: true, shop_owner: {name: 'Alice'}, timezone: 'America/New_York', features: {storefront: true, shopifyPlus: false}, @@ -99,7 +92,7 @@ describe('renderStoreInfoResult', () => { test('text format includes Plan & lifecycle when Tier 2 data present', () => { renderStoreInfoResult( - baseResult({plan: {name: 'Basic'}, shopify_shop_id: '99', billing_currency: 'USD'}), + baseResult({plan: {name: 'Basic'}, billing_currency: 'USD'}), 'text', ) const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as {customSections: {title: string}[]} diff --git a/packages/store/src/cli/services/store/info/result.ts b/packages/store/src/cli/services/store/info/result.ts index 220fea3491e..0b2a9072f5d 100644 --- a/packages/store/src/cli/services/store/info/result.ts +++ b/packages/store/src/cli/services/store/info/result.ts @@ -57,17 +57,11 @@ function identityItems(result: StoreInfoResult): string[] { const items: string[] = [] items.push(line('shop_domain', result.shop_domain)) pushIfPresent(items, 'display_name', result.display_name) - pushIfPresent(items, 'shop_id', result.shop_id) pushIfPresent(items, 'store_type', result.store_type) pushIfPresent(items, 'status', result.status) pushIfPresent(items, 'primary_url', result.primary_url) pushIfPresent(items, 'admin_url', result.admin_url) - if (result.owning_org) { - const orgLine = result.owning_org.id - ? `${result.owning_org.name} (id: ${result.owning_org.id})` - : result.owning_org.name - items.push(line('owning_org', orgLine)) - } + if (result.owning_org) items.push(line('owning_org', result.owning_org.name)) items.push(line('auth_status', formatAuthStatus(result.auth_status))) return items } @@ -81,11 +75,9 @@ function tier2Items(result: StoreInfoResult): string[] { .join(' / ') if (planText) items.push(line('plan', planText)) } - pushIfPresent(items, 'shopify_shop_id', result.shopify_shop_id) pushIfPresent(items, 'billing_currency', result.billing_currency) pushIfPresent(items, 'created_at', result.created_at) pushIfPresent(items, 'last_access', result.last_access) - if (result.is_main_shop != null) items.push(line('is_main_shop', formatValue(result.is_main_shop))) return items } diff --git a/packages/store/src/cli/services/store/info/types.ts b/packages/store/src/cli/services/store/info/types.ts index b1cb7355922..1e446ec2b7d 100644 --- a/packages/store/src/cli/services/store/info/types.ts +++ b/packages/store/src/cli/services/store/info/types.ts @@ -14,6 +14,14 @@ export interface StoreInfoFeatures { export interface StoreInfoOwningOrg { name: string +} + +/** + * Internal-only org reference used to drive the BP Organizations request. + * We don't surface the organization id in `store info` output. + */ +export interface OwningOrgInternal { + name: string id?: string } @@ -36,7 +44,6 @@ export interface StoreInfoResult { // Tier 1 shop_domain: string display_name?: string - shop_id?: string store_type?: string status?: string primary_url?: string @@ -46,11 +53,9 @@ export interface StoreInfoResult { // Tier 2 plan?: StoreInfoPlan - shopify_shop_id?: string billing_currency?: string created_at?: string last_access?: string - is_main_shop?: boolean // Tier 3 (verbose + authed only) shop_owner?: StoreInfoShopOwner @@ -77,14 +82,11 @@ export interface DestinationNode { export interface DestinationsContext { destination: DestinationNode - owningOrg?: StoreInfoOwningOrg + owningOrg?: OwningOrgInternal owningOrgError?: StoreInfoFieldError } export interface OrganizationShopFields { - id?: string - externalId?: string - shopifyShopId?: string name?: string primaryDomain?: string storeType?: string @@ -93,7 +95,6 @@ export interface OrganizationShopFields { planVariantName?: string billingCurrency?: string createdAt?: string - isMainShop?: boolean shortName?: string } From a1628ff30d1df05c4895b5541801930080ea2649 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:06:46 +0300 Subject: [PATCH 08/21] Render store info dates in UTC with explicit timezone label Local-time output without a timezone is ambiguous when sharing output across regions; rendering in UTC makes timestamps unambiguous regardless of where the user is. --- packages/store/src/cli/services/store/info/result.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/store/src/cli/services/store/info/result.ts b/packages/store/src/cli/services/store/info/result.ts index 0b2a9072f5d..56e283984ab 100644 --- a/packages/store/src/cli/services/store/info/result.ts +++ b/packages/store/src/cli/services/store/info/result.ts @@ -1,7 +1,7 @@ import type {StoreInfoFieldError, StoreInfoResult} from './types.js' import {outputResult} from '@shopify/cli-kit/node/output' import {renderInfo} from '@shopify/cli-kit/node/ui' -import {capitalizeWords, formatLocalDate} from '@shopify/cli-kit/common/string' +import {capitalizeWords, formatDate} from '@shopify/cli-kit/common/string' import type {AlertCustomSection} from '@shopify/cli-kit/node/ui' export type StoreInfoOutputFormat = 'text' | 'json' @@ -109,7 +109,7 @@ function line(key: string, value: string): string { function formatValue(value: unknown, key?: string): string { if (typeof value === 'boolean') return value ? 'Yes' : 'No' if (typeof value === 'string') { - if (key && DATE_FIELDS.has(key)) return formatLocalDate(value) + if (key && DATE_FIELDS.has(key)) return formatUtcDate(value) // GraphQL enum values like APP_DEVELOPMENT → "App Development". Skip short all-caps // tokens (USD, ID) that are conventionally codes, not enums. if (/^[A-Z][A-Z0-9_]*$/.test(value) && (value.includes('_') || value.length > 4)) { @@ -121,5 +121,9 @@ function formatValue(value: unknown, key?: string): string { function formatAuthStatus(auth: StoreInfoResult['auth_status']): string { if (!auth.authed) return 'not authenticated' - return auth.expires_at ? `authenticated (expires ${formatLocalDate(auth.expires_at)})` : 'authenticated' + return auth.expires_at ? `authenticated (expires ${formatUtcDate(auth.expires_at)})` : 'authenticated' +} + +function formatUtcDate(value: string): string { + return `${formatDate(new Date(value))} UTC` } From 1c4bce79185f4db3cf5989f30f48ece490410ea9 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:09:18 +0300 Subject: [PATCH 09/21] Trim store info changeset --- .changeset/store-info-command.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/store-info-command.md b/.changeset/store-info-command.md index 34b9ef22241..80bd4bb0631 100644 --- a/.changeset/store-info-command.md +++ b/.changeset/store-info-command.md @@ -2,4 +2,4 @@ '@shopify/cli': minor --- -Add `shopify store info --store ` command for surfacing shop metadata from the Business Platform Destinations and Organizations APIs. Tier 1 and Tier 2 fields are returned without `store auth`; Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are included only with `--verbose`. Individual backend failures degrade gracefully via `_field_errors` rather than aborting the command. +Add `shopify store info --store ` command. Supports `--json` and `--verbose` (verbose requires `store auth`). From 20a39e654c729cf4e2f8d3ed46f164e1412cbce0 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:15:51 +0300 Subject: [PATCH 10/21] Rewrite store info user-facing text in user-friendly terms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop references to "Tier", "Identity", and "Business Platform" from the command description, section titles, and error reasons — those are internal taxonomy that users don't recognize. --- packages/cli/README.md | 10 +++++----- packages/cli/oclif.manifest.json | 4 ++-- packages/store/src/cli/commands/store/info.ts | 6 +++--- .../store/src/cli/services/store/info/admin-shop.ts | 2 +- .../store/src/cli/services/store/info/destinations.ts | 2 +- packages/store/src/cli/services/store/info/index.ts | 2 +- .../src/cli/services/store/info/organization-shop.ts | 2 +- .../store/src/cli/services/store/info/result.test.ts | 2 +- packages/store/src/cli/services/store/info/result.ts | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/cli/README.md b/packages/cli/README.md index f321ec848c8..d8407c19167 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -2194,13 +2194,13 @@ FLAGS DESCRIPTION Surface metadata about a Shopify store. - Reads metadata for a store from the Business Platform Destinations and Organizations APIs. + Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more. - Tier 1 and Tier 2 fields work without `store auth`. Tier 3 fields (shop owner, timezone, features, setup required) - require `store auth` and are only included when `--verbose` is set. + Pass `--verbose` to include shop owner, timezone, features, and setup status. These extra fields require having run + `store auth` for the store first. - Backend failures degrade gracefully: a single failing call populates `_field_errors` rather than aborting the whole - command. The command does fail when the destination cannot be resolved. + Use `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still + returned and the missing fields are listed with a reason. EXAMPLES $ shopify store info --store shop.myshopify.com diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index bfa9a24030a..f9ab0ac8e8f 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -5868,8 +5868,8 @@ "args": { }, "customPluginName": "@shopify/store", - "description": "Reads metadata for a store from the Business Platform Destinations and Organizations APIs.\n\nTier 1 and Tier 2 fields work without `store auth`. Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are only included when `--verbose` is set.\n\nBackend failures degrade gracefully: a single failing call populates `_field_errors` rather than aborting the whole command. The command does fail when the destination cannot be resolved.", - "descriptionWithMarkdown": "Reads metadata for a store from the Business Platform Destinations and Organizations APIs.\n\nTier 1 and Tier 2 fields work without `store auth`. Tier 3 fields (shop owner, timezone, features, setup required) require `store auth` and are only included when `--verbose` is set.\n\nBackend failures degrade gracefully: a single failing call populates `_field_errors` rather than aborting the whole command. The command does fail when the destination cannot be resolved.", + "description": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--verbose` to include shop owner, timezone, features, and setup status. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", + "descriptionWithMarkdown": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--verbose` to include shop owner, timezone, features, and setup status. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", "examples": [ "<%= config.bin %> <%= command.id %> --store shop.myshopify.com", "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json", diff --git a/packages/store/src/cli/commands/store/info.ts b/packages/store/src/cli/commands/store/info.ts index 8c66a1925b6..34db7608366 100644 --- a/packages/store/src/cli/commands/store/info.ts +++ b/packages/store/src/cli/commands/store/info.ts @@ -7,11 +7,11 @@ import {globalFlags, jsonFlag} from '@shopify/cli-kit/node/cli' export default class StoreInfo extends StoreCommand { static summary = 'Surface metadata about a Shopify store.' - static descriptionWithMarkdown = `Reads metadata for a store from the Business Platform Destinations and Organizations APIs. + static descriptionWithMarkdown = `Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more. -Tier 1 and Tier 2 fields work without \`store auth\`. Tier 3 fields (shop owner, timezone, features, setup required) require \`store auth\` and are only included when \`--verbose\` is set. +Pass \`--verbose\` to include shop owner, timezone, features, and setup status. These extra fields require having run \`store auth\` for the store first. -Backend failures degrade gracefully: a single failing call populates \`_field_errors\` rather than aborting the whole command. The command does fail when the destination cannot be resolved.` +Use \`--json\` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.` static description = this.descriptionWithoutMarkdown() diff --git a/packages/store/src/cli/services/store/info/admin-shop.ts b/packages/store/src/cli/services/store/info/admin-shop.ts index f077cbaed00..bd6b4016b7d 100644 --- a/packages/store/src/cli/services/store/info/admin-shop.ts +++ b/packages/store/src/cli/services/store/info/admin-shop.ts @@ -93,7 +93,7 @@ function skipReasonForContextError(error: unknown, store: string): string { // to run `store auth` when the message indicates a missing/expired session. const message = error.message if (/store auth|not authenticated|no stored|reauthenticate/i.test(message)) { - return `No \`store auth\` for ${store} — run \`shopify store auth --store ${store}\` to enable Tier 3 fields.` + return `No \`store auth\` for ${store} — run \`shopify store auth --store ${store}\` to enable these fields.` } return message } diff --git a/packages/store/src/cli/services/store/info/destinations.ts b/packages/store/src/cli/services/store/info/destinations.ts index 8c4a1decb68..5451ecc2250 100644 --- a/packages/store/src/cli/services/store/info/destinations.ts +++ b/packages/store/src/cli/services/store/info/destinations.ts @@ -77,7 +77,7 @@ export async function fetchDestinationsContext(options: FetchDestinationsContext if (!matchedNode) { throw new AbortError( `Couldn't find a store with domain ${options.store} for the current account.`, - 'Verify the domain (must be the canonical `myshopify.com` FQDN) and that your business-platform session has access to it. Inactive shops are not searchable in v1 of this command.', + 'Verify the domain (must be the canonical `myshopify.com` FQDN) and that you are signed in to an account with access to the store. Inactive shops are not searchable.', ) } diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index 10b8e5ffec9..6ec1eca53ba 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -135,7 +135,7 @@ function applyVerboseFields( fieldErrors: Record, ): void { if (!authed) { - const reason = `Tier 3 fields require \`store auth\`. Run \`shopify store auth --store ${store}\` first.` + const reason = `These fields require \`store auth\`. Run \`shopify store auth --store ${store}\` first.` for (const field of TIER_3_FIELDS) { fieldErrors[field] = {source: 'cli', reason} } diff --git a/packages/store/src/cli/services/store/info/organization-shop.ts b/packages/store/src/cli/services/store/info/organization-shop.ts index ea2c1337962..999d4004037 100644 --- a/packages/store/src/cli/services/store/info/organization-shop.ts +++ b/packages/store/src/cli/services/store/info/organization-shop.ts @@ -73,7 +73,7 @@ export async function fetchOrganizationShop( if (!matched) { throw new BugError( `Couldn't find shop ${options.store} inside organization ${options.organizationId}.`, - 'The destination resolved against the business platform, but the organizations API does not list this shop. This usually means the search service is stale; try again in a moment.', + 'The shop matched a global lookup but is not listed under its parent organization. This usually means the search index is stale; try again in a moment.', ) } diff --git a/packages/store/src/cli/services/store/info/result.test.ts b/packages/store/src/cli/services/store/info/result.test.ts index c28d15f65b6..bd29d14d8f8 100644 --- a/packages/store/src/cli/services/store/info/result.test.ts +++ b/packages/store/src/cli/services/store/info/result.test.ts @@ -87,7 +87,7 @@ describe('renderStoreInfoResult', () => { expect(renderInfo).toHaveBeenCalledOnce() const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as {customSections: {title: string}[]} const titles = opts.customSections.map((s) => s.title) - expect(titles).toContain('Identity') + expect(titles).toContain('Overview') }) test('text format includes Plan & lifecycle when Tier 2 data present', () => { diff --git a/packages/store/src/cli/services/store/info/result.ts b/packages/store/src/cli/services/store/info/result.ts index 56e283984ab..74bcefc5c26 100644 --- a/packages/store/src/cli/services/store/info/result.ts +++ b/packages/store/src/cli/services/store/info/result.ts @@ -23,7 +23,7 @@ function buildTextSections(result: StoreInfoResult): AlertCustomSection[] { const sections: AlertCustomSection[] = [] sections.push({ - title: 'Identity', + title: 'Overview', body: {list: {items: identityItems(result)}}, }) From ffc33266545501ca40391430ba06c272195fb4d6 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:20:05 +0300 Subject: [PATCH 11/21] Rename store info --verbose to --full --verbose is a global "show your work" flag (more diagnostic output) across the CLI; using it to mean "include more result fields" is a mismatched concept. --full reads naturally as "give me the full set of fields". --- .changeset/store-info-command.md | 2 +- .../interfaces/store-info.interface.ts | 6 +++++ .../generated/generated_docs_data_v2.json | 11 ++++++++- packages/cli/README.md | 8 ++++--- packages/cli/oclif.manifest.json | 13 +++++++--- packages/store/src/cli/commands/store/info.ts | 12 +++++++--- .../src/cli/services/store/info/index.test.ts | 24 +++++++++---------- .../src/cli/services/store/info/index.ts | 16 ++++++------- .../src/cli/services/store/info/types.ts | 2 +- 9 files changed, 62 insertions(+), 32 deletions(-) diff --git a/.changeset/store-info-command.md b/.changeset/store-info-command.md index 80bd4bb0631..66599827199 100644 --- a/.changeset/store-info-command.md +++ b/.changeset/store-info-command.md @@ -2,4 +2,4 @@ '@shopify/cli': minor --- -Add `shopify store info --store ` command. Supports `--json` and `--verbose` (verbose requires `store auth`). +Add `shopify store info --store ` command. Supports `--json` and `--full` (full requires `store auth`). diff --git a/docs-shopify.dev/commands/interfaces/store-info.interface.ts b/docs-shopify.dev/commands/interfaces/store-info.interface.ts index 01c264dca63..0f7cda1de17 100644 --- a/docs-shopify.dev/commands/interfaces/store-info.interface.ts +++ b/docs-shopify.dev/commands/interfaces/store-info.interface.ts @@ -4,6 +4,12 @@ * @publicDocs */ export interface storeinfo { + /** + * Include extra fields that require `store auth` (shop owner, timezone, features, setup status). + * @environment SHOPIFY_FLAG_FULL + */ + '--full'?: '' + /** * Output the result as JSON. Automatically disables color output. * @environment SHOPIFY_FLAG_JSON diff --git a/docs-shopify.dev/generated/generated_docs_data_v2.json b/docs-shopify.dev/generated/generated_docs_data_v2.json index 16f31211e65..e62803323d2 100644 --- a/docs-shopify.dev/generated/generated_docs_data_v2.json +++ b/docs-shopify.dev/generated/generated_docs_data_v2.json @@ -4300,6 +4300,15 @@ "description": "The following flags are available for the `store info` command:", "isPublicDocs": true, "members": [ + { + "filePath": "docs-shopify.dev/commands/interfaces/store-info.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--full", + "value": "''", + "description": "Include extra fields that require `store auth` (shop owner, timezone, features, setup status).", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_FULL" + }, { "filePath": "docs-shopify.dev/commands/interfaces/store-info.interface.ts", "syntaxKind": "PropertySignature", @@ -4336,7 +4345,7 @@ "environmentValue": "SHOPIFY_FLAG_STORE" } ], - "value": "export interface storeinfo {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The myshopify.com domain of the store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface storeinfo {\n /**\n * Include extra fields that require `store auth` (shop owner, timezone, features, setup status).\n * @environment SHOPIFY_FLAG_FULL\n */\n '--full'?: ''\n\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The myshopify.com domain of the store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } }, "themecheck": { diff --git a/packages/cli/README.md b/packages/cli/README.md index d8407c19167..d18e54a0211 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -2183,11 +2183,13 @@ Surface metadata about a Shopify store. ``` USAGE - $ shopify store info -s [-j] [--no-color] [--verbose] + $ shopify store info -s [--full] [-j] [--no-color] [--verbose] FLAGS -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color output. -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store. + --full [env: SHOPIFY_FLAG_FULL] Include extra fields that require `store auth` (shop owner, timezone, + features, setup status). --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. @@ -2196,7 +2198,7 @@ DESCRIPTION Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more. - Pass `--verbose` to include shop owner, timezone, features, and setup status. These extra fields require having run + Pass `--full` to include shop owner, timezone, features, and setup status. These extra fields require having run `store auth` for the store first. Use `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still @@ -2207,7 +2209,7 @@ EXAMPLES $ shopify store info --store shop.myshopify.com --json - $ shopify store info --store shop.myshopify.com --verbose + $ shopify store info --store shop.myshopify.com --full ``` ## `shopify theme check` diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index f9ab0ac8e8f..2e378ccdab7 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -5868,14 +5868,21 @@ "args": { }, "customPluginName": "@shopify/store", - "description": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--verbose` to include shop owner, timezone, features, and setup status. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", - "descriptionWithMarkdown": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--verbose` to include shop owner, timezone, features, and setup status. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", + "description": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--full` to include shop owner, timezone, features, and setup status. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", + "descriptionWithMarkdown": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--full` to include shop owner, timezone, features, and setup status. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", "examples": [ "<%= config.bin %> <%= command.id %> --store shop.myshopify.com", "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json", - "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --verbose" + "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --full" ], "flags": { + "full": { + "allowNo": false, + "description": "Include extra fields that require `store auth` (shop owner, timezone, features, setup status).", + "env": "SHOPIFY_FLAG_FULL", + "name": "full", + "type": "boolean" + }, "json": { "allowNo": false, "char": "j", diff --git a/packages/store/src/cli/commands/store/info.ts b/packages/store/src/cli/commands/store/info.ts index 34db7608366..946c293f7f3 100644 --- a/packages/store/src/cli/commands/store/info.ts +++ b/packages/store/src/cli/commands/store/info.ts @@ -3,13 +3,14 @@ import {renderStoreInfoResult} from '../../services/store/info/result.js' import StoreCommand from '../../utilities/store-command.js' import {storeFlags} from '../../flags.js' import {globalFlags, jsonFlag} from '@shopify/cli-kit/node/cli' +import {Flags} from '@oclif/core' export default class StoreInfo extends StoreCommand { static summary = 'Surface metadata about a Shopify store.' static descriptionWithMarkdown = `Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more. -Pass \`--verbose\` to include shop owner, timezone, features, and setup status. These extra fields require having run \`store auth\` for the store first. +Pass \`--full\` to include shop owner, timezone, features, and setup status. These extra fields require having run \`store auth\` for the store first. Use \`--json\` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.` @@ -18,13 +19,18 @@ Use \`--json\` for machine-readable output. When an individual field can't be fe static examples = [ '<%= config.bin %> <%= command.id %> --store shop.myshopify.com', '<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json', - '<%= config.bin %> <%= command.id %> --store shop.myshopify.com --verbose', + '<%= config.bin %> <%= command.id %> --store shop.myshopify.com --full', ] static flags = { ...globalFlags, ...jsonFlag, store: storeFlags.store, + full: Flags.boolean({ + description: 'Include extra fields that require `store auth` (shop owner, timezone, features, setup status).', + env: 'SHOPIFY_FLAG_FULL', + default: false, + }), } public async run(): Promise { @@ -32,7 +38,7 @@ Use \`--json\` for machine-readable output. When an individual field can't be fe const result = await getStoreInfo({ store: flags.store, - verbose: Boolean(flags.verbose), + full: flags.full, }) renderStoreInfoResult(result, flags.json ? 'json' : 'text') diff --git a/packages/store/src/cli/services/store/info/index.test.ts b/packages/store/src/cli/services/store/info/index.test.ts index 1fcd4d8b979..ae24cfe84e9 100644 --- a/packages/store/src/cli/services/store/info/index.test.ts +++ b/packages/store/src/cli/services/store/info/index.test.ts @@ -53,7 +53,7 @@ describe('getStoreInfo', () => { }) test('throws AbortError when no store is provided', async () => { - const err = await getStoreInfo({verbose: false}).catch((e: unknown) => e) + const err = await getStoreInfo({full: false}).catch((e: unknown) => e) expect(err).toBeInstanceOf(AbortError) expect((err as AbortError).message).toContain('No store') }) @@ -65,7 +65,7 @@ describe('getStoreInfo', () => { }) vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) - const result = await getStoreInfo({store: SHOP, verbose: false}) + const result = await getStoreInfo({store: SHOP, full: false}) expect(result.shop_domain).toBe(SHOP) expect(result.display_name).toBe('My Shop (Org)') @@ -89,7 +89,7 @@ describe('getStoreInfo', () => { }) vi.mocked(fetchOrganizationShop).mockRejectedValueOnce(new Error('5xx')) - const result = await getStoreInfo({store: SHOP, verbose: false}) + const result = await getStoreInfo({store: SHOP, full: false}) expect(result.plan).toBeUndefined() expect(result.billing_currency).toBeUndefined() @@ -104,28 +104,28 @@ describe('getStoreInfo', () => { owningOrgError: {source: 'bp_destinations', reason: 'no match'}, }) - const result = await getStoreInfo({store: SHOP, verbose: false}) + const result = await getStoreInfo({store: SHOP, full: false}) expect(fetchOrganizationShop).not.toHaveBeenCalled() expect(result._field_errors?.owning_org?.reason).toBe('no match') expect(result._field_errors?.plan?.reason).toBe('no match') }) - test('with --verbose and not authed, records cli-source errors for Tier 3 fields', async () => { + test('with --full and not authed, records cli-source errors for Tier 3 fields', async () => { vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ destination: destination(), owningOrg: {name: 'Acme', id: '42'}, }) vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) - const result = await getStoreInfo({store: SHOP, verbose: true}) + const result = await getStoreInfo({store: SHOP, full: true}) expect(result.shop_owner).toBeUndefined() expect(result._field_errors?.shop_owner?.source).toBe('cli') expect(result._field_errors?.shop_owner?.reason).toContain('store auth') }) - test('with --verbose and authed, includes Tier 3 fields from admin response', async () => { + test('with --full and authed, includes Tier 3 fields from admin response', async () => { vi.mocked(readAuthStatus).mockReturnValue({ authed: true, source: 'store-auth', @@ -146,7 +146,7 @@ describe('getStoreInfo', () => { }, }) - const result = await getStoreInfo({store: SHOP, verbose: true}) + const result = await getStoreInfo({store: SHOP, full: true}) expect(result.shop_owner).toEqual({name: 'Alice'}) expect(result.timezone).toBe('America/New_York') @@ -155,7 +155,7 @@ describe('getStoreInfo', () => { expect(result._field_errors).toBeUndefined() }) - test('with --verbose authed and admin skipped, records admin-source field errors', async () => { + test('with --full authed and admin skipped, records admin-source field errors', async () => { vi.mocked(readAuthStatus).mockReturnValue({authed: true, source: 'store-auth'}) vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ destination: destination(), @@ -164,7 +164,7 @@ describe('getStoreInfo', () => { vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) vi.mocked(fetchAdminShop).mockResolvedValueOnce({skipped: true, reason: 'Admin 5xx'}) - const result = await getStoreInfo({store: SHOP, verbose: true}) + const result = await getStoreInfo({store: SHOP, full: true}) expect(result._field_errors?.shop_owner?.source).toBe('admin') expect(result._field_errors?.shop_owner?.reason).toBe('Admin 5xx') @@ -177,7 +177,7 @@ describe('getStoreInfo', () => { owningOrgError: {source: 'bp_destinations', reason: 'no match'}, }) - const result = await getStoreInfo({store: SHOP, verbose: false}) + const result = await getStoreInfo({store: SHOP, full: false}) expect(result.display_name).toBe('My Shop') expect(result.store_type).toBe('DEVELOPMENT') @@ -192,7 +192,7 @@ describe('getStoreInfo', () => { }) vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) - const result = await getStoreInfo({store: SHOP, verbose: false}) + const result = await getStoreInfo({store: SHOP, full: false}) expect(result.admin_url).toBe('https://admin.shopify.com/store/fallback-handle') }) diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index 6ec1eca53ba..5d29e87319c 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -16,7 +16,7 @@ import {compact} from '@shopify/cli-kit/common/object' export interface GetStoreInfoOptions { store?: string - verbose: boolean + full: boolean } const TIER_3_FIELDS = ['shop_owner', 'timezone', 'features', 'setup_required'] as const @@ -38,7 +38,7 @@ export async function getStoreInfo(options: GetStoreInfoOptions): Promise(null), + options.full && auth.authed ? fetchAdminShop(store) : Promise.resolve(null), ]) const result = buildResult({ @@ -46,7 +46,7 @@ export async function getStoreInfo(options: GetStoreInfoOptions): Promise } function buildResult(args: BuildResultArgs): StoreInfoResult { - const {store, destinationsCtx, orgShop, admin, verbose, auth, fieldErrors} = args + const {store, destinationsCtx, orgShop, admin, full, auth, fieldErrors} = args const destination = destinationsCtx.destination if (destinationsCtx.owningOrgError) { @@ -116,8 +116,8 @@ function buildResult(args: BuildResultArgs): StoreInfoResult { const result = {...compact(baseFields), auth_status: auth} as StoreInfoResult - if (verbose) { - applyVerboseFields(result, admin, auth.authed, store, fieldErrors) + if (full) { + applyFullFields(result, admin, auth.authed, store, fieldErrors) } if (Object.keys(fieldErrors).length > 0) { @@ -127,7 +127,7 @@ function buildResult(args: BuildResultArgs): StoreInfoResult { return result } -function applyVerboseFields( +function applyFullFields( result: StoreInfoResult, admin: AdminShopFetchOutcome | null, authed: boolean, diff --git a/packages/store/src/cli/services/store/info/types.ts b/packages/store/src/cli/services/store/info/types.ts index 1e446ec2b7d..100753aad4e 100644 --- a/packages/store/src/cli/services/store/info/types.ts +++ b/packages/store/src/cli/services/store/info/types.ts @@ -57,7 +57,7 @@ export interface StoreInfoResult { created_at?: string last_access?: string - // Tier 3 (verbose + authed only) + // --full (+ authed) only shop_owner?: StoreInfoShopOwner timezone?: string features?: StoreInfoFeatures From ef049ef8adf4aa3279a0cac55d33d4ea25faa817 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:26:37 +0300 Subject: [PATCH 12/21] Trim store info --full to high-signal fields only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the features sub-object: storefront is uniformly true, branding is cosmetic, harmonizedSystemCode is niche cross-border tooling. Lift shopifyPlus to a top-level `plus` boolean — it overlaps with plan.name but is relevant enough on its own to deserve a clean signal rather than requiring callers to regex-match plan names. --full now adds exactly: shop_owner, timezone, setup_required, plus. --- .../interfaces/store-info.interface.ts | 2 +- .../generated/generated_docs_data_v2.json | 4 ++-- packages/cli/README.md | 6 +++--- packages/cli/oclif.manifest.json | 6 +++--- packages/store/src/cli/commands/store/info.ts | 4 ++-- .../services/store/info/admin-shop.test.ts | 15 +++------------ .../src/cli/services/store/info/admin-shop.ts | 19 ++----------------- .../src/cli/services/store/info/index.test.ts | 4 ++-- .../src/cli/services/store/info/index.ts | 4 ++-- .../cli/services/store/info/result.test.ts | 4 ++-- .../src/cli/services/store/info/result.ts | 6 +----- .../src/cli/services/store/info/types.ts | 11 ++--------- 12 files changed, 25 insertions(+), 60 deletions(-) diff --git a/docs-shopify.dev/commands/interfaces/store-info.interface.ts b/docs-shopify.dev/commands/interfaces/store-info.interface.ts index 0f7cda1de17..9807fe823cd 100644 --- a/docs-shopify.dev/commands/interfaces/store-info.interface.ts +++ b/docs-shopify.dev/commands/interfaces/store-info.interface.ts @@ -5,7 +5,7 @@ */ export interface storeinfo { /** - * Include extra fields that require `store auth` (shop owner, timezone, features, setup status). + * Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription). * @environment SHOPIFY_FLAG_FULL */ '--full'?: '' diff --git a/docs-shopify.dev/generated/generated_docs_data_v2.json b/docs-shopify.dev/generated/generated_docs_data_v2.json index e62803323d2..550115cea8e 100644 --- a/docs-shopify.dev/generated/generated_docs_data_v2.json +++ b/docs-shopify.dev/generated/generated_docs_data_v2.json @@ -4305,7 +4305,7 @@ "syntaxKind": "PropertySignature", "name": "--full", "value": "''", - "description": "Include extra fields that require `store auth` (shop owner, timezone, features, setup status).", + "description": "Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription).", "isOptional": true, "environmentValue": "SHOPIFY_FLAG_FULL" }, @@ -4345,7 +4345,7 @@ "environmentValue": "SHOPIFY_FLAG_STORE" } ], - "value": "export interface storeinfo {\n /**\n * Include extra fields that require `store auth` (shop owner, timezone, features, setup status).\n * @environment SHOPIFY_FLAG_FULL\n */\n '--full'?: ''\n\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The myshopify.com domain of the store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface storeinfo {\n /**\n * Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription).\n * @environment SHOPIFY_FLAG_FULL\n */\n '--full'?: ''\n\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The myshopify.com domain of the store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } }, "themecheck": { diff --git a/packages/cli/README.md b/packages/cli/README.md index d18e54a0211..2b31c174eac 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -2189,7 +2189,7 @@ FLAGS -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color output. -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store. --full [env: SHOPIFY_FLAG_FULL] Include extra fields that require `store auth` (shop owner, timezone, - features, setup status). + setup status, Plus subscription). --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. @@ -2198,8 +2198,8 @@ DESCRIPTION Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more. - Pass `--full` to include shop owner, timezone, features, and setup status. These extra fields require having run - `store auth` for the store first. + Pass `--full` to include shop owner, timezone, setup status, and Plus subscription. These extra fields require having + run `store auth` for the store first. Use `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason. diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index 2e378ccdab7..bdc60fac3c7 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -5868,8 +5868,8 @@ "args": { }, "customPluginName": "@shopify/store", - "description": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--full` to include shop owner, timezone, features, and setup status. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", - "descriptionWithMarkdown": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--full` to include shop owner, timezone, features, and setup status. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", + "description": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--full` to include shop owner, timezone, setup status, and Plus subscription. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", + "descriptionWithMarkdown": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--full` to include shop owner, timezone, setup status, and Plus subscription. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", "examples": [ "<%= config.bin %> <%= command.id %> --store shop.myshopify.com", "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json", @@ -5878,7 +5878,7 @@ "flags": { "full": { "allowNo": false, - "description": "Include extra fields that require `store auth` (shop owner, timezone, features, setup status).", + "description": "Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription).", "env": "SHOPIFY_FLAG_FULL", "name": "full", "type": "boolean" diff --git a/packages/store/src/cli/commands/store/info.ts b/packages/store/src/cli/commands/store/info.ts index 946c293f7f3..3b7b41226f9 100644 --- a/packages/store/src/cli/commands/store/info.ts +++ b/packages/store/src/cli/commands/store/info.ts @@ -10,7 +10,7 @@ export default class StoreInfo extends StoreCommand { static descriptionWithMarkdown = `Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more. -Pass \`--full\` to include shop owner, timezone, features, and setup status. These extra fields require having run \`store auth\` for the store first. +Pass \`--full\` to include shop owner, timezone, setup status, and Plus subscription. These extra fields require having run \`store auth\` for the store first. Use \`--json\` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.` @@ -27,7 +27,7 @@ Use \`--json\` for machine-readable output. When an individual field can't be fe ...jsonFlag, store: storeFlags.store, full: Flags.boolean({ - description: 'Include extra fields that require `store auth` (shop owner, timezone, features, setup status).', + description: 'Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription).', env: 'SHOPIFY_FLAG_FULL', default: false, }), diff --git a/packages/store/src/cli/services/store/info/admin-shop.test.ts b/packages/store/src/cli/services/store/info/admin-shop.test.ts index 6985371e564..a66466990ec 100644 --- a/packages/store/src/cli/services/store/info/admin-shop.test.ts +++ b/packages/store/src/cli/services/store/info/admin-shop.test.ts @@ -46,12 +46,7 @@ describe('fetchAdminShop', () => { shopOwnerName: 'Alice', ianaTimezone: 'America/New_York', setupRequired: false, - features: { - storefront: true, - shopifyPlus: false, - harmonizedSystemCode: true, - branding: null, - }, + features: {shopifyPlus: true}, }, } as never) @@ -62,16 +57,12 @@ describe('fetchAdminShop', () => { shopOwnerName: 'Alice', ianaTimezone: 'America/New_York', setupRequired: false, - features: { - storefront: true, - shopifyPlus: false, - harmonizedSystemCode: true, - }, + shopifyPlus: true, }) } }) - test('omits features object entirely when no feature flags are present', async () => { + test('omits shopifyPlus when the features object is absent', async () => { vi.mocked(prepareAdminStoreGraphQLContext).mockResolvedValueOnce(adminContext() as never) vi.mocked(graphqlRequest).mockResolvedValueOnce({ shop: { diff --git a/packages/store/src/cli/services/store/info/admin-shop.ts b/packages/store/src/cli/services/store/info/admin-shop.ts index bd6b4016b7d..3c914aeae9d 100644 --- a/packages/store/src/cli/services/store/info/admin-shop.ts +++ b/packages/store/src/cli/services/store/info/admin-shop.ts @@ -3,7 +3,7 @@ import {adminUrl} from '@shopify/cli-kit/node/api/admin' import {graphqlRequest} from '@shopify/cli-kit/node/api/graphql' import {AbortError} from '@shopify/cli-kit/node/error' import {compact} from '@shopify/cli-kit/common/object' -import type {AdminShopFetchOutcome, AdminShopFields, StoreInfoFeatures} from './types.js' +import type {AdminShopFetchOutcome, AdminShopFields} from './types.js' const ADMIN_SHOP_QUERY = ` query StoreInfoAdminShop { @@ -12,10 +12,7 @@ const ADMIN_SHOP_QUERY = ` ianaTimezone setupRequired features { - storefront shopifyPlus - harmonizedSystemCode - branding } } } @@ -27,10 +24,7 @@ interface AdminShopResponse { ianaTimezone?: string | null setupRequired?: boolean | null features?: { - storefront?: boolean | null shopifyPlus?: boolean | null - harmonizedSystemCode?: boolean | null - branding?: string | null } | null } } @@ -69,20 +63,11 @@ export async function fetchAdminShop(store: string): Promise 0 ? features : undefined, + shopifyPlus: shop.features?.shopifyPlus, }) as AdminShopFields } diff --git a/packages/store/src/cli/services/store/info/index.test.ts b/packages/store/src/cli/services/store/info/index.test.ts index ae24cfe84e9..c5c00513ee2 100644 --- a/packages/store/src/cli/services/store/info/index.test.ts +++ b/packages/store/src/cli/services/store/info/index.test.ts @@ -142,7 +142,7 @@ describe('getStoreInfo', () => { shopOwnerName: 'Alice', ianaTimezone: 'America/New_York', setupRequired: false, - features: {storefront: true, shopifyPlus: false}, + shopifyPlus: true, }, }) @@ -151,7 +151,7 @@ describe('getStoreInfo', () => { expect(result.shop_owner).toEqual({name: 'Alice'}) expect(result.timezone).toBe('America/New_York') expect(result.setup_required).toBe(false) - expect(result.features).toEqual({storefront: true, shopifyPlus: false}) + expect(result.plus).toBe(true) expect(result._field_errors).toBeUndefined() }) diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index 5d29e87319c..0e2cd089519 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -19,7 +19,7 @@ export interface GetStoreInfoOptions { full: boolean } -const TIER_3_FIELDS = ['shop_owner', 'timezone', 'features', 'setup_required'] as const +const TIER_3_FIELDS = ['shop_owner', 'timezone', 'setup_required', 'plus'] as const export async function getStoreInfo(options: GetStoreInfoOptions): Promise { const store = options.store @@ -156,8 +156,8 @@ function applyFullFields( compact({ shop_owner: shop.shopOwnerName ? {name: shop.shopOwnerName} : undefined, timezone: shop.ianaTimezone, - features: shop.features, setup_required: shop.setupRequired, + plus: shop.shopifyPlus, }), ) } diff --git a/packages/store/src/cli/services/store/info/result.test.ts b/packages/store/src/cli/services/store/info/result.test.ts index bd29d14d8f8..40a44b4f760 100644 --- a/packages/store/src/cli/services/store/info/result.test.ts +++ b/packages/store/src/cli/services/store/info/result.test.ts @@ -55,7 +55,7 @@ describe('renderStoreInfoResult', () => { last_access: '2026-05-20T00:00:00.000Z', shop_owner: {name: 'Alice'}, timezone: 'America/New_York', - features: {storefront: true, shopifyPlus: false}, + plus: true, setup_required: false, auth_status: {authed: true, source: 'store-auth', expires_at: '2026-12-01T00:00:00.000Z'}, }), @@ -77,7 +77,7 @@ describe('renderStoreInfoResult', () => { last_access: '2026-05-20T00:00:00.000Z', shop_owner: {name: 'Alice'}, timezone: 'America/New_York', - features: {storefront: true, shopifyPlus: false}, + plus: true, setup_required: false, }) }) diff --git a/packages/store/src/cli/services/store/info/result.ts b/packages/store/src/cli/services/store/info/result.ts index 74bcefc5c26..45e1755940a 100644 --- a/packages/store/src/cli/services/store/info/result.ts +++ b/packages/store/src/cli/services/store/info/result.ts @@ -86,11 +86,7 @@ function tier3Items(result: StoreInfoResult): string[] { if (result.shop_owner?.name) items.push(line('shop_owner', result.shop_owner.name)) pushIfPresent(items, 'timezone', result.timezone) if (result.setup_required != null) items.push(line('setup_required', formatValue(result.setup_required))) - if (result.features) { - for (const [key, value] of Object.entries(result.features)) { - items.push(`${capitalizeWords(key)}: ${formatValue(value)}`) - } - } + if (result.plus != null) items.push(line('plus', formatValue(result.plus))) return items } diff --git a/packages/store/src/cli/services/store/info/types.ts b/packages/store/src/cli/services/store/info/types.ts index 100753aad4e..b1d96b306d5 100644 --- a/packages/store/src/cli/services/store/info/types.ts +++ b/packages/store/src/cli/services/store/info/types.ts @@ -5,13 +5,6 @@ export interface StoreInfoFieldError { reason: string } -export interface StoreInfoFeatures { - storefront?: boolean - shopifyPlus?: boolean - harmonizedSystemCode?: boolean - branding?: string -} - export interface StoreInfoOwningOrg { name: string } @@ -60,8 +53,8 @@ export interface StoreInfoResult { // --full (+ authed) only shop_owner?: StoreInfoShopOwner timezone?: string - features?: StoreInfoFeatures setup_required?: boolean + plus?: boolean _field_errors?: Record } @@ -106,5 +99,5 @@ export interface AdminShopFields { shopOwnerName?: string ianaTimezone?: string setupRequired?: boolean - features?: StoreInfoFeatures + shopifyPlus?: boolean } From 241a0d8a015571d13023a8362ca89a310b2851ef Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:37:08 +0300 Subject: [PATCH 13/21] Drop --full flag from store info; include extras automatically when authed The flag was redundant: we already know whether the store is authenticated by the time we compose the result, so gating the Admin fetch behind an opt-in flag just added friction without unlocking anything. Now `store info` quietly includes shop_owner/timezone/ setup_required/plus when `store auth` exists for the store, and omits them otherwise. The `auth_status: not authenticated` field already serves as the discoverability hint, so we don't pollute output with field errors for fields the user never asked for. --- .changeset/store-info-command.md | 2 +- .../interfaces/store-info.interface.ts | 6 ---- .../generated/generated_docs_data_v2.json | 11 +----- packages/cli/README.md | 10 ++---- packages/cli/oclif.manifest.json | 14 ++------ packages/store/src/cli/commands/store/info.ts | 14 ++------ .../src/cli/services/store/info/index.test.ts | 31 ++++++++-------- .../src/cli/services/store/info/index.ts | 35 +++++++------------ 8 files changed, 40 insertions(+), 83 deletions(-) diff --git a/.changeset/store-info-command.md b/.changeset/store-info-command.md index 66599827199..f9fdfd5e1a1 100644 --- a/.changeset/store-info-command.md +++ b/.changeset/store-info-command.md @@ -2,4 +2,4 @@ '@shopify/cli': minor --- -Add `shopify store info --store ` command. Supports `--json` and `--full` (full requires `store auth`). +Add `shopify store info --store ` command. Supports `--json`. Additional fields are included automatically when you have run `store auth` for the store. diff --git a/docs-shopify.dev/commands/interfaces/store-info.interface.ts b/docs-shopify.dev/commands/interfaces/store-info.interface.ts index 9807fe823cd..01c264dca63 100644 --- a/docs-shopify.dev/commands/interfaces/store-info.interface.ts +++ b/docs-shopify.dev/commands/interfaces/store-info.interface.ts @@ -4,12 +4,6 @@ * @publicDocs */ export interface storeinfo { - /** - * Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription). - * @environment SHOPIFY_FLAG_FULL - */ - '--full'?: '' - /** * Output the result as JSON. Automatically disables color output. * @environment SHOPIFY_FLAG_JSON diff --git a/docs-shopify.dev/generated/generated_docs_data_v2.json b/docs-shopify.dev/generated/generated_docs_data_v2.json index 550115cea8e..16f31211e65 100644 --- a/docs-shopify.dev/generated/generated_docs_data_v2.json +++ b/docs-shopify.dev/generated/generated_docs_data_v2.json @@ -4300,15 +4300,6 @@ "description": "The following flags are available for the `store info` command:", "isPublicDocs": true, "members": [ - { - "filePath": "docs-shopify.dev/commands/interfaces/store-info.interface.ts", - "syntaxKind": "PropertySignature", - "name": "--full", - "value": "''", - "description": "Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription).", - "isOptional": true, - "environmentValue": "SHOPIFY_FLAG_FULL" - }, { "filePath": "docs-shopify.dev/commands/interfaces/store-info.interface.ts", "syntaxKind": "PropertySignature", @@ -4345,7 +4336,7 @@ "environmentValue": "SHOPIFY_FLAG_STORE" } ], - "value": "export interface storeinfo {\n /**\n * Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription).\n * @environment SHOPIFY_FLAG_FULL\n */\n '--full'?: ''\n\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The myshopify.com domain of the store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface storeinfo {\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The myshopify.com domain of the store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store ': string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } }, "themecheck": { diff --git a/packages/cli/README.md b/packages/cli/README.md index 2b31c174eac..5b01dc5e865 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -2183,13 +2183,11 @@ Surface metadata about a Shopify store. ``` USAGE - $ shopify store info -s [--full] [-j] [--no-color] [--verbose] + $ shopify store info -s [-j] [--no-color] [--verbose] FLAGS -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON. Automatically disables color output. -s, --store= (required) [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store. - --full [env: SHOPIFY_FLAG_FULL] Include extra fields that require `store auth` (shop owner, timezone, - setup status, Plus subscription). --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. @@ -2198,8 +2196,8 @@ DESCRIPTION Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more. - Pass `--full` to include shop owner, timezone, setup status, and Plus subscription. These extra fields require having - run `store auth` for the store first. + If you have run `store auth` for the store, additional fields are included: shop owner, timezone, setup status, and + Plus subscription. Use `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason. @@ -2208,8 +2206,6 @@ EXAMPLES $ shopify store info --store shop.myshopify.com $ shopify store info --store shop.myshopify.com --json - - $ shopify store info --store shop.myshopify.com --full ``` ## `shopify theme check` diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index bdc60fac3c7..b0678c3b754 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -5868,21 +5868,13 @@ "args": { }, "customPluginName": "@shopify/store", - "description": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--full` to include shop owner, timezone, setup status, and Plus subscription. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", - "descriptionWithMarkdown": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nPass `--full` to include shop owner, timezone, setup status, and Plus subscription. These extra fields require having run `store auth` for the store first.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", + "description": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nIf you have run `store auth` for the store, additional fields are included: shop owner, timezone, setup status, and Plus subscription.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", + "descriptionWithMarkdown": "Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more.\n\nIf you have run `store auth` for the store, additional fields are included: shop owner, timezone, setup status, and Plus subscription.\n\nUse `--json` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.", "examples": [ "<%= config.bin %> <%= command.id %> --store shop.myshopify.com", - "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json", - "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --full" + "<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json" ], "flags": { - "full": { - "allowNo": false, - "description": "Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription).", - "env": "SHOPIFY_FLAG_FULL", - "name": "full", - "type": "boolean" - }, "json": { "allowNo": false, "char": "j", diff --git a/packages/store/src/cli/commands/store/info.ts b/packages/store/src/cli/commands/store/info.ts index 3b7b41226f9..edd45ab5e2d 100644 --- a/packages/store/src/cli/commands/store/info.ts +++ b/packages/store/src/cli/commands/store/info.ts @@ -3,14 +3,13 @@ import {renderStoreInfoResult} from '../../services/store/info/result.js' import StoreCommand from '../../utilities/store-command.js' import {storeFlags} from '../../flags.js' import {globalFlags, jsonFlag} from '@shopify/cli-kit/node/cli' -import {Flags} from '@oclif/core' export default class StoreInfo extends StoreCommand { static summary = 'Surface metadata about a Shopify store.' static descriptionWithMarkdown = `Returns metadata about a store you have access to: domain, name, type, status, URLs, plan, billing currency, and more. -Pass \`--full\` to include shop owner, timezone, setup status, and Plus subscription. These extra fields require having run \`store auth\` for the store first. +If you have run \`store auth\` for the store, additional fields are included: shop owner, timezone, setup status, and Plus subscription. Use \`--json\` for machine-readable output. When an individual field can't be fetched, the rest of the output is still returned and the missing fields are listed with a reason.` @@ -19,27 +18,18 @@ Use \`--json\` for machine-readable output. When an individual field can't be fe static examples = [ '<%= config.bin %> <%= command.id %> --store shop.myshopify.com', '<%= config.bin %> <%= command.id %> --store shop.myshopify.com --json', - '<%= config.bin %> <%= command.id %> --store shop.myshopify.com --full', ] static flags = { ...globalFlags, ...jsonFlag, store: storeFlags.store, - full: Flags.boolean({ - description: 'Include extra fields that require `store auth` (shop owner, timezone, setup status, Plus subscription).', - env: 'SHOPIFY_FLAG_FULL', - default: false, - }), } public async run(): Promise { const {flags} = await this.parse(StoreInfo) - const result = await getStoreInfo({ - store: flags.store, - full: flags.full, - }) + const result = await getStoreInfo({store: flags.store}) renderStoreInfoResult(result, flags.json ? 'json' : 'text') } diff --git a/packages/store/src/cli/services/store/info/index.test.ts b/packages/store/src/cli/services/store/info/index.test.ts index c5c00513ee2..f4ea8b23438 100644 --- a/packages/store/src/cli/services/store/info/index.test.ts +++ b/packages/store/src/cli/services/store/info/index.test.ts @@ -53,7 +53,7 @@ describe('getStoreInfo', () => { }) test('throws AbortError when no store is provided', async () => { - const err = await getStoreInfo({full: false}).catch((e: unknown) => e) + const err = await getStoreInfo({}).catch((e: unknown) => e) expect(err).toBeInstanceOf(AbortError) expect((err as AbortError).message).toContain('No store') }) @@ -65,7 +65,7 @@ describe('getStoreInfo', () => { }) vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) - const result = await getStoreInfo({store: SHOP, full: false}) + const result = await getStoreInfo({store: SHOP}) expect(result.shop_domain).toBe(SHOP) expect(result.display_name).toBe('My Shop (Org)') @@ -89,7 +89,7 @@ describe('getStoreInfo', () => { }) vi.mocked(fetchOrganizationShop).mockRejectedValueOnce(new Error('5xx')) - const result = await getStoreInfo({store: SHOP, full: false}) + const result = await getStoreInfo({store: SHOP}) expect(result.plan).toBeUndefined() expect(result.billing_currency).toBeUndefined() @@ -104,28 +104,31 @@ describe('getStoreInfo', () => { owningOrgError: {source: 'bp_destinations', reason: 'no match'}, }) - const result = await getStoreInfo({store: SHOP, full: false}) + const result = await getStoreInfo({store: SHOP}) expect(fetchOrganizationShop).not.toHaveBeenCalled() expect(result._field_errors?.owning_org?.reason).toBe('no match') expect(result._field_errors?.plan?.reason).toBe('no match') }) - test('with --full and not authed, records cli-source errors for Tier 3 fields', async () => { + test('when not authed, silently omits Admin-sourced fields and does not record field errors', async () => { vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ destination: destination(), owningOrg: {name: 'Acme', id: '42'}, }) vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) - const result = await getStoreInfo({store: SHOP, full: true}) + const result = await getStoreInfo({store: SHOP}) + expect(fetchAdminShop).not.toHaveBeenCalled() expect(result.shop_owner).toBeUndefined() - expect(result._field_errors?.shop_owner?.source).toBe('cli') - expect(result._field_errors?.shop_owner?.reason).toContain('store auth') + expect(result.timezone).toBeUndefined() + expect(result.setup_required).toBeUndefined() + expect(result.plus).toBeUndefined() + expect(result._field_errors).toBeUndefined() }) - test('with --full and authed, includes Tier 3 fields from admin response', async () => { + test('when authed, includes Admin-sourced fields from the admin response', async () => { vi.mocked(readAuthStatus).mockReturnValue({ authed: true, source: 'store-auth', @@ -146,7 +149,7 @@ describe('getStoreInfo', () => { }, }) - const result = await getStoreInfo({store: SHOP, full: true}) + const result = await getStoreInfo({store: SHOP}) expect(result.shop_owner).toEqual({name: 'Alice'}) expect(result.timezone).toBe('America/New_York') @@ -155,7 +158,7 @@ describe('getStoreInfo', () => { expect(result._field_errors).toBeUndefined() }) - test('with --full authed and admin skipped, records admin-source field errors', async () => { + test('when authed and admin skipped, records admin-source field errors', async () => { vi.mocked(readAuthStatus).mockReturnValue({authed: true, source: 'store-auth'}) vi.mocked(fetchDestinationsContext).mockResolvedValueOnce({ destination: destination(), @@ -164,7 +167,7 @@ describe('getStoreInfo', () => { vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) vi.mocked(fetchAdminShop).mockResolvedValueOnce({skipped: true, reason: 'Admin 5xx'}) - const result = await getStoreInfo({store: SHOP, full: true}) + const result = await getStoreInfo({store: SHOP}) expect(result._field_errors?.shop_owner?.source).toBe('admin') expect(result._field_errors?.shop_owner?.reason).toBe('Admin 5xx') @@ -177,7 +180,7 @@ describe('getStoreInfo', () => { owningOrgError: {source: 'bp_destinations', reason: 'no match'}, }) - const result = await getStoreInfo({store: SHOP, full: false}) + const result = await getStoreInfo({store: SHOP}) expect(result.display_name).toBe('My Shop') expect(result.store_type).toBe('DEVELOPMENT') @@ -192,7 +195,7 @@ describe('getStoreInfo', () => { }) vi.mocked(fetchOrganizationShop).mockResolvedValueOnce(orgShop()) - const result = await getStoreInfo({store: SHOP, full: false}) + const result = await getStoreInfo({store: SHOP}) expect(result.admin_url).toBe('https://admin.shopify.com/store/fallback-handle') }) diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index 0e2cd089519..e0e7d500f9b 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -16,7 +16,6 @@ import {compact} from '@shopify/cli-kit/common/object' export interface GetStoreInfoOptions { store?: string - full: boolean } const TIER_3_FIELDS = ['shop_owner', 'timezone', 'setup_required', 'plus'] as const @@ -38,7 +37,7 @@ export async function getStoreInfo(options: GetStoreInfoOptions): Promise(null), + auth.authed ? fetchAdminShop(store) : Promise.resolve(null), ]) const result = buildResult({ @@ -46,7 +45,6 @@ export async function getStoreInfo(options: GetStoreInfoOptions): Promise } function buildResult(args: BuildResultArgs): StoreInfoResult { - const {store, destinationsCtx, orgShop, admin, full, auth, fieldErrors} = args + const {store, destinationsCtx, orgShop, admin, auth, fieldErrors} = args const destination = destinationsCtx.destination if (destinationsCtx.owningOrgError) { @@ -116,9 +113,7 @@ function buildResult(args: BuildResultArgs): StoreInfoResult { const result = {...compact(baseFields), auth_status: auth} as StoreInfoResult - if (full) { - applyFullFields(result, admin, auth.authed, store, fieldErrors) - } + applyAdminFields(result, admin, fieldErrors) if (Object.keys(fieldErrors).length > 0) { result._field_errors = fieldErrors @@ -127,25 +122,21 @@ function buildResult(args: BuildResultArgs): StoreInfoResult { return result } -function applyFullFields( +function applyAdminFields( result: StoreInfoResult, admin: AdminShopFetchOutcome | null, - authed: boolean, - store: string, fieldErrors: Record, ): void { - if (!authed) { - const reason = `These fields require \`store auth\`. Run \`shopify store auth --store ${store}\` first.` - for (const field of TIER_3_FIELDS) { - fieldErrors[field] = {source: 'cli', reason} - } - return - } - - if (!admin || admin.skipped) { - const reason = admin?.reason ?? 'Admin API was not queried.' + // Not authed: silently omit Admin-sourced fields. `auth_status: not authenticated` + // already tells the caller why; we don't want to clutter the output with field errors + // for data the user never asked for. + if (!admin) return + + if (admin.skipped) { + // Authed (we attempted the fetch) but Admin returned an error. This is a real failure + // the caller should know about. for (const field of TIER_3_FIELDS) { - fieldErrors[field] = {source: 'admin', reason} + fieldErrors[field] = {source: 'admin', reason: admin.reason} } return } From 90ff0779e39e1812bd9645e2ab16d002638cd655 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:47:07 +0300 Subject: [PATCH 14/21] Group store info text output by user-facing category Replace data-source-based section names (Overview / Plan & lifecycle / Admin details) with categories users actually think in: Store, Access, Plan, Activity. Timezone is a store property, so it sits in Store rather than Activity. --- .../cli/services/store/info/result.test.ts | 24 ++++++--- .../src/cli/services/store/info/result.ts | 51 ++++++++----------- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/packages/store/src/cli/services/store/info/result.test.ts b/packages/store/src/cli/services/store/info/result.test.ts index 40a44b4f760..5cb1dc10041 100644 --- a/packages/store/src/cli/services/store/info/result.test.ts +++ b/packages/store/src/cli/services/store/info/result.test.ts @@ -82,30 +82,40 @@ describe('renderStoreInfoResult', () => { }) }) - test('text format includes identity section', () => { + test('text format includes Store and Access sections by default', () => { renderStoreInfoResult(baseResult(), 'text') expect(renderInfo).toHaveBeenCalledOnce() const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as {customSections: {title: string}[]} const titles = opts.customSections.map((s) => s.title) - expect(titles).toContain('Overview') + expect(titles).toContain('Store') + expect(titles).toContain('Access') }) - test('text format includes Plan & lifecycle when Tier 2 data present', () => { + test('text format includes Plan section when plan data is present', () => { renderStoreInfoResult( baseResult({plan: {name: 'Basic'}, billing_currency: 'USD'}), 'text', ) const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as {customSections: {title: string}[]} - expect(opts.customSections.map((s) => s.title)).toContain('Plan & lifecycle') + expect(opts.customSections.map((s) => s.title)).toContain('Plan') }) - test('text format includes Admin details when Tier 3 data present', () => { + test('text format includes Activity section when activity data is present', () => { renderStoreInfoResult( - baseResult({shop_owner: {name: 'Alice'}, timezone: 'America/New_York'}), + baseResult({created_at: '2025-01-01T00:00:00.000Z', last_access: '2026-05-20T00:00:00.000Z'}), 'text', ) const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as {customSections: {title: string}[]} - expect(opts.customSections.map((s) => s.title)).toContain('Admin details') + expect(opts.customSections.map((s) => s.title)).toContain('Activity') + }) + + test('timezone is rendered in the Store section', () => { + renderStoreInfoResult(baseResult({timezone: 'America/New_York'}), 'text') + const opts = vi.mocked(renderInfo).mock.calls[0]?.[0] as { + customSections: {title: string; body: {list: {items: string[]}}}[] + } + const store = opts.customSections.find((s) => s.title === 'Store') + expect(store?.body.list.items.some((item) => item.includes('Timezone: America/New_York'))).toBe(true) }) test('text format adds Missing or partial fields section when _field_errors is non-empty', () => { diff --git a/packages/store/src/cli/services/store/info/result.ts b/packages/store/src/cli/services/store/info/result.ts index 45e1755940a..a9930d72887 100644 --- a/packages/store/src/cli/services/store/info/result.ts +++ b/packages/store/src/cli/services/store/info/result.ts @@ -22,25 +22,13 @@ export function renderStoreInfoResult(result: StoreInfoResult, format: StoreInfo function buildTextSections(result: StoreInfoResult): AlertCustomSection[] { const sections: AlertCustomSection[] = [] - sections.push({ - title: 'Overview', - body: {list: {items: identityItems(result)}}, - }) - - const tier2 = tier2Items(result) - if (tier2.length > 0) { - sections.push({ - title: 'Plan & lifecycle', - body: {list: {items: tier2}}, - }) - } - - const tier3 = tier3Items(result) - if (tier3.length > 0) { - sections.push({ - title: 'Admin details', - body: {list: {items: tier3}}, - }) + for (const {title, items} of [ + {title: 'Store', items: storeItems(result)}, + {title: 'Access', items: accessItems(result)}, + {title: 'Plan', items: planItems(result)}, + {title: 'Activity', items: activityItems(result)}, + ]) { + if (items.length > 0) sections.push({title, body: {list: {items}}}) } if (result._field_errors && Object.keys(result._field_errors).length > 0) { @@ -53,20 +41,28 @@ function buildTextSections(result: StoreInfoResult): AlertCustomSection[] { return sections } -function identityItems(result: StoreInfoResult): string[] { +function storeItems(result: StoreInfoResult): string[] { const items: string[] = [] items.push(line('shop_domain', result.shop_domain)) pushIfPresent(items, 'display_name', result.display_name) pushIfPresent(items, 'store_type', result.store_type) pushIfPresent(items, 'status', result.status) + if (result.setup_required != null) items.push(line('setup_required', formatValue(result.setup_required))) + if (result.owning_org) items.push(line('owning_org', result.owning_org.name)) + if (result.shop_owner?.name) items.push(line('shop_owner', result.shop_owner.name)) + pushIfPresent(items, 'timezone', result.timezone) + return items +} + +function accessItems(result: StoreInfoResult): string[] { + const items: string[] = [] pushIfPresent(items, 'primary_url', result.primary_url) pushIfPresent(items, 'admin_url', result.admin_url) - if (result.owning_org) items.push(line('owning_org', result.owning_org.name)) items.push(line('auth_status', formatAuthStatus(result.auth_status))) return items } -function tier2Items(result: StoreInfoResult): string[] { +function planItems(result: StoreInfoResult): string[] { const items: string[] = [] if (result.plan) { const planText = [result.plan.name, result.plan.variant] @@ -76,17 +72,14 @@ function tier2Items(result: StoreInfoResult): string[] { if (planText) items.push(line('plan', planText)) } pushIfPresent(items, 'billing_currency', result.billing_currency) - pushIfPresent(items, 'created_at', result.created_at) - pushIfPresent(items, 'last_access', result.last_access) + if (result.plus != null) items.push(line('plus', formatValue(result.plus))) return items } -function tier3Items(result: StoreInfoResult): string[] { +function activityItems(result: StoreInfoResult): string[] { const items: string[] = [] - if (result.shop_owner?.name) items.push(line('shop_owner', result.shop_owner.name)) - pushIfPresent(items, 'timezone', result.timezone) - if (result.setup_required != null) items.push(line('setup_required', formatValue(result.setup_required))) - if (result.plus != null) items.push(line('plus', formatValue(result.plus))) + pushIfPresent(items, 'created_at', result.created_at) + pushIfPresent(items, 'last_access', result.last_access) return items } From a742088156547e130d373ecc32d6cfc02ed083a4 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:50:52 +0300 Subject: [PATCH 15/21] Drop stale --verbose references from store info command test The --verbose flag was removed when Admin-sourced fields became automatic for authed shops; the test still asserted on it. --- packages/store/src/cli/commands/store/info.test.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/store/src/cli/commands/store/info.test.ts b/packages/store/src/cli/commands/store/info.test.ts index c29969f65d4..6ae96627e4e 100644 --- a/packages/store/src/cli/commands/store/info.test.ts +++ b/packages/store/src/cli/commands/store/info.test.ts @@ -15,12 +15,11 @@ describe('store info command', () => { }) }) - test('passes store and verbose=false through to the service', async () => { + test('passes the store flag through to the service', async () => { await StoreInfo.run(['--store', 'shop.myshopify.com']) expect(getStoreInfo).toHaveBeenCalledWith({ store: 'shop.myshopify.com', - verbose: false, }) expect(renderStoreInfoResult).toHaveBeenCalledWith( expect.objectContaining({shop_domain: 'shop.myshopify.com'}), @@ -28,15 +27,6 @@ describe('store info command', () => { ) }) - test('passes verbose=true when --verbose flag is set', async () => { - await StoreInfo.run(['--store', 'shop.myshopify.com', '--verbose']) - - expect(getStoreInfo).toHaveBeenCalledWith({ - store: 'shop.myshopify.com', - verbose: true, - }) - }) - test('renders json format when --json flag is set', async () => { await StoreInfo.run(['--store', 'shop.myshopify.com', '--json']) @@ -46,6 +36,5 @@ describe('store info command', () => { test('defines the expected flags', () => { expect(StoreInfo.flags.store).toBeDefined() expect(StoreInfo.flags.json).toBeDefined() - expect(StoreInfo.flags.verbose).toBeDefined() }) }) From aefa7e9fd37c92b60bebf007739f02a850920786 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Thu, 28 May 2026 23:53:30 +0300 Subject: [PATCH 16/21] Drop unused exports from store info internals knip flagged a handful of types and option interfaces that were exported but only referenced inside their own file. Also drop the stale --full and Tier-1/2 comments from the result envelope. --- .../store/src/cli/services/store/info/destinations.ts | 2 +- packages/store/src/cli/services/store/info/index.ts | 2 +- .../src/cli/services/store/info/organization-shop.ts | 2 +- packages/store/src/cli/services/store/info/result.ts | 2 +- packages/store/src/cli/services/store/info/types.ts | 10 ++++------ 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/store/src/cli/services/store/info/destinations.ts b/packages/store/src/cli/services/store/info/destinations.ts index 5451ecc2250..c330c6107f3 100644 --- a/packages/store/src/cli/services/store/info/destinations.ts +++ b/packages/store/src/cli/services/store/info/destinations.ts @@ -54,7 +54,7 @@ export interface OrganizationForDestinationResponse { } | null } -export interface FetchDestinationsContextOptions { +interface FetchDestinationsContextOptions { store: string token?: string } diff --git a/packages/store/src/cli/services/store/info/index.ts b/packages/store/src/cli/services/store/info/index.ts index e0e7d500f9b..766f889b5f5 100644 --- a/packages/store/src/cli/services/store/info/index.ts +++ b/packages/store/src/cli/services/store/info/index.ts @@ -14,7 +14,7 @@ import type { import {AbortError, FatalError} from '@shopify/cli-kit/node/error' import {compact} from '@shopify/cli-kit/common/object' -export interface GetStoreInfoOptions { +interface GetStoreInfoOptions { store?: string } diff --git a/packages/store/src/cli/services/store/info/organization-shop.ts b/packages/store/src/cli/services/store/info/organization-shop.ts index 999d4004037..3582c9f8f36 100644 --- a/packages/store/src/cli/services/store/info/organization-shop.ts +++ b/packages/store/src/cli/services/store/info/organization-shop.ts @@ -40,7 +40,7 @@ export interface OrganizationShopResponse { } | null } -export interface FetchOrganizationShopOptions { +interface FetchOrganizationShopOptions { store: string organizationId: string token?: string diff --git a/packages/store/src/cli/services/store/info/result.ts b/packages/store/src/cli/services/store/info/result.ts index a9930d72887..cd7128e87f9 100644 --- a/packages/store/src/cli/services/store/info/result.ts +++ b/packages/store/src/cli/services/store/info/result.ts @@ -4,7 +4,7 @@ import {renderInfo} from '@shopify/cli-kit/node/ui' import {capitalizeWords, formatDate} from '@shopify/cli-kit/common/string' import type {AlertCustomSection} from '@shopify/cli-kit/node/ui' -export type StoreInfoOutputFormat = 'text' | 'json' +type StoreInfoOutputFormat = 'text' | 'json' const DATE_FIELDS = new Set(['created_at', 'last_access']) diff --git a/packages/store/src/cli/services/store/info/types.ts b/packages/store/src/cli/services/store/info/types.ts index b1d96b306d5..446bcc4be35 100644 --- a/packages/store/src/cli/services/store/info/types.ts +++ b/packages/store/src/cli/services/store/info/types.ts @@ -1,11 +1,11 @@ -export type StoreInfoFieldErrorSource = 'bp_destinations' | 'bp_organizations' | 'admin' | 'cli' +type StoreInfoFieldErrorSource = 'bp_destinations' | 'bp_organizations' | 'admin' | 'cli' export interface StoreInfoFieldError { source: StoreInfoFieldErrorSource reason: string } -export interface StoreInfoOwningOrg { +interface StoreInfoOwningOrg { name: string } @@ -18,7 +18,7 @@ export interface OwningOrgInternal { id?: string } -export interface StoreInfoShopOwner { +interface StoreInfoShopOwner { name?: string } @@ -34,7 +34,6 @@ export interface StoreInfoAuthStatus { } export interface StoreInfoResult { - // Tier 1 shop_domain: string display_name?: string store_type?: string @@ -44,13 +43,12 @@ export interface StoreInfoResult { owning_org?: StoreInfoOwningOrg auth_status: StoreInfoAuthStatus - // Tier 2 plan?: StoreInfoPlan billing_currency?: string created_at?: string last_access?: string - // --full (+ authed) only + // Sourced from Admin API; only populated when the shop has been authed via `store auth`. shop_owner?: StoreInfoShopOwner timezone?: string setup_required?: boolean From 1d09887191712060fa3d16a7e83beb59a9ff2bde Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Fri, 29 May 2026 00:03:52 +0300 Subject: [PATCH 17/21] Share decodeOrganizationGid between organizations and store packages Both @shopify/organizations and the store info plumbing were decoding base64-encoded organization GIDs. Pull the helper into the organizations package's models module and export it, then have store info import it. Returns string | undefined so each caller can decide what to do on failure: fetchOrganizations still aborts (the id is required to display the org); store info silently omits the id (the BP Organizations request would have failed with a garbage id anyway). --- .../src/cli/models/organization.test.ts | 18 +++++++++++++++ .../src/cli/models/organization.ts | 11 ++++++++++ .../organizations/src/cli/services/fetch.ts | 22 +++++++------------ packages/organizations/src/index.ts | 1 + packages/store/package.json | 3 ++- .../cli/services/store/info/destinations.ts | 12 +++------- packages/store/tsconfig.build.json | 3 ++- packages/store/tsconfig.json | 3 ++- pnpm-lock.yaml | 3 +++ 9 files changed, 50 insertions(+), 26 deletions(-) create mode 100644 packages/organizations/src/cli/models/organization.test.ts diff --git a/packages/organizations/src/cli/models/organization.test.ts b/packages/organizations/src/cli/models/organization.test.ts new file mode 100644 index 00000000000..ed36bd0c53c --- /dev/null +++ b/packages/organizations/src/cli/models/organization.test.ts @@ -0,0 +1,18 @@ +import {decodeOrganizationGid} from './organization.js' +import {describe, expect, test} from 'vitest' + +describe('decodeOrganizationGid', () => { + test('extracts the numeric id from a base64-encoded GraphQL global id', () => { + const gid = Buffer.from('gid://organization/Organization/1234').toString('base64') + expect(decodeOrganizationGid(gid)).toBe('1234') + }) + + test('returns undefined when the decoded string does not end with a numeric id', () => { + const gid = Buffer.from('not-a-gid').toString('base64') + expect(decodeOrganizationGid(gid)).toBeUndefined() + }) + + test('returns undefined for non-base64 garbage that decodes without a trailing numeric id', () => { + expect(decodeOrganizationGid('!!!')).toBeUndefined() + }) +}) diff --git a/packages/organizations/src/cli/models/organization.ts b/packages/organizations/src/cli/models/organization.ts index b4efab626c5..fc86d858b2e 100644 --- a/packages/organizations/src/cli/models/organization.ts +++ b/packages/organizations/src/cli/models/organization.ts @@ -2,3 +2,14 @@ export interface Organization { id: string businessName: string } + +/** + * Decodes a base64-encoded GraphQL global id like + * `gid://organization/Organization/123` and returns the bare numeric id. + * Returns undefined when the input doesn't match that shape. + */ +export function decodeOrganizationGid(gid: string): string | undefined { + const decoded = Buffer.from(gid, 'base64').toString('ascii') + const match = decoded.match(/\/(\d+)$/) + return match ? match[1] : undefined +} diff --git a/packages/organizations/src/cli/services/fetch.ts b/packages/organizations/src/cli/services/fetch.ts index 0d35fb8f899..e48a49863cf 100644 --- a/packages/organizations/src/cli/services/fetch.ts +++ b/packages/organizations/src/cli/services/fetch.ts @@ -1,5 +1,5 @@ import {ListOrganizations} from '../api/graphql/business-platform-destinations/generated/organizations.js' -import {Organization} from '../models/organization.js' +import {Organization, decodeOrganizationGid} from '../models/organization.js' import {businessPlatformRequestDoc} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' import {AbortError} from '@shopify/cli-kit/node/error' @@ -25,17 +25,11 @@ export async function fetchOrganizations(): Promise { } const orgs = result.currentUserAccount.organizationsWithAccessToDestination.nodes - return orgs.map((org) => ({ - id: idFromEncodedGid(org.id), - businessName: org.name, - })) -} - -function idFromEncodedGid(gid: string): string { - const decodedGid = Buffer.from(gid, 'base64').toString('ascii') - const match = decodedGid.match(/\/(\d+)$/) - if (!match) { - throw new AbortError(`Failed to decode organization ID from: ${gid}`) - } - return match[1]! + return orgs.map((org) => { + const id = decodeOrganizationGid(org.id) + if (!id) { + throw new AbortError(`Failed to decode organization ID from: ${org.id}`) + } + return {id, businessName: org.name} + }) } diff --git a/packages/organizations/src/index.ts b/packages/organizations/src/index.ts index baa41bd1b32..ba6112c8f56 100644 --- a/packages/organizations/src/index.ts +++ b/packages/organizations/src/index.ts @@ -1,4 +1,5 @@ export {fetchOrganizations} from './cli/services/fetch.js' export {selectOrg} from './cli/services/select.js' export {selectOrganizationPrompt} from './cli/prompts/organization.js' +export {decodeOrganizationGid} from './cli/models/organization.js' export type {Organization} from './cli/models/organization.js' diff --git a/packages/store/package.json b/packages/store/package.json index b1843e78742..d636e885bc6 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -40,7 +40,8 @@ }, "dependencies": { "@oclif/core": "4.5.3", - "@shopify/cli-kit": "4.1.0" + "@shopify/cli-kit": "4.1.0", + "@shopify/organizations": "4.1.0" }, "devDependencies": { "@vitest/coverage-istanbul": "^3.1.4" diff --git a/packages/store/src/cli/services/store/info/destinations.ts b/packages/store/src/cli/services/store/info/destinations.ts index c330c6107f3..479fc4e92cb 100644 --- a/packages/store/src/cli/services/store/info/destinations.ts +++ b/packages/store/src/cli/services/store/info/destinations.ts @@ -2,6 +2,7 @@ import {extractHost, extractMyshopifyHandle} from './host.js' import {AbortError} from '@shopify/cli-kit/node/error' import {businessPlatformRequest} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' +import {decodeOrganizationGid} from '@shopify/organizations' import type {DestinationNode, DestinationsContext, OwningOrgInternal, StoreInfoFieldError} from './types.js' const DESTINATIONS_QUERY = ` @@ -100,9 +101,10 @@ export async function fetchDestinationsContext(options: FetchDestinationsContext ) const org = orgResponse.currentUserAccount?.organizationForDestination if (org) { + const decodedId = org.id ? decodeOrganizationGid(org.id) : undefined owningOrg = { name: org.name, - ...(org.id ? {id: decodeOrganizationGid(org.id)} : {}), + ...(decodedId ? {id: decodedId} : {}), } } else { owningOrgError = { @@ -132,14 +134,6 @@ function matchesStore(node: DestinationNode, lowerStore: string): boolean { return [node.primaryDomain, node.webUrl].some((value) => extractHost(value) === lowerStore) } -function decodeOrganizationGid(gid: string): string | undefined { - // Org ids come back as base64-encoded GraphQL global ids: "gid://organization/Organization/123". - // We want the bare numeric id; if the shape doesn't match, fall back to the raw value. - const decoded = Buffer.from(gid, 'base64').toString('ascii') - const match = decoded.match(/\/(\d+)$/) - return match ? match[1] : gid -} - function errorMessage(error: unknown): string { if (error instanceof Error) return error.message return String(error) diff --git a/packages/store/tsconfig.build.json b/packages/store/tsconfig.build.json index 16506ad61a2..768f94cbdb9 100644 --- a/packages/store/tsconfig.build.json +++ b/packages/store/tsconfig.build.json @@ -2,6 +2,7 @@ "extends": "./tsconfig.json", "exclude": ["**/*.test.ts"], "references": [ - {"path": "../cli-kit"} + {"path": "../cli-kit"}, + {"path": "../organizations"} ] } diff --git a/packages/store/tsconfig.json b/packages/store/tsconfig.json index ea7490fa22f..b860755b2f5 100644 --- a/packages/store/tsconfig.json +++ b/packages/store/tsconfig.json @@ -8,6 +8,7 @@ "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" }, "references": [ - {"path": "../cli-kit"} + {"path": "../cli-kit"}, + {"path": "../organizations"} ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6bc9736c72..2815b75c6f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -651,6 +651,9 @@ importers: '@shopify/cli-kit': specifier: 4.1.0 version: link:../cli-kit + '@shopify/organizations': + specifier: 4.1.0 + version: link:../organizations devDependencies: '@vitest/coverage-istanbul': specifier: ^3.1.4 From c1e7a69ec6f48f6976fa5482bd0c4ad1cc0174f4 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Sun, 31 May 2026 21:16:58 +0300 Subject: [PATCH 18/21] Move GID codec to cli-kit and apply across the codebase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The base64↔gid logic isn't organization-specific, so a helper named decodeOrganizationGid in @shopify/organizations was misleading. Add three generic primitives in @shopify/cli-kit/common/gid: - numericIdFromGid: extract / from a plain gid://... - numericIdFromEncodedGid: same, but for base64-encoded gids - encodeGid: base64-encode a plain gid Thread these through every site that does the same work: - @shopify/organizations fetch.ts - @shopify/store store info destinations - app-management-client.ts (numberFromGid/idFromEncodedGid wrappers keep their domain semantics — auto-detect numeric strings, fail-fast on bad gids — but delegate the regex/base64 work) Domain-validated extractors like extractBulkOperationId (@shopify/app bulk operations) stay; they require a specific gid prefix that the generic helper doesn't enforce. Drops the store→organizations dependency that existed only for this helper. --- .../app-management-client.ts | 19 ++++++--- .../cli-kit/src/public/common/gid.test.ts | 39 +++++++++++++++++++ packages/cli-kit/src/public/common/gid.ts | 33 ++++++++++++++++ .../src/cli/models/organization.test.ts | 18 --------- .../src/cli/models/organization.ts | 11 ------ .../organizations/src/cli/services/fetch.ts | 5 ++- packages/organizations/src/index.ts | 1 - packages/store/package.json | 3 +- .../cli/services/store/info/destinations.ts | 4 +- packages/store/tsconfig.build.json | 3 +- packages/store/tsconfig.json | 3 +- pnpm-lock.yaml | 3 -- 12 files changed, 93 insertions(+), 49 deletions(-) create mode 100644 packages/cli-kit/src/public/common/gid.test.ts create mode 100644 packages/cli-kit/src/public/common/gid.ts delete mode 100644 packages/organizations/src/cli/models/organization.test.ts diff --git a/packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts b/packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts index 5d8ac4d1c8f..94badf04945 100644 --- a/packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts +++ b/packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts @@ -159,6 +159,7 @@ import { BusinessPlatformRequestOptions, } from '@shopify/cli-kit/node/api/business-platform' import {CLI_KIT_VERSION} from '@shopify/cli-kit/common/version' +import {encodeGid, numericIdFromEncodedGid, numericIdFromGid} from '@shopify/cli-kit/common/gid' import {versionSatisfies} from '@shopify/cli-kit/node/node-package-manager' import {outputDebug} from '@shopify/cli-kit/node/output' import {developerDashboardFqdn, normalizeStoreFqdn} from '@shopify/cli-kit/node/context/fqdn' @@ -1266,7 +1267,7 @@ export function organizationGidForBP(id: string): string { // 1234 => gid://organization/Organization/1234 => base64 export function encodedGidFromOrganizationIdForBP(id: string): string { - return Buffer.from(organizationGidForBP(id)).toString('base64') + return encodeGid(organizationGidForBP(id)) } // App Managament uses a different GID format than Business Platform for organizationId. @@ -1277,20 +1278,26 @@ function gidFromOrganizationIdForShopify(id: string): string { // 1234 => gid://organization/ShopifyShop/1234 => base64 export function encodedGidFromShopId(id: string): string { - const gid = `gid://organization/ShopifyShop/${id}` - return Buffer.from(gid).toString('base64') + return encodeGid(`gid://organization/ShopifyShop/${id}`) } // base64 => gid://organization/Organization/1234 => 1234 function idFromEncodedGid(gid: string): string { - const decodedGid = Buffer.from(gid, 'base64').toString('ascii') - return numberFromGid(decodedGid).toString() + const numeric = numericIdFromEncodedGid(gid) + if (numeric === undefined) { + throw new Error(`Invalid encoded GID: ${gid}`) + } + return numeric } // gid://organization/Organization/1234 => 1234 function numberFromGid(gid: string): number { if (gid.startsWith('gid://')) { - return Number(gid.match(/^gid.*\/(\d+)$/)![1]) + const numeric = numericIdFromGid(gid) + if (numeric === undefined) { + throw new Error(`Invalid GID: ${gid}`) + } + return Number(numeric) } return Number(gid) } diff --git a/packages/cli-kit/src/public/common/gid.test.ts b/packages/cli-kit/src/public/common/gid.test.ts new file mode 100644 index 00000000000..3a58f7ae6e6 --- /dev/null +++ b/packages/cli-kit/src/public/common/gid.test.ts @@ -0,0 +1,39 @@ +import {encodeGid, numericIdFromEncodedGid, numericIdFromGid} from './gid.js' +import {describe, expect, test} from 'vitest' + +describe('numericIdFromGid', () => { + test('extracts the trailing numeric id from a plain gid', () => { + expect(numericIdFromGid('gid://shopify/Product/1234')).toBe('1234') + expect(numericIdFromGid('gid://organization/Organization/9876')).toBe('9876') + }) + + test('returns undefined when there is no trailing /', () => { + expect(numericIdFromGid('gid://shopify/Product/ABC')).toBeUndefined() + expect(numericIdFromGid('not-a-gid')).toBeUndefined() + expect(numericIdFromGid('1234')).toBeUndefined() + }) +}) + +describe('numericIdFromEncodedGid', () => { + test('extracts the trailing numeric id from a base64-encoded gid', () => { + const gid = Buffer.from('gid://organization/Organization/1234').toString('base64') + expect(numericIdFromEncodedGid(gid)).toBe('1234') + }) + + test('returns undefined when the decoded string does not end with /', () => { + expect(numericIdFromEncodedGid(Buffer.from('not-a-gid').toString('base64'))).toBeUndefined() + expect(numericIdFromEncodedGid('!!!')).toBeUndefined() + }) +}) + +describe('encodeGid', () => { + test('base64-encodes a plain gid', () => { + expect(encodeGid('gid://organization/Organization/1234')).toBe( + Buffer.from('gid://organization/Organization/1234').toString('base64'), + ) + }) + + test('round-trips with numericIdFromEncodedGid', () => { + expect(numericIdFromEncodedGid(encodeGid('gid://shopify/Product/42'))).toBe('42') + }) +}) diff --git a/packages/cli-kit/src/public/common/gid.ts b/packages/cli-kit/src/public/common/gid.ts new file mode 100644 index 00000000000..8d69694db6e --- /dev/null +++ b/packages/cli-kit/src/public/common/gid.ts @@ -0,0 +1,33 @@ +/** + * Extracts the trailing numeric id from a plain GraphQL global id like + * `gid://shopify/Product/123`. + * + * @param gid - A plain GraphQL global id string. + * @returns The trailing numeric id, or undefined when the string does not end with `/`. + */ +export function numericIdFromGid(gid: string): string | undefined { + const match = gid.match(/\/(\d+)$/) + return match ? match[1] : undefined +} + +/** + * Decodes a base64-encoded GraphQL global id (for example, the form + * Business Platform APIs return) and returns the trailing numeric id. + * + * @param gid - A base64-encoded GraphQL global id. + * @returns The trailing numeric id, or undefined when the decoded string does not end with `/`. + */ +export function numericIdFromEncodedGid(gid: string): string | undefined { + return numericIdFromGid(Buffer.from(gid, 'base64').toString('ascii')) +} + +/** + * Encodes a plain GraphQL global id (`gid://...`) as base64, which is the + * form some Business Platform endpoints require. + * + * @param gid - A plain GraphQL global id string to encode. + * @returns The base64-encoded gid. + */ +export function encodeGid(gid: string): string { + return Buffer.from(gid).toString('base64') +} diff --git a/packages/organizations/src/cli/models/organization.test.ts b/packages/organizations/src/cli/models/organization.test.ts deleted file mode 100644 index ed36bd0c53c..00000000000 --- a/packages/organizations/src/cli/models/organization.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {decodeOrganizationGid} from './organization.js' -import {describe, expect, test} from 'vitest' - -describe('decodeOrganizationGid', () => { - test('extracts the numeric id from a base64-encoded GraphQL global id', () => { - const gid = Buffer.from('gid://organization/Organization/1234').toString('base64') - expect(decodeOrganizationGid(gid)).toBe('1234') - }) - - test('returns undefined when the decoded string does not end with a numeric id', () => { - const gid = Buffer.from('not-a-gid').toString('base64') - expect(decodeOrganizationGid(gid)).toBeUndefined() - }) - - test('returns undefined for non-base64 garbage that decodes without a trailing numeric id', () => { - expect(decodeOrganizationGid('!!!')).toBeUndefined() - }) -}) diff --git a/packages/organizations/src/cli/models/organization.ts b/packages/organizations/src/cli/models/organization.ts index fc86d858b2e..b4efab626c5 100644 --- a/packages/organizations/src/cli/models/organization.ts +++ b/packages/organizations/src/cli/models/organization.ts @@ -2,14 +2,3 @@ export interface Organization { id: string businessName: string } - -/** - * Decodes a base64-encoded GraphQL global id like - * `gid://organization/Organization/123` and returns the bare numeric id. - * Returns undefined when the input doesn't match that shape. - */ -export function decodeOrganizationGid(gid: string): string | undefined { - const decoded = Buffer.from(gid, 'base64').toString('ascii') - const match = decoded.match(/\/(\d+)$/) - return match ? match[1] : undefined -} diff --git a/packages/organizations/src/cli/services/fetch.ts b/packages/organizations/src/cli/services/fetch.ts index e48a49863cf..cab34b004ba 100644 --- a/packages/organizations/src/cli/services/fetch.ts +++ b/packages/organizations/src/cli/services/fetch.ts @@ -1,8 +1,9 @@ import {ListOrganizations} from '../api/graphql/business-platform-destinations/generated/organizations.js' -import {Organization, decodeOrganizationGid} from '../models/organization.js' +import {Organization} from '../models/organization.js' import {businessPlatformRequestDoc} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' import {AbortError} from '@shopify/cli-kit/node/error' +import {numericIdFromEncodedGid} from '@shopify/cli-kit/common/gid' export async function fetchOrganizations(): Promise { const token = await ensureAuthenticatedBusinessPlatform() @@ -26,7 +27,7 @@ export async function fetchOrganizations(): Promise { const orgs = result.currentUserAccount.organizationsWithAccessToDestination.nodes return orgs.map((org) => { - const id = decodeOrganizationGid(org.id) + const id = numericIdFromEncodedGid(org.id) if (!id) { throw new AbortError(`Failed to decode organization ID from: ${org.id}`) } diff --git a/packages/organizations/src/index.ts b/packages/organizations/src/index.ts index ba6112c8f56..baa41bd1b32 100644 --- a/packages/organizations/src/index.ts +++ b/packages/organizations/src/index.ts @@ -1,5 +1,4 @@ export {fetchOrganizations} from './cli/services/fetch.js' export {selectOrg} from './cli/services/select.js' export {selectOrganizationPrompt} from './cli/prompts/organization.js' -export {decodeOrganizationGid} from './cli/models/organization.js' export type {Organization} from './cli/models/organization.js' diff --git a/packages/store/package.json b/packages/store/package.json index d636e885bc6..b1843e78742 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -40,8 +40,7 @@ }, "dependencies": { "@oclif/core": "4.5.3", - "@shopify/cli-kit": "4.1.0", - "@shopify/organizations": "4.1.0" + "@shopify/cli-kit": "4.1.0" }, "devDependencies": { "@vitest/coverage-istanbul": "^3.1.4" diff --git a/packages/store/src/cli/services/store/info/destinations.ts b/packages/store/src/cli/services/store/info/destinations.ts index 479fc4e92cb..fa7864eb290 100644 --- a/packages/store/src/cli/services/store/info/destinations.ts +++ b/packages/store/src/cli/services/store/info/destinations.ts @@ -2,7 +2,7 @@ import {extractHost, extractMyshopifyHandle} from './host.js' import {AbortError} from '@shopify/cli-kit/node/error' import {businessPlatformRequest} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' -import {decodeOrganizationGid} from '@shopify/organizations' +import {numericIdFromEncodedGid} from '@shopify/cli-kit/common/gid' import type {DestinationNode, DestinationsContext, OwningOrgInternal, StoreInfoFieldError} from './types.js' const DESTINATIONS_QUERY = ` @@ -101,7 +101,7 @@ export async function fetchDestinationsContext(options: FetchDestinationsContext ) const org = orgResponse.currentUserAccount?.organizationForDestination if (org) { - const decodedId = org.id ? decodeOrganizationGid(org.id) : undefined + const decodedId = org.id ? numericIdFromEncodedGid(org.id) : undefined owningOrg = { name: org.name, ...(decodedId ? {id: decodedId} : {}), diff --git a/packages/store/tsconfig.build.json b/packages/store/tsconfig.build.json index 768f94cbdb9..16506ad61a2 100644 --- a/packages/store/tsconfig.build.json +++ b/packages/store/tsconfig.build.json @@ -2,7 +2,6 @@ "extends": "./tsconfig.json", "exclude": ["**/*.test.ts"], "references": [ - {"path": "../cli-kit"}, - {"path": "../organizations"} + {"path": "../cli-kit"} ] } diff --git a/packages/store/tsconfig.json b/packages/store/tsconfig.json index b860755b2f5..ea7490fa22f 100644 --- a/packages/store/tsconfig.json +++ b/packages/store/tsconfig.json @@ -8,7 +8,6 @@ "tsBuildInfoFile": "dist/tsconfig.tsbuildinfo" }, "references": [ - {"path": "../cli-kit"}, - {"path": "../organizations"} + {"path": "../cli-kit"} ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2815b75c6f7..f6bc9736c72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -651,9 +651,6 @@ importers: '@shopify/cli-kit': specifier: 4.1.0 version: link:../cli-kit - '@shopify/organizations': - specifier: 4.1.0 - version: link:../organizations devDependencies: '@vitest/coverage-istanbul': specifier: ^3.1.4 From 32d49eadd10fca9f0e097326acb990f58126e628 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Sun, 31 May 2026 21:23:08 +0300 Subject: [PATCH 19/21] Lift extractHost and extractMyshopifyHandle to cli-kit/common/url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Neither helper was specific to store info — extractHost is a generic URL→host parser, and extractMyshopifyHandle is Shopify-domain logic that already has neighbors in cli-kit. Move both into @shopify/cli-kit/common/url alongside isValidURL and safeParseURL, add direct tests, and delete the store/info/host.ts module. extractHost now uses safeParseURL to avoid a bare try/catch. --- .../cli-kit/src/public/common/url.test.ts | 33 ++++++++++++++++++- packages/cli-kit/src/public/common/url.ts | 29 ++++++++++++++++ .../cli/services/store/info/destinations.ts | 2 +- .../store/src/cli/services/store/info/host.ts | 16 --------- .../services/store/info/organization-shop.ts | 2 +- 5 files changed, 63 insertions(+), 19 deletions(-) delete mode 100644 packages/store/src/cli/services/store/info/host.ts diff --git a/packages/cli-kit/src/public/common/url.test.ts b/packages/cli-kit/src/public/common/url.test.ts index c3dea50d3ec..ed72607d172 100644 --- a/packages/cli-kit/src/public/common/url.test.ts +++ b/packages/cli-kit/src/public/common/url.test.ts @@ -1,4 +1,4 @@ -import {isValidURL, safeParseURL} from './url.js' +import {extractHost, extractMyshopifyHandle, isValidURL, safeParseURL} from './url.js' import {describe, expect, test} from 'vitest' describe('isValidURL', () => { @@ -57,3 +57,34 @@ describe('safeParseURL', () => { expect(result).toBeUndefined() }) }) + +describe('extractHost', () => { + test('returns the hostname for a full URL', () => { + expect(extractHost('https://Shop.MyShopify.com/admin')).toBe('shop.myshopify.com') + }) + + test('strips the scheme and path for a bare host string', () => { + expect(extractHost('shop.myshopify.com/admin')).toBe('shop.myshopify.com') + }) + + test('returns undefined for null/undefined/empty input', () => { + expect(extractHost(null)).toBeUndefined() + expect(extractHost(undefined)).toBeUndefined() + expect(extractHost('')).toBeUndefined() + }) +}) + +describe('extractMyshopifyHandle', () => { + test('extracts the subdomain from a myshopify.com URL', () => { + expect(extractMyshopifyHandle('https://my-shop.myshopify.com')).toBe('my-shop') + }) + + test('returns undefined when the host is not a myshopify.com domain', () => { + expect(extractMyshopifyHandle('https://example.com')).toBeUndefined() + }) + + test('returns undefined for null/undefined input', () => { + expect(extractMyshopifyHandle(null)).toBeUndefined() + expect(extractMyshopifyHandle(undefined)).toBeUndefined() + }) +}) diff --git a/packages/cli-kit/src/public/common/url.ts b/packages/cli-kit/src/public/common/url.ts index 6a6086efe86..12b3316b324 100644 --- a/packages/cli-kit/src/public/common/url.ts +++ b/packages/cli-kit/src/public/common/url.ts @@ -28,3 +28,32 @@ export function safeParseURL(url: string): URL | undefined { return undefined } } + +/** + * Extracts the lowercased hostname from a URL-shaped string. Tolerates + * bare hosts (without a scheme) and inputs that come back from APIs as + * either `https://shop.myshopify.com` or `shop.myshopify.com`. + * + * @param value - A URL or bare host string, possibly null/undefined. + * @returns The lowercased hostname, or undefined when the input is empty. + */ +export function extractHost(value: string | null | undefined): string | undefined { + if (!value) return undefined + const lowered = value.toLowerCase() + const parsed = safeParseURL(lowered) + if (parsed) return parsed.hostname + return lowered.replace(/^https?:\/\//, '').split('/')[0] +} + +/** + * Extracts the subdomain handle from a `*.myshopify.com` URL or host. + * + * @param value - A URL or host string, possibly null/undefined. + * @returns The myshopify subdomain handle, or undefined when the input isn't a `*.myshopify.com` URL. + */ +export function extractMyshopifyHandle(value: string | null | undefined): string | undefined { + const host = extractHost(value) + if (!host) return undefined + const match = host.match(/^([^.]+)\.myshopify\.com$/) + return match ? match[1] : undefined +} diff --git a/packages/store/src/cli/services/store/info/destinations.ts b/packages/store/src/cli/services/store/info/destinations.ts index fa7864eb290..21e9dc4784b 100644 --- a/packages/store/src/cli/services/store/info/destinations.ts +++ b/packages/store/src/cli/services/store/info/destinations.ts @@ -1,8 +1,8 @@ -import {extractHost, extractMyshopifyHandle} from './host.js' import {AbortError} from '@shopify/cli-kit/node/error' import {businessPlatformRequest} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' import {numericIdFromEncodedGid} from '@shopify/cli-kit/common/gid' +import {extractHost, extractMyshopifyHandle} from '@shopify/cli-kit/common/url' import type {DestinationNode, DestinationsContext, OwningOrgInternal, StoreInfoFieldError} from './types.js' const DESTINATIONS_QUERY = ` diff --git a/packages/store/src/cli/services/store/info/host.ts b/packages/store/src/cli/services/store/info/host.ts deleted file mode 100644 index 5ab00cbe8c1..00000000000 --- a/packages/store/src/cli/services/store/info/host.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function extractHost(value: string | null | undefined): string | undefined { - if (!value) return undefined - const lowered = value.toLowerCase() - try { - return new URL(lowered).hostname - } catch { - return lowered.replace(/^https?:\/\//, '').split('/')[0] - } -} - -export function extractMyshopifyHandle(value: string | null | undefined): string | undefined { - const host = extractHost(value) - if (!host) return undefined - const match = host.match(/^([^.]+)\.myshopify\.com$/) - return match ? match[1] : undefined -} diff --git a/packages/store/src/cli/services/store/info/organization-shop.ts b/packages/store/src/cli/services/store/info/organization-shop.ts index 3582c9f8f36..952e32f8cbe 100644 --- a/packages/store/src/cli/services/store/info/organization-shop.ts +++ b/packages/store/src/cli/services/store/info/organization-shop.ts @@ -1,7 +1,7 @@ -import {extractHost} from './host.js' import {BugError} from '@shopify/cli-kit/node/error' import {businessPlatformOrganizationsRequest} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' +import {extractHost} from '@shopify/cli-kit/common/url' import type {OrganizationShopFields} from './types.js' const ORGANIZATION_SHOP_QUERY = ` From 0a80c7668ccc9b373ae8c3226237b09d7f1ffa11 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Sun, 31 May 2026 21:46:34 +0300 Subject: [PATCH 20/21] Move store info GraphQL queries into .graphql files with codegen Follow the repo convention used by other packages: queries live in .graphql files under src/cli/api/graphql//queries/, with typed documents generated alongside. Replaces hand-written inline query strings and hand-typed response interfaces with the businessPlatform- RequestDoc / businessPlatformOrganizationsRequestDoc / adminRequestDoc typed-document variants. Co-Authored-By: Claude Opus 4.7 (1M context) --- graphql.config.ts | 3 + package.json | 18 + packages/store/package.json | 1 + packages/store/project.json | 80 + .../api/graphql/admin/admin_schema.graphql | 143187 +++++++++++++++ .../admin/generated/store-info-admin-shop.ts | 50 + .../api/graphql/admin/generated/types.d.ts | 118 + .../queries/store-info-admin-shop.graphql | 10 + .../destinations_schema.graphql | 691 + .../generated/store-info-destinations.ts | 105 + .../generated/store-info-owning-org.ts | 64 + .../generated/types.d.ts | 36 + .../queries/store-info-destinations.graphql | 19 + .../queries/store-info-owning-org.graphql | 8 + .../generated/store-info-shop.ts | 112 + .../generated/types.d.ts | 95 + .../organizations_schema.graphql | 19059 ++ .../queries/store-info-shop.graphql | 21 + .../services/store/info/admin-shop.test.ts | 13 +- .../src/cli/services/store/info/admin-shop.ts | 44 +- .../services/store/info/destinations.test.ts | 51 +- .../cli/services/store/info/destinations.ts | 94 +- .../store/info/organization-shop.test.ts | 19 +- .../services/store/info/organization-shop.ts | 59 +- pnpm-lock.yaml | 3 + 25 files changed, 163786 insertions(+), 174 deletions(-) create mode 100644 packages/store/src/cli/api/graphql/admin/admin_schema.graphql create mode 100644 packages/store/src/cli/api/graphql/admin/generated/store-info-admin-shop.ts create mode 100644 packages/store/src/cli/api/graphql/admin/generated/types.d.ts create mode 100644 packages/store/src/cli/api/graphql/admin/queries/store-info-admin-shop.graphql create mode 100644 packages/store/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql create mode 100644 packages/store/src/cli/api/graphql/business-platform-destinations/generated/store-info-destinations.ts create mode 100644 packages/store/src/cli/api/graphql/business-platform-destinations/generated/store-info-owning-org.ts create mode 100644 packages/store/src/cli/api/graphql/business-platform-destinations/generated/types.d.ts create mode 100644 packages/store/src/cli/api/graphql/business-platform-destinations/queries/store-info-destinations.graphql create mode 100644 packages/store/src/cli/api/graphql/business-platform-destinations/queries/store-info-owning-org.graphql create mode 100644 packages/store/src/cli/api/graphql/business-platform-organizations/generated/store-info-shop.ts create mode 100644 packages/store/src/cli/api/graphql/business-platform-organizations/generated/types.d.ts create mode 100644 packages/store/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql create mode 100644 packages/store/src/cli/api/graphql/business-platform-organizations/queries/store-info-shop.graphql diff --git a/graphql.config.ts b/graphql.config.ts index bc1e9bf2229..e392b65f60a 100644 --- a/graphql.config.ts +++ b/graphql.config.ts @@ -86,5 +86,8 @@ export default { functions: projectFactory('functions', 'functions_cli_schema.graphql', 'app'), adminAsApp: projectFactory('admin', 'admin_schema.graphql'), organizationsDestinations: projectFactory('business-platform-destinations', 'destinations_schema.graphql', 'organizations'), + storeBusinessPlatformDestinations: projectFactory('business-platform-destinations', 'destinations_schema.graphql', 'store'), + storeBusinessPlatformOrganizations: projectFactory('business-platform-organizations', 'organizations_schema.graphql', 'store'), + storeAdmin: projectFactory('admin', 'admin_schema.graphql', 'store'), }, } diff --git a/package.json b/package.json index 20bed9b068a..6716f373697 100644 --- a/package.json +++ b/package.json @@ -227,6 +227,24 @@ ] } }, + "packages/store": { + "entry": [ + "**/{commands,hooks}/**/*.ts!", + "**/index.ts!" + ], + "project": "**/*.ts!", + "ignore": [ + "**/graphql/**/generated/*.ts" + ], + "ignoreDependencies": [ + "@graphql-typed-document-node/core" + ], + "vite": { + "config": [ + "vite.config.ts" + ] + } + }, "packages/cli": { "entry": [ "**/{commands,hooks}/**/*.ts!", diff --git a/packages/store/package.json b/packages/store/package.json index b1843e78742..d03fb78cf10 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -39,6 +39,7 @@ ] }, "dependencies": { + "@graphql-typed-document-node/core": "3.2.0", "@oclif/core": "4.5.3", "@shopify/cli-kit": "4.1.0" }, diff --git a/packages/store/project.json b/packages/store/project.json index ade6270f79e..931a6db8478 100644 --- a/packages/store/project.json +++ b/packages/store/project.json @@ -41,6 +41,86 @@ "command": "pnpm tsc --noEmit", "cwd": "packages/store" } + }, + "graphql-codegen": { + "executor": "nx:noop", + "dependsOn": ["graphql-codegen:formatting"] + }, + "graphql-codegen:formatting": { + "executor": "nx:run-commands", + "dependsOn": ["graphql-codegen:postfix"], + "inputs": [{"dependentTasksOutputFiles": "**/*.ts"}], + "outputs": [ + "{projectRoot}/src/cli/api/graphql/business-platform-destinations/generated/**/*.ts", + "{projectRoot}/src/cli/api/graphql/business-platform-organizations/generated/**/*.ts", + "{projectRoot}/src/cli/api/graphql/admin/generated/**/*.ts" + ], + "options": { + "commands": [ + "pnpm eslint 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}' --fix", + "pnpm eslint 'src/cli/api/graphql/business-platform-organizations/generated/**/*.{ts,tsx}' --fix", + "pnpm eslint 'src/cli/api/graphql/admin/generated/**/*.{ts,tsx}' --fix" + ], + "cwd": "packages/store" + } + }, + "graphql-codegen:generate:business-platform-destinations": { + "executor": "nx:run-commands", + "inputs": [ + "{workspaceRoot}/graphql.config.ts", + "{projectRoot}/src/cli/api/graphql/business-platform-destinations/**/*.graphql" + ], + "outputs": ["{projectRoot}/src/cli/api/graphql/business-platform-destinations/generated/**/*.ts"], + "options": { + "commands": ["pnpm exec graphql-codegen --project=storeBusinessPlatformDestinations"], + "cwd": "{workspaceRoot}" + } + }, + "graphql-codegen:generate:business-platform-organizations": { + "executor": "nx:run-commands", + "inputs": [ + "{workspaceRoot}/graphql.config.ts", + "{projectRoot}/src/cli/api/graphql/business-platform-organizations/**/*.graphql" + ], + "outputs": ["{projectRoot}/src/cli/api/graphql/business-platform-organizations/generated/**/*.ts"], + "options": { + "commands": ["pnpm exec graphql-codegen --project=storeBusinessPlatformOrganizations"], + "cwd": "{workspaceRoot}" + } + }, + "graphql-codegen:generate:admin": { + "executor": "nx:run-commands", + "inputs": [ + "{workspaceRoot}/graphql.config.ts", + "{projectRoot}/src/cli/api/graphql/admin/**/*.graphql" + ], + "outputs": ["{projectRoot}/src/cli/api/graphql/admin/generated/**/*.ts"], + "options": { + "commands": ["pnpm exec graphql-codegen --project=storeAdmin"], + "cwd": "{workspaceRoot}" + } + }, + "graphql-codegen:postfix": { + "executor": "nx:run-commands", + "dependsOn": [ + "graphql-codegen:generate:business-platform-destinations", + "graphql-codegen:generate:business-platform-organizations", + "graphql-codegen:generate:admin" + ], + "inputs": [{"dependentTasksOutputFiles": "**/*.ts"}], + "outputs": [ + "{projectRoot}/src/cli/api/graphql/business-platform-destinations/generated/**/*.ts", + "{projectRoot}/src/cli/api/graphql/business-platform-organizations/generated/**/*.ts", + "{projectRoot}/src/cli/api/graphql/admin/generated/**/*.ts" + ], + "options": { + "commands": [ + "find ./packages/store/src/cli/api/graphql/business-platform-destinations/generated/ -type f -name '*.ts' -exec sh -c 'sed -i \"\" \"s|import \\* as Types from '\\''./types'\\'';|import \\* as Types from '\\''./types.js'\\'';|g; s|export const \\([A-Za-z0-9_]*\\)Document =|export const \\1 =|g\" \"$0\"' {} \\;", + "find ./packages/store/src/cli/api/graphql/business-platform-organizations/generated/ -type f -name '*.ts' -exec sh -c 'sed -i \"\" \"s|import \\* as Types from '\\''./types'\\'';|import \\* as Types from '\\''./types.js'\\'';|g; s|export const \\([A-Za-z0-9_]*\\)Document =|export const \\1 =|g\" \"$0\"' {} \\;", + "find ./packages/store/src/cli/api/graphql/admin/generated/ -type f -name '*.ts' -exec sh -c 'sed -i \"\" \"s|import \\* as Types from '\\''./types'\\'';|import \\* as Types from '\\''./types.js'\\'';|g; s|export const \\([A-Za-z0-9_]*\\)Document =|export const \\1 =|g\" \"$0\"' {} \\;" + ], + "cwd": "{workspaceRoot}" + } } } } diff --git a/packages/store/src/cli/api/graphql/admin/admin_schema.graphql b/packages/store/src/cli/api/graphql/admin/admin_schema.graphql new file mode 100644 index 00000000000..3847d6a17e7 --- /dev/null +++ b/packages/store/src/cli/api/graphql/admin/admin_schema.graphql @@ -0,0 +1,143187 @@ +# This file is auto-generated from the current state of the GraphQL API. Instead of editing this file, +# please edit the ruby definition files and run `bin/rails graphql:schema:dump` to regenerate the schema. +# +# If you're just looking to browse, you may find it friendlier to use the graphiql browser which is +# available in services-internal at https://app.shopify.com/services/internal/shops/14168/graphql. +# Check out the "Docs" tab in the top right. + +""" +Marks an element of a GraphQL schema as requiring a specific access scope. +""" +directive @requiredAccess( + """ + The access scope required to access this element. + """ + scope: String! +) on FIELD_DEFINITION | INTERFACE | OBJECT | UNION + +""" +Declares the concrete GID types accepted by an argument or input field. +""" +directive @gidTypes( + """ + Names of the GID types accepted. + """ + types: [String!]! +) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION + +""" +Marks an element of a GraphQL schema as privately documented. +""" +directive @privatelyDocumented on ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + +""" +Marks a field as protected. Carries the subject and content of the protection. +""" +directive @protectedField( + """ + The subject of the protection. + """ + subject: String = null + + """ + The content of the protection. + """ + content: String = null +) on FIELD_DEFINITION + +""" +Marks an object as protected. Carries the subject of the protection. +""" +directive @protectedObject( + """ + The subject of the protection. + """ + subject: String! +) on OBJECT + +""" +The component that owns a GraphQL type. +""" +directive @componentName( + """ + The component handle. + """ + name: String! +) on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | UNION + +schema { + query: QueryRoot + mutation: Mutation +} + +""" +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 + +""" +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 @idempotent( + """ + The key to identify the idempotent mutation. + """ + key: String! +) on FIELD + +""" +Requires that exactly one field must be supplied and that field must not be `null`. +""" +directive @oneOf on INPUT_OBJECT + +""" +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 + +""" +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 @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") @componentName(name: "checkouts") @protectedObject(subject: "customer") { + """ + The URL for the buyer to recover their checkout. + """ + abandonedCheckoutUrl: URL! + + """ + The billing address provided by the buyer. + Null if the user didn't provide a billing address. + """ + billingAddress: MailingAddress + + """ + The date and time when the buyer completed the checkout. + Null if the checkout hasn't been completed. + """ + completedAt: DateTime + + """ + The date and time when the checkout was created. + """ + createdAt: DateTime! + + """ + A list of extra information that has been added to the checkout. + """ + customAttributes: [Attribute!]! + + """ + The customer who created this checkout. + May be null if the checkout was created from a draft order or via an app. + """ + customer: Customer + + """ + A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that + returns the single next record, sorted ascending by ID. + """ + defaultCursor: String! + + """ + The discount codes entered by the buyer at checkout. + """ + discountCodes: [String!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A list of the line items in this checkout. + """ + lineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): AbandonedCheckoutLineItemConnection! + + """ + The number of products in the checkout. + """ + lineItemsQuantity: Int! @deprecated(reason: "Use [AbandonedCheckoutLineItem.quantity](https:\/\/shopify.dev\/api\/admin-graphql\/unstable\/objects\/AbandonedCheckoutLineItem#field-quantity) instead.") + + """ + Unique merchant-facing identifier for the checkout. + """ + name: String! + + """ + A merchant-facing note added to the checkout. Not visible to the buyer. + """ + note: String! + + """ + The shipping address to where the line items will be shipped. + Null if the user didn't provide a shipping address. + """ + shippingAddress: MailingAddress + + """ + The sum of all items in the checkout, including discounts but excluding shipping, taxes and tips. + """ + subtotalPriceSet: MoneyBag! + + """ + Individual taxes charged on the checkout. + """ + taxLines: [TaxLine!]! + + """ + Whether taxes are included in line item and shipping line prices. + """ + taxesIncluded: Boolean! + + """ + The total amount of discounts to be applied. + """ + totalDiscountSet: MoneyBag! + + """ + The total duties applied to the checkout. + """ + 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 date and time when the checkout was most recently updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple AbandonedCheckouts. +""" +type AbandonedCheckoutConnection @componentName(name: "platform") { + """ + 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! +} + +""" +An auto-generated type which holds one AbandonedCheckout and a cursor during pagination. +""" +type AbandonedCheckoutEdge @componentName(name: "checkouts") { + """ + 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 AbandonedCheckoutEdge. + """ + node: AbandonedCheckout! +} + +""" +A single line item in an abandoned checkout. +""" +type AbandonedCheckoutLineItem implements Node @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") @componentName(name: "checkouts") { + """ + A list of line item components for this line item. + """ + components: [AbandonedCheckoutLineItemComponent!] + + """ + A list of extra information that has been added to the line item. + """ + customAttributes: [Attribute!]! + + """ + Discount allocations that have been applied on the line item. + """ + discountAllocations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DiscountAllocationConnection! + + """ + Final total price for the entire quantity of this line item, including discounts. + """ + discountedTotalPriceSet: MoneyBag! + + """ + 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. + """ + discountedTotalPriceWithCodeDiscount: MoneyBag! + + """ + The price of a single variant unit after discounts are applied at the line item level, in shop and presentment currencies. + """ + discountedUnitPriceSet: MoneyBag! + + """ + The price of a single variant unit after all discounts are applied, at both the line item and code-based line item level. + """ + discountedUnitPriceWithCodeDiscount: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + 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 + + """ + Original total price for the entire quantity of this line item, before discounts. + """ + originalTotalPriceSet: MoneyBag! + + """ + Original price for a single unit of this line item, before discounts. + """ + originalUnitPriceSet: MoneyBag! + + """ + The parent relationship for this line item. + """ + parentRelationship: AbandonedCheckoutLineItemParentRelationship + + """ + Product for this line item. + NULL for custom line items and products that were deleted after checkout began. + """ + product: Product + + """ + The quantity of the line item. + """ + quantity: Int! + + """ + SKU for the inventory item associated with the variant, if any. + """ + sku: String + + """ + Title of the line item. Defaults to the product's title. + """ + title: String + + """ + Product variant for this line item. + NULL for custom line items and variants that were deleted after checkout began. + """ + variant: ProductVariant + + """ + Title of the variant for this line item. + NULL for custom line items and products that don't have distinct variants. + """ + variantTitle: String +} + +""" +The list of line item components that belong to a line item. +""" +type AbandonedCheckoutLineItemComponent @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") @componentName(name: "checkouts") { + """ + A globally-unique ID. + """ + id: ID! + + """ + The variant image associated with the line item component. + NULL if the variant associated doesn't have an image. + """ + image: Image + + """ + The quantity of the line item component. + """ + quantity: Int! + + """ + Title of the line item component. + """ + title: String! + + """ + The name of the variant. + """ + variantTitle: String +} + +""" +An auto-generated type for paginating through multiple AbandonedCheckoutLineItems. +""" +type AbandonedCheckoutLineItemConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AbandonedCheckoutLineItemEdge!]! + + """ + 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: [AbandonedCheckoutLineItem!]! + + """ + 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 AbandonedCheckoutLineItem and a cursor during pagination. +""" +type AbandonedCheckoutLineItemEdge @componentName(name: "checkouts") { + """ + 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 AbandonedCheckoutLineItemEdge. + """ + node: AbandonedCheckoutLineItem! +} + +""" +The line relationship between two line items in an abandoned checkout. +""" +type AbandonedCheckoutLineItemParentRelationship @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") @componentName(name: "checkouts") { + """ + The parent line item of the current line item. + """ + parent: AbandonedCheckoutLineItem! +} + +""" +The set of valid sort keys for the AbandonedCheckout query. +""" +enum AbandonedCheckoutSortKeys @componentName(name: "platform") { + """ + Sort by the `checkout_id` value. + """ + CHECKOUT_ID + + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `customer_name` value. + """ + CUSTOMER_NAME + + """ + 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 `total_price` value. + """ + TOTAL_PRICE +} + +""" +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. +""" +type Abandonment implements Node @componentName(name: "merchant_marketing") { + """ + The abandonment payload for the abandoned checkout. + """ + abandonedCheckoutPayload: AbandonedCheckout + + """ + The abandonment type. + """ + abandonmentType: AbandonmentAbandonmentType! + + """ + The app associated with an abandoned checkout. + """ + app: App! + + """ + Permalink to the cart page. + """ + cartUrl: URL + + """ + The date and time when the abandonment was created. + """ + createdAt: DateTime! + + """ + The customer who abandoned this event. + """ + customer: Customer! + + """ + Whether the customer has a draft order since this abandonment has been abandoned. + """ + customerHasNoDraftOrderSinceAbandonment: Boolean! + + """ + Whether the customer has completed an order since this checkout has been abandoned. + """ + customerHasNoOrderSinceAbandonment: Boolean! + + """ + The number of days since the last abandonment email was sent to the customer. + """ + daysSinceLastAbandonmentEmail: Int! + + """ + When the email was sent, if that's the case. + """ + emailSentAt: DateTime + + """ + The email state (e.g., sent or not sent). + """ + emailState: AbandonmentEmailState + + """ + The number of hours since the customer has last abandoned a checkout. + """ + hoursSinceLastAbandonedCheckout: Float + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the products in abandonment are available. + """ + inventoryAvailable: Boolean! + + """ + Whether the abandonment event comes from a custom storefront channel. + """ + isFromCustomStorefront: Boolean! + + """ + Whether the abandonment event comes from the Online Store sales channel. + """ + isFromOnlineStore: Boolean! + + """ + Whether the abandonment event comes from the Shop app sales channel. + """ + isFromShopApp: Boolean! + + """ + Whether the abandonment event comes from Shop Pay. + """ + isFromShopPay: Boolean! + + """ + Whether the customer didn't complete another most significant step since this abandonment. + """ + isMostSignificantAbandonment: Boolean! + + """ + The date for the latest browse abandonment. + """ + lastBrowseAbandonmentDate: DateTime! + + """ + The date for the latest cart abandonment. + """ + lastCartAbandonmentDate: DateTime! + + """ + The date for the latest checkout abandonment. + """ + lastCheckoutAbandonmentDate: DateTime! + + """ + The most recent step type. + """ + mostRecentStep: AbandonmentAbandonmentType! + + """ + The products added to the cart during the customer abandoned visit. + """ + productsAddedToCart( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CustomerVisitProductInfoConnection! + + """ + The products viewed during the customer abandoned visit. + """ + productsViewed( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CustomerVisitProductInfoConnection! + + """ + The date and time when the visit started. + """ + visitStartedAt: DateTime +} + +""" +Specifies the abandonment type. +""" +enum AbandonmentAbandonmentType @componentName(name: "merchant_marketing") { + """ + The abandonment event is an abandoned browse. + """ + BROWSE + + """ + The abandonment event is an abandoned cart. + """ + CART + + """ + The abandonment event is an abandoned checkout. + """ + CHECKOUT +} + +""" +Specifies the delivery state of a marketing activity. +""" +enum AbandonmentDeliveryState @componentName(name: "merchant_marketing") { + """ + The marketing activity action has not yet been sent. + """ + NOT_SENT + + """ + The marketing activity action has been scheduled for later delivery. + """ + SCHEDULED + + """ + The marketing activity action has been sent. + """ + SENT +} + +""" +Specifies the email state. +""" +enum AbandonmentEmailState @componentName(name: "merchant_marketing") { + """ + The email has not yet been sent. + """ + NOT_SENT + + """ + The email has been scheduled for later delivery. + """ + SCHEDULED + + """ + The email has been sent. + """ + SENT +} + +""" +Return type for `abandonmentEmailStateUpdate` mutation. +""" +type AbandonmentEmailStateUpdatePayload @componentName(name: "platform") { + """ + The updated abandonment. + """ + abandonment: Abandonment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [AbandonmentEmailStateUpdateUserError!]! +} + +""" +An error that occurs during the execution of `AbandonmentEmailStateUpdate`. +""" +type AbandonmentEmailStateUpdateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: AbandonmentEmailStateUpdateUserErrorCode + + """ + 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 `AbandonmentEmailStateUpdateUserError`. +""" +enum AbandonmentEmailStateUpdateUserErrorCode @componentName(name: "platform") { + """ + Unable to find an Abandonment for the provided ID. + """ + ABANDONMENT_NOT_FOUND +} + +""" +Return type for `abandonmentUpdateActivitiesDeliveryStatuses` mutation. +""" +type AbandonmentUpdateActivitiesDeliveryStatusesPayload @componentName(name: "platform") { + """ + The updated abandonment. + """ + abandonment: Abandonment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [AbandonmentUpdateActivitiesDeliveryStatusesUserError!]! +} + +""" +An error that occurs during the execution of `AbandonmentUpdateActivitiesDeliveryStatuses`. +""" +type AbandonmentUpdateActivitiesDeliveryStatusesUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: AbandonmentUpdateActivitiesDeliveryStatusesUserErrorCode + + """ + 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 `AbandonmentUpdateActivitiesDeliveryStatusesUserError`. +""" +enum AbandonmentUpdateActivitiesDeliveryStatusesUserErrorCode @componentName(name: "platform") { + """ + Unable to find an Abandonment for the provided ID. + """ + ABANDONMENT_NOT_FOUND + + """ + Unable to find delivery status info for the provided ID. + """ + DELIVERY_STATUS_INFO_NOT_FOUND + + """ + Unable to find a marketing activity for the provided ID. + """ + MARKETING_ACTIVITY_NOT_FOUND +} + +""" +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 AccessScope @componentName(name: "apps") { + """ + A description of the actions that the access scope allows an app to perform. + """ + description: String! + + """ + 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`. + """ + handle: String! +} + +""" +Possible account types that a staff member can have. +""" +enum AccountType @componentName(name: "user_management") { + """ + The account of a partner who collaborates with the merchant. + """ + COLLABORATOR + + """ + The account of a partner collaborator team member. + """ + COLLABORATOR_TEAM_MEMBER + + """ + The user has not yet accepted the invitation to create an account. + """ + INVITED + + """ + The user has not yet accepted the invitation to become the store owner. + """ + INVITED_STORE_OWNER + + """ + The account can access the Shopify admin. + """ + REGULAR + + """ + The admin has not yet accepted the request to create a collaborator account. + """ + REQUESTED + + """ + The account cannot access the Shopify admin. + """ + RESTRICTED + + """ + The account can be signed into via a SAML provider. + """ + SAML +} + +""" +Represents an operation publishing all products to a publication. +""" +type AddAllProductsOperation implements Node & ResourceOperation @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { + """ + 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! +} + +""" +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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "returns") { + """ + 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!]! +} + +""" +A sale associated with an additional fee charge. +""" +type AdditionalFeeSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + The type of order action that the sale represents. + """ + actionType: SaleActionType! + + """ + The additional fees for the associated sale. + """ + additionalFee: SaleAdditionalFee! + + """ + 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 set of valid sort keys for the AdjustmentGroup query. +""" +enum AdjustmentGroupSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +A sale associated with an order price adjustment. +""" +type AdjustmentSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 set of valid sort keys for the Adjustments query. +""" +enum AdjustmentsSortKeys @componentName(name: "platform") { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `time` value. + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + Whether all items are eligible for the discount. This value always returns `true`. + """ + allItems: Boolean! +} + +""" +Represents a merchant-defined goal for a specific analytics metric over a date range. +Merchants use analytics targets to track progress toward business objectives, such as reaching +a total sales amount or a number of orders within a given period. + +Each target is associated with a single metric and can optionally include filter expressions to +narrow the evaluated data. Use the +[`analyticsTargets`](https://shopify.dev/docs/api/admin-graphql/unstable/queries/analyticsTargets) query +to retrieve targets, and the +[`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetCreate), +[`analyticsTargetUpdate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetUpdate), +and [`analyticsTargetsDelete`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetsDelete) +mutations to manage them. +""" +type AnalyticsTarget implements Node @requiredAccess(scope: "`read_reports` access scope.") @componentName(name: "reporting") { + """ + The date and time when the analytics target was created. + """ + createdAt: DateTime! + + """ + The currency code stored on the target's expected value. Defaults to the shop currency when the target is created. + """ + currencyCode: CurrencyCode! + + """ + The end date of the period over which progress toward the target is measured. + """ + endDate: Date! + + """ + The goal value that the merchant aims to reach for the tracked metric within the target period. Must be greater than 0. + """ + expectedValue: Decimal! + + """ + An optional filter expression to narrow the data evaluated against this target. For example, `shipping_country = 'US'`. + """ + filters: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The identifier of the analytics metric that this target tracks, such as `total_sales` or `orders`. + """ + metric: String! + + """ + A human-readable label for the target, such as `Q1 Sales Target`. + """ + name: String! + + """ + The target's expected value converted to a specified presentment currency. + Returns `null` when the target metric isn't a money metric or the conversion + rate is unavailable. + """ + presentmentExpectedValue( + """ + The currency code to convert the expected value into. + """ + currencyCode: CurrencyCode! + ): MoneyV2 + + """ + A generated [ShopifyQL](https://shopify.dev/docs/api/shopifyql) query string + that fetches the current value of the tracked metric for this target's date + range and filters. + """ + shopifyqlQuery: String + + """ + The start date of the period over which progress toward the target is measured. + """ + startDate: Date! + + """ + The date and time when the analytics target was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple AnalyticsTargets. +""" +type AnalyticsTargetConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AnalyticsTargetEdge!]! + + """ + A list of nodes that are contained in AnalyticsTargetEdge. 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: [AnalyticsTarget!]! + + """ + 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 [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget) +that tracks a merchant's goal for a specific metric over a date range. +""" +input AnalyticsTargetCreateInput @componentName(name: "reporting") { + """ + The end date of the period over which progress toward the target is measured. + """ + endDate: Date! + + """ + The goal value that the merchant aims to reach for the tracked metric within the target period. Must be greater than 0. + """ + expectedValue: Decimal! + + """ + An optional filter expression to narrow the data evaluated against this target. For example, `shipping_country = 'US'`. + """ + filters: String + + """ + The identifier of the analytics metric that this target tracks, such as `total_sales` or `orders`. + """ + metric: String! + + """ + A human-readable label for the target, such as `Q1 Sales Target`. + """ + name: String! + + """ + The start date of the period over which progress toward the target is measured. + """ + startDate: Date! +} + +""" +Return type for `analyticsTargetCreate` mutation. +""" +type AnalyticsTargetCreatePayload @componentName(name: "platform") { + """ + The newly created [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). + """ + analyticsTarget: AnalyticsTarget + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [AnalyticsTargetCreateUserError!]! +} + +""" +An error that occurs during the execution of `AnalyticsTargetCreate`. +""" +type AnalyticsTargetCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: AnalyticsTargetCreateUserErrorCode + + """ + 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 `AnalyticsTargetCreateUserError`. +""" +enum AnalyticsTargetCreateUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The provided metric is not valid for analytics targets. + """ + INVALID_METRIC + + """ + The input value is already taken. + """ + TAKEN +} + +""" +An auto-generated type which holds one AnalyticsTarget and a cursor during pagination. +""" +type AnalyticsTargetEdge @componentName(name: "reporting") { + """ + 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 AnalyticsTargetEdge. + """ + node: AnalyticsTarget! +} + +""" +The set of valid sort keys for the AnalyticsTarget query. +""" +enum AnalyticsTargetSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `end_date` value. + """ + END_DATE + + """ + Sort by the `expected_value` value. + """ + EXPECTED_VALUE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `metric` value. + """ + METRIC + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `start_date` value. + """ + START_DATE +} + +""" +The input fields for updating an existing [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). +Only provided fields are modified; omitted fields remain unchanged. +""" +input AnalyticsTargetUpdateInput @componentName(name: "reporting") { + """ + The end date of the period over which progress toward the target is measured. + """ + endDate: Date + + """ + The goal value that the merchant aims to reach for the tracked metric within the target period. Must be greater than 0. + """ + expectedValue: Decimal + + """ + An optional filter expression to narrow the data evaluated against this target. For example, `shipping_country = 'US'`. + """ + filters: String + + """ + The identifier of the analytics metric that this target tracks, such as `total_sales` or `orders`. + """ + metric: String + + """ + A human-readable label for the target, such as `Q1 Sales Target`. + """ + name: String + + """ + The start date of the period over which progress toward the target is measured. + """ + startDate: Date +} + +""" +Return type for `analyticsTargetUpdate` mutation. +""" +type AnalyticsTargetUpdatePayload @componentName(name: "platform") { + """ + The updated [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). + """ + analyticsTarget: AnalyticsTarget + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [AnalyticsTargetUpdateUserError!]! +} + +""" +An error that occurs during the execution of `AnalyticsTargetUpdate`. +""" +type AnalyticsTargetUpdateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: AnalyticsTargetUpdateUserErrorCode + + """ + 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 `AnalyticsTargetUpdateUserError`. +""" +enum AnalyticsTargetUpdateUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The provided metric is not valid for analytics targets. + """ + INVALID_METRIC + + """ + The analytics target was not found. + """ + NOT_FOUND + + """ + The input value is already taken. + """ + TAKEN +} + +""" +Return type for `analyticsTargetsDelete` mutation. +""" +type AnalyticsTargetsDeletePayload @componentName(name: "platform") { + """ + The IDs of the deleted analytics targets. + """ + deletedIds: [ID!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [AnalyticsTargetsDeleteUserError!]! +} + +""" +An error that occurs during the execution of `AnalyticsTargetsDelete`. +""" +type AnalyticsTargetsDeleteUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: AnalyticsTargetsDeleteUserErrorCode + + """ + 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 `AnalyticsTargetsDeleteUserError`. +""" +enum AnalyticsTargetsDeleteUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The analytics target was not found. + """ + NOT_FOUND +} + +""" +The Android mobile platform application. +""" +type AndroidApplication @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") @componentName(name: "mobile_support") { + """ + Whether Android App Links are supported by this app. + """ + appLinksEnabled: Boolean! + + """ + The Android application ID. + """ + applicationId: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The SHA256 fingerprints of the app's signing certificate. + """ + 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 @componentName(name: "platform") { + """ + 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! +} + +""" +A Shopify application that extends store functionality. Apps integrate with +Shopify through APIs to add features, automate workflows, or connect external services. + +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. +""" +type App implements Node @componentName(name: "apps") { + """ + A unique application API identifier. + """ + apiKey: String! + + """ + App store page URL of the app. + """ + appStoreAppUrl: URL + + """ + App store page URL of the developer who created the app. + """ + appStoreDeveloperUrl: URL + + """ + All requestable access scopes available to the app. + """ + availableAccessScopes: [AccessScope!]! + + """ + Banner image for the app. + """ + banner: Image! + + """ + The sales channels associated with this app. + """ + channels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection! + + """ + Description of the app. + """ + description: String + + """ + The name of the app developer. + """ + developerName: String + + """ + The type of app developer. + """ + developerType: AppDeveloperType! + + """ + Website of the developer who created the app. + """ + developerUrl: URL! @deprecated(reason: "Use `appStoreDeveloperUrl` instead.") + + """ + Whether the app uses the Embedded App SDK. + """ + embedded: Boolean! + + """ + Requirements that must be met before the app can be installed. + """ + failedRequirements: [FailedRequirement!]! + + """ + A list of app features that are shown in the Shopify App Store listing. + """ + features: [String!]! + + """ + Feedback from this app about the store. + """ + feedback: AppFeedback + + """ + Handle of the app. + """ + handle: String + + """ + Icon that represents the app. + """ + icon: Image! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Webpage where you can install the app, if app requires explicit user permission. + """ + installUrl: URL + + """ + Corresponding AppInstallation for this shop and App. + Returns null if the App isn't installed. + """ + installation: AppInstallation + + """ + Whether the app is the [post purchase](https://shopify.dev/apps/checkout/post-purchase) app in use. + """ + isPostPurchaseAppInUse: Boolean! + + """ + Webpage that the app starts in. + """ + launchUrl: URL! @deprecated(reason: "Use AppInstallation.launchUrl instead") + + """ + Menu items for the app, which also appear as submenu items in left navigation sidebar in the Shopify admin. + """ + navigationItems: [NavigationItem!]! @deprecated(reason: "Use AppInstallation.navigationItems instead") + + """ + 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. + """ + optionalAccessScopes: [AccessScope!]! + + """ + Whether the app was previously installed on the current shop. + """ + previouslyInstalled: Boolean! + + """ + Detailed information about the app pricing. + """ + pricingDetails: String + + """ + Summary of the app pricing details. + """ + pricingDetailsSummary: String! + + """ + Link to app privacy policy. + """ + privacyPolicyUrl: URL + + """ + The public category for the app. + """ + publicCategory: AppPublicCategory! + + """ + Whether the app is published to the Shopify App Store. + """ + published: Boolean! + + """ + 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. + """ + requestedAccessScopes: [AccessScope!]! + + """ + Screenshots of the app. + """ + screenshots: [Image!]! + + """ + Whether the app was developed by Shopify. + """ + shopifyDeveloped: Boolean! + + """ + The star rating of the app. + """ + starRating: Float! + + """ + Name of the app. + """ + title: String! + + """ + 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. + """ + uninstallMessage: String! + + """ + Webpage where you can uninstall the app. + """ + uninstallUrl: URL @deprecated(reason: "Use AppInstallation.uninstallUrl instead") + + """ + The webhook API version for the app. + """ + webhookApiVersion: String! +} + +""" +A catalog that defines the publication associated with an app. +""" +type AppCatalog implements Catalog & Node @requiredAccess(scope: "`read_products` access scope or `read_product_listings` access scope. Also: The app owning the catalog needs either products or product listing rights.") @componentName(name: "merchandising") { + """ + The apps associated with the catalog. + """ + apps( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): AppConnection! + + """ + The channels associated with the catalog. + """ + channels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection! + + """ + 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 Apps. +""" +type AppConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AppEdge!]! + + """ + 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. + """ + nodes: [App!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + 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 @componentName(name: "billing") { + """ + The amount that can be used towards future app purchases in Shopify. + """ + amount: MoneyV2! + + """ + The date and time when the app credit was created. + """ + createdAt: DateTime! + + """ + The description of the app credit. + """ + description: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the app credit is a test transaction. + """ + test: Boolean! +} + +""" +An auto-generated type for paginating through multiple AppCredits. +""" +type AppCreditConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AppCreditEdge!]! + + """ + 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. + """ + nodes: [AppCredit!]! + + """ + 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 AppCredit and a cursor during pagination. +""" +type AppCreditEdge @componentName(name: "billing") { + """ + 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 AppCreditEdge. + """ + node: AppCredit! +} + +""" +Possible types of app developer. +""" +enum AppDeveloperType @componentName(name: "apps") { + """ + Indicates the app developer works directly for a Merchant. + """ + MERCHANT + + """ + Indicates the app developer is a Partner. + """ + PARTNER + + """ + Indicates the app developer is Shopify. + """ + SHOPIFY + + """ + Indicates the app developer is unknown. It is not categorized as any of the other developer types. + """ + UNKNOWN +} + +""" +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. +""" +type AppDiscountType @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + The name of the app extension that's providing the + [discount type](https://help.shopify.com/manual/discounts/discount-types). + """ + app: App! + + """ + The [App Bridge configuration](https://shopify.dev/docs/api/app-bridge) + for the [discount type](https://help.shopify.com/manual/discounts/discount-types). + """ + appBridge: FunctionsAppBridge! + + """ + 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). + """ + appKey: String! + + """ + A description of the + [discount type](https://help.shopify.com/manual/discounts/discount-types) + provided by the app extension. + """ + description: String + + """ + 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 list of [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + that this app extension supports. + """ + discountClasses: [DiscountClass!]! + + """ + 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). + """ + functionId: String! + + """ + The Shopify Function associated with this app discount rule. + """ + shopifyFunction: ShopifyFunction! + + """ + 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`. + """ + targetType: DiscountApplicationTargetType! @deprecated(reason: "Use `discountClasses` instead.") + + """ + The name of the [discount type](https://help.shopify.com/manual/discounts/discount-types) + that the app extension is providing. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple AppDiscountTypes. +""" +type AppDiscountTypeConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AppDiscountTypeEdge!]! + + """ + 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. + """ + nodes: [AppDiscountType!]! + + """ + 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 AppDiscountType and a cursor during pagination. +""" +type AppDiscountTypeEdge @componentName(name: "pricing") { + """ + 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 AppDiscountTypeEdge. + """ + node: AppDiscountType! +} + +""" +An auto-generated type which holds one App and a cursor during pagination. +""" +type AppEdge @componentName(name: "apps") { + """ + 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 AppEdge. + """ + node: App! +} + +""" +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 AppFeedback @componentName(name: "apps") { + """ + The application associated to the feedback. + """ + app: App! + + """ + The channel this feedback is for. + """ + channel: Channel + + """ + The date and time when the app feedback was generated. + """ + feedbackGeneratedAt: DateTime! + + """ + A link to where merchants can resolve errors. + """ + link: Link + + """ + The feedback message presented to the merchant. + """ + messages: [UserError!]! + + """ + Conveys the state of the feedback and whether it requires merchant action or not. + """ + state: ResourceFeedbackState! +} + +""" +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 AppInstallation implements HasMetafields & Node @componentName(name: "apps") { + """ + The access scopes granted to the application by a merchant during installation. + """ + accessScopes: [AccessScope!]! + + """ + The active application subscriptions billed to the shop on a recurring basis. + """ + activeSubscriptions: [AppSubscription!]! + + """ + All subscriptions created for a shop. + """ + allSubscriptions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! + + """ + Application which is installed. + """ + app: App! + + """ + Channel associated with the installed application. + """ + channel: Channel @deprecated(reason: "Use the root-level `channels` query instead.") + + """ + Credits that can be used towards future app purchases. + """ + credits( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The URL to launch the application. + """ + launchUrl: URL! + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + One-time purchases to a shop. + """ + oneTimePurchases( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 publication associated with the installed application. + """ + publication: Publication @deprecated(reason: "Use the root-level `publications` query instead.") + + """ + The records that track the externally-captured revenue for the app. The records are used for revenue attribution purposes. + """ + revenueAttributionRecords( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @requiredAccess(scope: "Access allowed for apps with `app_attributions` scope using offline tokens only. This API is under a private program and is not available to all partners.") + + """ + Subscriptions charge to a shop on a recurring basis. + """ + subscriptions: [AppSubscription!]! @deprecated(reason: "Use `activeSubscriptions` instead.") + + """ + The URL to uninstall the application. + """ + uninstallUrl: URL +} + +""" +The possible categories of an app installation, based on their purpose +or the environment they can run in. +""" +enum AppInstallationCategory @componentName(name: "apps") { + """ + Apps that serve as channels through which sales are made, such as the online store. + """ + CHANNEL + + """ + Apps that can be used in the POS mobile client. + """ + POS_EMBEDDED +} + +""" +An auto-generated type for paginating through multiple AppInstallations. +""" +type AppInstallationConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AppInstallationEdge!]! + + """ + 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. + """ + nodes: [AppInstallation!]! + + """ + 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 AppInstallation and a cursor during pagination. +""" +type AppInstallationEdge @componentName(name: "apps") { + """ + 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 AppInstallationEdge. + """ + node: AppInstallation! +} + +""" +The levels of privacy of an app installation. +""" +enum AppInstallationPrivacy @componentName(name: "apps") { + PRIVATE + PUBLIC +} + +""" +The set of valid sort keys for the AppInstallation query. +""" +enum AppInstallationSortKeys @componentName(name: "platform") { + """ + Sort by the `app_title` value. + """ + APP_TITLE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `installed_at` value. + """ + INSTALLED_AT +} + +""" +The pricing model for the app subscription. +The pricing model input can be either `appRecurringPricingDetails` or `appUsagePricingDetails`. +""" +input AppPlanInput @componentName(name: "billing") { + """ + The pricing details for recurring billing. + """ + appRecurringPricingDetails: AppRecurringPricingInput + + """ + The pricing details for usage-based billing. + """ + appUsagePricingDetails: AppUsagePricingInput +} + +""" +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 @componentName(name: "billing") { + """ + The plan billed to a shop on a recurring basis. + """ + pricingDetails: AppPricingDetails! +} + +""" +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. +""" +union AppPricingDetails @componentName(name: "billing") = AppRecurringPricing | AppUsagePricing + +""" +The frequency at which the shop is billed for an app subscription. +""" +enum AppPricingInterval @componentName(name: "billing") { + """ + The app subscription bills the shop annually. + """ + ANNUAL + + """ + The app subscription bills the shop every 30 days. + """ + EVERY_30_DAYS +} + +""" +The public-facing category for an app. +""" +enum AppPublicCategory @componentName(name: "apps") { + """ + The app's public category is [custom](https://shopify.dev/apps/distribution#capabilities-and-requirements). + """ + CUSTOM + + """ + 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). + """ + OTHER + + """ + The app's public category is [private](https://shopify.dev/apps/distribution#deprecated-app-types). + """ + PRIVATE + + """ + The app's public category is [public](https://shopify.dev/apps/distribution#capabilities-and-requirements). + """ + PUBLIC +} + +""" +Services and features purchased once by the store. +""" +interface AppPurchase @requiredAccess(scope: "The staff member must have permission to manage app billing or approve app charges if authenticated with an online access token as described in https:\/\/shopify.dev\/apps\/auth\/oauth\/access-modes.") @componentName(name: "billing") { + """ + The date and time when the app purchase occurred. + """ + createdAt: DateTime! + + """ + The name of the app purchase. + """ + name: String! + + """ + The amount to be charged to the store for the app purchase. + """ + price: MoneyV2! + + """ + The URL where the merchant is redirected after approving the app purchase. + """ + returnUrl: URL! + + """ + The status of the app purchase. + """ + status: AppPurchaseStatus! + + """ + Whether the app purchase is a test transaction. + """ + test: Boolean! +} + +""" +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 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 AppPurchaseOneTime implements AppPurchase & Node @requiredAccess(scope: "The staff member must have permission to manage app billing or approve app charges if authenticated with an online access token as described in https:\/\/shopify.dev\/apps\/auth\/oauth\/access-modes.") @componentName(name: "billing") { + """ + The date and time when the app purchase occurred. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the app purchase. + """ + name: String! + + """ + The amount to be charged to the store for the app purchase. + """ + price: MoneyV2! + + """ + The URL where the merchant is redirected after approving the app purchase. + """ + returnUrl: URL! + + """ + The status of the app purchase. + """ + status: AppPurchaseStatus! + + """ + Whether the app purchase is a test transaction. + """ + test: Boolean! +} + +""" +An auto-generated type for paginating through multiple AppPurchaseOneTimes. +""" +type AppPurchaseOneTimeConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AppPurchaseOneTimeEdge!]! + + """ + 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. + """ + nodes: [AppPurchaseOneTime!]! + + """ + 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 `appPurchaseOneTimeCreate` mutation. +""" +type AppPurchaseOneTimeCreatePayload @componentName(name: "platform") { + """ + The newly created app one-time purchase. + """ + appPurchaseOneTime: AppPurchaseOneTime + + """ + The URL that the merchant can access to approve or decline the newly created app one-time purchase. + + 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. + """ + confirmationUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one AppPurchaseOneTime and a cursor during pagination. +""" +type AppPurchaseOneTimeEdge @componentName(name: "billing") { + """ + 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 AppPurchaseOneTimeEdge. + """ + node: AppPurchaseOneTime! +} + +""" +The approval status of the app purchase. + +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 @componentName(name: "billing") { + """ + 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. + """ + ACCEPTED @deprecated(reason: "When a merchant accepts an app purchase, the status immediately changes from `pending` to `active`.") + + """ + 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. + """ + ACTIVE + + """ + The app purchase was declined by the merchant. + """ + DECLINED + + """ + The app purchase was not accepted within two days of being created. + """ + EXPIRED + + """ + The app purchase is pending approval by the merchant. + """ + 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 @componentName(name: "billing") { + """ + The discount applied to the subscription for a given number of billing intervals. + """ + discount: AppSubscriptionDiscount + + """ + The frequency at which the subscribing shop is billed for an app subscription. + """ + interval: AppPricingInterval! + + """ + The app store pricing plan handle. + """ + planHandle: String + + """ + The amount and currency to be charged to the subscribing shop every billing interval. + """ + 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 @componentName(name: "billing") { + """ + The discount applied to the subscription for a given number of billing intervals. + """ + discount: AppSubscriptionDiscountInput + + """ + How often the app subscription generates a charge. + """ + interval: AppPricingInterval = EVERY_30_DAYS + + """ + The amount to be charged to the store every billing interval. + """ + price: MoneyInput! +} + +""" +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. + +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. + +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 + +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. + +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 @requiredAccess(scope: "Access allowed for apps with `app_attributions` scope using offline tokens only. This API is under a private program and is not available to all partners.") @componentName(name: "billing") { + """ + The financial amount captured in this attribution. + """ + amount: MoneyV2! + + """ + The timestamp when the financial amount was captured. + """ + capturedAt: DateTime! + + """ + The timestamp at which this revenue attribution was issued. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + 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). + """ + idempotencyKey: String! + + """ + Indicates whether this is a test submission. + """ + test: Boolean! + + """ + The type of revenue attribution. + """ + type: AppRevenueAttributionType! +} + +""" +An auto-generated type for paginating through multiple AppRevenueAttributionRecords. +""" +type AppRevenueAttributionRecordConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AppRevenueAttributionRecordEdge!]! + + """ + 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. + """ + nodes: [AppRevenueAttributionRecord!]! + + """ + 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 AppRevenueAttributionRecord and a cursor during pagination. +""" +type AppRevenueAttributionRecordEdge @componentName(name: "billing") { + """ + 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 AppRevenueAttributionRecordEdge. + """ + node: AppRevenueAttributionRecord! +} + +""" +The set of valid sort keys for the AppRevenueAttributionRecord query. +""" +enum AppRevenueAttributionRecordSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Represents the billing types of revenue attribution. +""" +enum AppRevenueAttributionType @componentName(name: "billing") { + """ + App purchase related revenue collection. + """ + APPLICATION_PURCHASE + + """ + App subscription revenue collection. + """ + APPLICATION_SUBSCRIPTION + + """ + App usage-based revenue collection. + """ + APPLICATION_USAGE + + """ + Other app revenue collection type. + """ + OTHER +} + +""" +Represents an error that happens while revoking a granted scope. +""" +type AppRevokeAccessScopesAppRevokeScopeError implements DisplayableError @componentName(name: "access_and_auth") { + """ + The error code. + """ + code: AppRevokeAccessScopesAppRevokeScopeErrorCode + + """ + 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 `AppRevokeAccessScopesAppRevokeScopeError`. +""" +enum AppRevokeAccessScopesAppRevokeScopeErrorCode @componentName(name: "platform") { + """ + The application cannot be found. + """ + APPLICATION_CANNOT_BE_FOUND + + """ + App is not installed on shop. + """ + APP_NOT_INSTALLED + + """ + Already granted implied scopes cannot be revoked. + """ + CANNOT_REVOKE_IMPLIED_SCOPES + + """ + Required scopes cannot be revoked. + """ + CANNOT_REVOKE_REQUIRED_SCOPES + + """ + Cannot revoke optional scopes that haven't been declared. + """ + CANNOT_REVOKE_UNDECLARED_SCOPES + + """ + No app found on the access token. + """ + MISSING_SOURCE_APP + + """ + The requested list of scopes to revoke includes invalid handles. + """ + UNKNOWN_SCOPES +} + +""" +Return type for `appRevokeAccessScopes` mutation. +""" +type AppRevokeAccessScopesPayload @componentName(name: "platform") { + """ + The list of scope handles that have been revoked. + """ + revoked: [AccessScope!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [AppRevokeAccessScopesAppRevokeScopeError!]! +} + +""" +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). + +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 AppSubscription implements Node @componentName(name: "billing") { + """ + The app the subscription is generating charges for. + """ + app: App! + + """ + The date and time when the app subscription was created. + """ + createdAt: DateTime! + + """ + The date and time when the current app subscription period ends. Returns `null` if the subscription isn't active. + """ + currentPeriodEnd: DateTime + + """ + A globally-unique ID. + """ + id: ID! + + """ + The plans attached to the app subscription. + """ + lineItems: [AppSubscriptionLineItem!]! + + """ + The name of the app subscription. + """ + name: String! + + """ + The URL that the merchant is redirected to after approving the app subscription. + """ + returnUrl: URL! + + """ + The status of the app subscription. + """ + status: AppSubscriptionStatus! + + """ + Specifies whether the app subscription is a test transaction. + """ + test: Boolean! + + """ + The number of free trial days, starting at the subscription's creation date, by which billing is delayed. + """ + trialDays: Int! +} + +""" +Return type for `appSubscriptionCancel` mutation. +""" +type AppSubscriptionCancelPayload @componentName(name: "platform") { + """ + The cancelled app subscription. + """ + appSubscription: AppSubscription + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type for paginating through multiple AppSubscriptions. +""" +type AppSubscriptionConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AppSubscriptionEdge!]! + + """ + 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. + """ + nodes: [AppSubscription!]! + + """ + 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 `appSubscriptionCreate` mutation. +""" +type AppSubscriptionCreatePayload @componentName(name: "platform") { + """ + The newly-created app subscription. + """ + appSubscription: AppSubscription + + """ + The URL pointing to the page where the merchant approves or declines the charges for an app subscription. + """ + confirmationUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Discount applied to the recurring pricing portion of a subscription. +""" +type AppSubscriptionDiscount @componentName(name: "billing") { + """ + 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. + """ + durationLimitInIntervals: Int + + """ + The price of the subscription after the discount is applied. + """ + priceAfterDiscount: MoneyV2! + + """ + The remaining number of billing intervals to which the discount will be applied. + """ + remainingDurationInIntervals: Int + + """ + The value of the discount applied every billing interval. + """ + value: AppSubscriptionDiscountValue! +} + +""" +The fixed amount value of a discount. +""" +type AppSubscriptionDiscountAmount @componentName(name: "billing") { + """ + The fixed amount value of a discount. + """ + amount: MoneyV2! +} + +""" +The input fields to specify a discount to the recurring pricing portion of a +subscription over a number of billing intervals. +""" +input AppSubscriptionDiscountInput @componentName(name: "billing") { + """ + 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. + """ + durationLimitInIntervals: Int + + """ + The value to be discounted every billing interval. + """ + value: AppSubscriptionDiscountValueInput +} + +""" +The percentage value of a discount. +""" +type AppSubscriptionDiscountPercentage @componentName(name: "billing") { + """ + The percentage value of a discount. + """ + percentage: Float! +} + +""" +The value of the discount. +""" +union AppSubscriptionDiscountValue @componentName(name: "billing") = AppSubscriptionDiscountAmount | AppSubscriptionDiscountPercentage + +""" +The input fields to specify the value discounted every billing interval. +""" +input AppSubscriptionDiscountValueInput @componentName(name: "billing") { + """ + The monetary value of a discount. + """ + amount: Decimal + + """ + The percentage value of a discount. + """ + percentage: Float +} + +""" +An auto-generated type which holds one AppSubscription and a cursor during pagination. +""" +type AppSubscriptionEdge @componentName(name: "billing") { + """ + 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 AppSubscriptionEdge. + """ + node: AppSubscription! +} + +""" +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. + +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. + +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 + +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 @componentName(name: "billing") { + """ + A globally-unique ID. + """ + id: ID! + + """ + The pricing model for the app subscription. + """ + plan: AppPlanV2! + + """ + A list of the store's usage records for a usage pricing plan. + """ + usageRecords( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! +} + +""" +The input fields to add more than one pricing plan to an app subscription. +""" +input AppSubscriptionLineItemInput @componentName(name: "billing") { + """ + The pricing model for the app subscription. + """ + plan: AppPlanInput! +} + +""" +Return type for `appSubscriptionLineItemUpdate` mutation. +""" +type AppSubscriptionLineItemUpdatePayload @componentName(name: "platform") { + """ + The updated app subscription. + """ + appSubscription: AppSubscription + + """ + The URL where the merchant approves or declines the updated app subscription line item. + """ + confirmationUrl: URL + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The replacement behavior when creating an app subscription for a merchant with an already existing app subscription. +""" +enum AppSubscriptionReplacementBehavior @componentName(name: "apps") { + """ + Cancels the merchant's current app subscription immediately and replaces it with the newly created app subscription. + """ + APPLY_IMMEDIATELY + + """ + 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. + """ + APPLY_ON_NEXT_BILLING_CYCLE + + """ + 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. + """ + STANDARD +} + +""" +The set of valid sort keys for the AppSubscription query. +""" +enum AppSubscriptionSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The status of the app subscription. +""" +enum AppSubscriptionStatus @componentName(name: "billing") { + """ + The app subscription has been approved by the merchant and is ready to be activated by the app. + """ + ACCEPTED @deprecated(reason: "When a merchant approves an app subscription, the status immediately transitions from `pending` to `active`.") + + """ + The app subscription has been approved by the merchant. Active app + subscriptions are billed to the shop. After payment, partners receive payouts. + """ + ACTIVE + + """ + 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. + """ + CANCELLED + + """ + The app subscription was declined by the merchant. This is a terminal state. + """ + DECLINED + + """ + The app subscription wasn't approved by the merchant within two days of being created. This is a terminal state. + """ + EXPIRED + + """ + The app subscription is on hold due to non-payment. The subscription re-activates after payments resume. + """ + FROZEN + + """ + The app subscription is pending approval by the merchant. + """ + PENDING +} + +""" +Return type for `appSubscriptionTrialExtend` mutation. +""" +type AppSubscriptionTrialExtendPayload @componentName(name: "platform") { + """ + The app subscription that had its trial extended. + """ + appSubscription: AppSubscription + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [AppSubscriptionTrialExtendUserError!]! +} + +""" +An error that occurs during the execution of `AppSubscriptionTrialExtend`. +""" +type AppSubscriptionTrialExtendUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: AppSubscriptionTrialExtendUserErrorCode + + """ + 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 `AppSubscriptionTrialExtendUserError`. +""" +enum AppSubscriptionTrialExtendUserErrorCode @componentName(name: "platform") { + """ + The app subscription isn't active. + """ + SUBSCRIPTION_NOT_ACTIVE + + """ + The app subscription wasn't found. + """ + SUBSCRIPTION_NOT_FOUND + + """ + The trial isn't active. + """ + TRIAL_NOT_ACTIVE +} + +""" +The set of valid sort keys for the AppTransaction query. +""" +enum AppTransactionSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Represents an error that happens while uninstalling an app. +""" +type AppUninstallAppUninstallError implements DisplayableError @componentName(name: "apps") { + """ + The error code. + """ + code: AppUninstallAppUninstallErrorCode + + """ + 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 `AppUninstallAppUninstallError`. +""" +enum AppUninstallAppUninstallErrorCode @componentName(name: "platform") { + """ + The app cannot be found. + """ + APP_NOT_FOUND + + """ + The app is not installed. + """ + APP_NOT_INSTALLED + + """ + An error occurred while uninstalling the app. + """ + APP_UNINSTALL_ERROR + + """ + User does not have sufficient permissions to uninstall this app. + """ + USER_PERMISSIONS_INSUFFICIENT +} + +""" +Return type for `appUninstall` mutation. +""" +type AppUninstallPayload @componentName(name: "platform") { + """ + The uninstalled app. + """ + app: App + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [AppUninstallAppUninstallError!]! +} + +""" +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 AppUsagePricing @componentName(name: "billing") { + """ + The total usage records for interval. + """ + balanceUsed: MoneyV2! + + """ + 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! + + """ + The frequency with which the app usage records are billed. + """ + interval: AppPricingInterval! + + """ + 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. + """ + terms: String! +} + +""" +The input fields to issue arbitrary charges for app usage associated with a subscription. +""" +input AppUsagePricingInput @componentName(name: "billing") { + """ + The maximum amount of usage charges that can be incurred within a subscription billing interval. + """ + cappedAmount: MoneyInput! + + """ + The terms and conditions for app usage. These terms stipulate the pricing model for the charges that an app creates. + """ + terms: String! +} + +""" +Store usage for app subscriptions with usage pricing. +""" +type AppUsageRecord implements Node @requiredAccess(scope: "The staff member must have permission to manage app billing or approve app charges if authenticated with an online access token as described in https:\/\/shopify.dev\/apps\/auth\/oauth\/access-modes.") @componentName(name: "billing") { + """ + The date and time when the usage record was created. + """ + createdAt: DateTime! + + """ + The description of the app usage record. + """ + description: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + A unique key generated by the client to avoid duplicate charges. + """ + idempotencyKey: String + + """ + The price of the usage record. + """ + price: MoneyV2! + + """ + Defines the usage pricing plan the merchant is subscribed to. + """ + subscriptionLineItem: AppSubscriptionLineItem! +} + +""" +An auto-generated type for paginating through multiple AppUsageRecords. +""" +type AppUsageRecordConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [AppUsageRecordEdge!]! + + """ + 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. + """ + nodes: [AppUsageRecord!]! + + """ + 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 `appUsageRecordCreate` mutation. +""" +type AppUsageRecordCreatePayload @componentName(name: "platform") { + """ + The newly created app usage record. + """ + appUsageRecord: AppUsageRecord + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one AppUsageRecord and a cursor during pagination. +""" +type AppUsageRecordEdge @componentName(name: "billing") { + """ + 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 AppUsageRecordEdge. + """ + node: AppUsageRecord! +} + +""" +The set of valid sort keys for the AppUsageRecord query. +""" +enum AppUsageRecordSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The Apple mobile platform application. +""" +type AppleApplication @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") @componentName(name: "mobile_support") { + """ + The iOS App Clip application ID. + """ + appClipApplicationId: String + + """ + Whether iOS App Clips are enabled for this app. + """ + appClipsEnabled: Boolean! + + """ + The iOS App ID. + """ + appId: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether iOS shared web credentials are enabled for this app. + """ + sharedWebCredentialsEnabled: Boolean! + + """ + Whether iOS Universal Links are supported by this app. + """ + universalLinksEnabled: Boolean! +} + +""" +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. + +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. +""" +type Article implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Navigable & Node @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { + """ + The name of the author of the article. + """ + author: ArticleAuthor + + """ + The blog containing the article. + """ + blog: Blog! + + """ + The text of the article's body, complete with HTML markup. + """ + body: HTML! + + """ + List of the article's comments. + """ + comments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | published_status | string | Filter by published status | - `any`
- + `published`
- `unpublished` | | - `published_status:any`
- + `published_status:published`
- `published_status:unpublished` | + | status | string | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CommentConnection! + + """ + Count of comments. Limited to a maximum of 10000 by default. + """ + commentsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | published_status | string | Filter by published status | - `any`
- + `published`
- `unpublished` | | - `published_status:any`
- + `published_status:published`
- `published_status:unpublished` | + | status | string | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): Count @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") + + """ + The date and time (ISO 8601 format) when the article 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 paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): EventConnection! + + """ + 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. + """ + handle: String! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated with the article. + """ + image: Image + + """ + Whether or not the article 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + The date and time (ISO 8601 format) when the article became or will become visible. + Returns null when the article isn't visible. + """ + publishedAt: DateTime + + """ + 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. + """ + summary: HTML + + """ + A comma-separated list of tags. + Tags are additional short descriptors formatted as a string of comma-separated values. + """ + tags: [String!]! + + """ + 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`. + """ + templateSuffix: String + + """ + The title of the article. + """ + 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 @gidTypes(types: ["Market"]) + ): [Translation!]! + + """ + The date and time (ISO 8601 format) when the article was last updated. + """ + updatedAt: DateTime +} + +""" +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 ArticleAuthor @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { + """ + The author's full name. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple ArticleAuthors. +""" +type ArticleAuthorConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ArticleAuthorEdge!]! + + """ + 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. + """ + nodes: [ArticleAuthor!]! + + """ + 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 ArticleAuthor and a cursor during pagination. +""" +type ArticleAuthorEdge @componentName(name: "online_store") { + """ + 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 ArticleAuthorEdge. + """ + node: ArticleAuthor! +} + +""" +The input fields of a blog when an article is created or updated. +""" +input ArticleBlogInput @componentName(name: "online_store") { + """ + The title of the blog. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple Articles. +""" +type ArticleConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ArticleEdge!]! + + """ + 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. + """ + nodes: [Article!]! + + """ + 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 article. +""" +input ArticleCreateInput @componentName(name: "online_store") { + """ + The name of the author of the article. + """ + author: AuthorInput! + + """ + The ID of the blog containing the article. + """ + blogId: ID @gidTypes(types: ["Blog"]) + + """ + The text of the article's body, complete with HTML markup. + """ + body: HTML + + """ + 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. + """ + handle: String + + """ + The image associated with the article. + """ + image: ArticleImageInput + + """ + Whether or not the article should be visible. + """ + isPublished: Boolean + + """ + The input fields to create or update a metafield. + """ + metafields: [MetafieldInput!] + + """ + The date and time (ISO 8601 format) when the article should become visible. + """ + publishDate: DateTime + + """ + 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. + """ + summary: HTML + + """ + A comma-separated list of tags. + Tags are additional short descriptors formatted as a string of comma-separated values. + """ + tags: [String!] + + """ + 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. + """ + templateSuffix: String + + """ + The title of the article. + """ + title: String! +} + +""" +Return type for `articleCreate` mutation. +""" +type ArticleCreatePayload @componentName(name: "platform") { + """ + The article that was created. + """ + article: Article + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ArticleCreateUserError!]! +} + +""" +An error that occurs during the execution of `ArticleCreate`. +""" +type ArticleCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ArticleCreateUserErrorCode + + """ + 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 `ArticleCreateUserError`. +""" +enum ArticleCreateUserErrorCode @componentName(name: "platform") { + """ + Can't create an article author if both author name and user ID are supplied. + """ + AMBIGUOUS_AUTHOR + + """ + Can't create a blog from input if a blog ID is supplied. + """ + AMBIGUOUS_BLOG + + """ + Can't create an article if both author name and user ID are blank. + """ + AUTHOR_FIELD_REQUIRED + + """ + User must exist if a user ID is supplied. + """ + AUTHOR_MUST_EXIST + + """ + The input value is blank. + """ + BLANK + + """ + Must reference or create a blog when creating an article. + """ + BLOG_REFERENCE_REQUIRED + + """ + The input value is invalid. + """ + INVALID + + """ + Can’t set isPublished to true and also set a future publish date. + """ + INVALID_PUBLISH_DATE + + """ + The metafield type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + Image upload failed. + """ + UPLOAD_FAILED +} + +""" +Return type for `articleDelete` mutation. +""" +type ArticleDeletePayload @componentName(name: "platform") { + """ + The ID of the deleted article. + """ + deletedArticleId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ArticleDeleteUserError!]! +} + +""" +An error that occurs during the execution of `ArticleDelete`. +""" +type ArticleDeleteUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ArticleDeleteUserErrorCode + + """ + 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 `ArticleDeleteUserError`. +""" +enum ArticleDeleteUserErrorCode @componentName(name: "platform") { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one Article and a cursor during pagination. +""" +type ArticleEdge @componentName(name: "online_store") { + """ + 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. + """ + node: Article! +} + +""" +The input fields for an image associated with an article. +""" +input ArticleImageInput @componentName(name: "online_store") { + """ + A word or phrase to share the nature or contents of an image. + """ + altText: String + + """ + The URL of the image. + """ + url: String +} + +""" +The set of valid sort keys for the Article query. +""" +enum ArticleSortKeys @componentName(name: "platform") { + """ + Sort by the `author` value. + """ + AUTHOR + + """ + Sort by the `blog_title` value. + """ + BLOG_TITLE + + """ + 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 +} + +""" +Possible sort of tags. +""" +enum ArticleTagSort @componentName(name: "online_store") { + """ + Sort alphabetically.. + """ + ALPHABETICAL + + """ + Sort by popularity, starting with the most popular tag. + """ + POPULAR +} + +""" +The input fields to update an article. +""" +input ArticleUpdateInput @componentName(name: "online_store") { + """ + The name of the author of the article. + """ + author: AuthorInput + + """ + The ID of the blog containing the article. + """ + blogId: ID @gidTypes(types: ["Blog"]) + + """ + The text of the article's body, complete with HTML markup. + """ + body: HTML + + """ + 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. + """ + handle: String + + """ + The image associated with the article. + """ + image: ArticleImageInput + + """ + Whether or not the article should be visible. + """ + isPublished: Boolean + + """ + The input fields to create or update a metafield. + """ + metafields: [MetafieldInput!] + + """ + The date and time (ISO 8601 format) when the article should become visible. + """ + publishDate: DateTime + + """ + 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 + + """ + 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. + """ + summary: HTML + + """ + A comma-separated list of tags. + Tags are additional short descriptors formatted as a string of comma-separated values. + """ + tags: [String!] + + """ + 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. + """ + templateSuffix: String + + """ + The title of the article. + """ + title: String +} + +""" +Return type for `articleUpdate` mutation. +""" +type ArticleUpdatePayload @componentName(name: "platform") { + """ + The article that was updated. + """ + article: Article + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ArticleUpdateUserError!]! +} + +""" +An error that occurs during the execution of `ArticleUpdate`. +""" +type ArticleUpdateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ArticleUpdateUserErrorCode + + """ + 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 `ArticleUpdateUserError`. +""" +enum ArticleUpdateUserErrorCode @componentName(name: "platform") { + """ + Can't update an article author if both author name and user ID are supplied. + """ + AMBIGUOUS_AUTHOR + + """ + Can't create a blog from input if a blog ID is supplied. + """ + AMBIGUOUS_BLOG + + """ + User must exist if a user ID is supplied. + """ + AUTHOR_MUST_EXIST + + """ + The input value is blank. + """ + BLANK + + """ + The input value is invalid. + """ + INVALID + + """ + Can’t set isPublished to true and also set a future publish date. + """ + INVALID_PUBLISH_DATE + + """ + The metafield type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + Image upload failed. + """ + UPLOAD_FAILED +} + +""" +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 Attribute @componentName(name: "platform") { + """ + The key or name of the attribute. For example, `"customer_first_order"`. + """ + key: String! + + """ + The value of the attribute. For example, `"true"`. + """ + value: String +} + +""" +The input fields for an attribute. +""" +input AttributeInput @componentName(name: "platform") { + """ + Key or name of the attribute. + """ + key: String! + + """ + Value of the attribute. + """ + value: String! +} + +""" +The intended audience for the order status page. +""" +enum Audience @componentName(name: "sales") { + """ + Intended for customer notifications. + """ + CUSTOMERVIEW + + """ + Intended for merchant wanting to preview the order status page. Should be used immediately after querying. + """ + MERCHANTVIEW +} + +""" +The input fields for an author. Either the `name` or `user_id` fields can be supplied, but never both. +""" +input AuthorInput @componentName(name: "online_store") { + """ + The author's full name. + """ + name: String + + """ + The ID of a staff member's account. + """ + userId: ID @gidTypes(types: ["StaffMember"]) +} + +""" +Automatic discount applications capture the intentions of a discount that was automatically applied. +""" +type AutomaticDiscountApplication implements DiscountApplication @componentName(name: "sales") { + """ + 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 title of the discount application. + """ + title: String! + + """ + The value of the discount application. + """ + value: PricingValue! +} + +""" +The set of valid sort keys for the AutomaticDiscount query. +""" +enum AutomaticDiscountSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Represents an object containing all information for channels available to a shop. +""" +type AvailableChannelDefinitionsByChannel @componentName(name: "channels") { + """ + The channel definitions for channels installed on a shop. + """ + channelDefinitions: [ChannelDefinition!]! + + """ + The name of the channel. + """ + channelName: String! +} + +""" +The entitlements for B2B. +""" +type B2BType @componentName(name: "billing") { + """ + Whether B2B is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for updating a backup region with exactly one required option. +""" +input BackupRegionUpdateInput @componentName(name: "markets") { + """ + A country code for the backup region. + """ + countryCode: CountryCode! +} + +""" +Return type for `backupRegionUpdate` mutation. +""" +type BackupRegionUpdatePayload @componentName(name: "platform") { + """ + Returns the updated backup region. + """ + backupRegion: MarketRegion + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +The possible types for a badge. +""" +enum BadgeType @componentName(name: "merchant_marketing") { + """ + This badge has type `attention`. + """ + ATTENTION + + """ + This badge has type `critical`. + """ + CRITICAL + + """ + This badge has type `default`. + """ + DEFAULT + + """ + This badge has type `info`. + """ + INFO + + """ + This badge has type `success`. + """ + SUCCESS + + """ + This badge has type `warning`. + """ + WARNING +} + +""" +Shopify Balance account details. +""" +type BalanceAccount @requiredAccess(scope: "`read_shopify_balance_accounts_information` access scope. Also: The user must have app permission for finance apps.") @componentName(name: "banking") { + """ + The shop's Shopify Balance accounts information. + """ + bankAccounts: [BalanceBankAccount!]! +} + +""" +A Shopify Balance bank account. +""" +type BalanceBankAccount @requiredAccess(scope: "`read_shopify_balance_accounts_information` access scope. Also: The user must have app permission for finance apps.") @componentName(name: "banking") { + """ + The account's account number. + """ + accountNumber: String! + + """ + The account's available balance. + """ + availableBalance: MoneyV2! + + """ + The account's ID. + """ + id: ID! + + """ + The account's nickname. + """ + nickname: String + + """ + Whether the account is the primary account. + """ + primary: Boolean! + + """ + The account's routing number. + """ + routingNumber: String! + + """ + The account's status. + """ + status: Status! +} + +""" +The set of valid sort keys for the BalanceTransaction query. +""" +enum BalanceTransactionSortKeys @componentName(name: "platform") { + """ + Sort by the `amount` value. + """ + AMOUNT + + """ + Sort by the `fee` value. + """ + FEE + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `net` value. + """ + NET + + """ + Sort by the `order_name` value. + """ + ORDER_NAME + + """ + Sort by the `payment_method_name` value. + """ + PAYMENT_METHOD_NAME + + """ + Sort by the `payout_date` value. + """ + PAYOUT_DATE + + """ + Sort by the `payout_status` value. + """ + PAYOUT_STATUS + + """ + Sort by the `processed_at` value. + """ + PROCESSED_AT + + """ + Sort by the `transaction_type` value. + """ + TRANSACTION_TYPE +} + +""" +Represents a bank account payment instrument. +""" +type BankAccount @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + The type of account holder. + """ + accountHolderType: BankAccountHolderType! + + """ + The type of bank account. + """ + accountType: BankAccountType! + + """ + The name of the bank. + """ + bankName: String! + + """ + The billing address associated with the bank account. + """ + billingAddress: CustomerPaymentInstrumentBillingAddress + + """ + The last four digits of the account number. + """ + lastDigits: String! +} + +""" +The type of bank account holder. +""" +enum BankAccountHolderType @componentName(name: "payments") { + """ + A company account holder. + """ + COMPANY + + """ + An individual account holder. + """ + INDIVIDUAL +} + +""" +The type of bank account. +""" +enum BankAccountType @componentName(name: "payments") { + """ + A checking account. + """ + CHECKING + + """ + A savings account. + """ + SAVINGS +} + +""" +The valid types of actions a user should be able to perform in an financial app. +""" +enum BankingFinanceAppAccess @componentName(name: "banking") { + """ + Indication that the user has blocked money movement due to MFA disabled. + """ + MONEY_MOVEMENT_BLOCKED_MFA + + """ + Indication that the user has restricted money movement. + """ + MONEY_MOVEMENT_RESTRICTED + + """ + Ability to perform actions that moves money. + """ + MOVE_MONEY + + """ + Read access in the financial app. + """ + READ_ACCESS +} + +""" +Generic payment details that are related to a transaction. +""" +interface BasePaymentDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") { + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +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 @componentName(name: "platform") { + """ + The action that occured. + """ + action: String! + + """ + Provides additional content for collapsible timeline events. + """ + additionalContent: JSON + + """ + Provides additional data for event consumers. + """ + additionalData: JSON + + """ + The name of the app that created the event. + """ + appTitle: String + + """ + Refers to a certain event and its resources. + """ + arguments: JSON + + """ + Whether the event was created by an app. + """ + attributeToApp: Boolean! + + """ + Whether the event was caused by an admin user. + """ + attributeToUser: Boolean! + + """ + The entity which performed the action that generated the event. + """ + author: String + + """ + The date and time when the event was created. + """ + createdAt: DateTime! + + """ + Whether the event is critical. + """ + criticalAlert: Boolean! + + """ + Whether this event has additional content. + """ + hasAdditionalContent: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Human readable text that describes the event. + """ + message: FormattedString! + + """ + Human readable text that supports the event message. + """ + secondaryMessage: FormattedString + + """ + 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). + """ + subject: HasEvents + + """ + The ID of the resource that generated the event. + """ + subjectId: ID! + + """ + The type of the resource that generated the event. + """ + 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 @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error code. + """ + code: BillingAttemptUserErrorCode + + """ + 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 `BillingAttemptUserError`. +""" +enum BillingAttemptUserErrorCode @componentName(name: "platform") { + """ + Billing cycle charge attempt made more than 24 hours before the billing cycle `billingAttemptExpectedDate`. + """ + BILLING_CYCLE_CHARGE_BEFORE_EXPECTED_DATE + + """ + Billing cycle must not be skipped. + """ + BILLING_CYCLE_SKIPPED + + """ + The input value is blank. + """ + BLANK + + """ + Subscription contract does not exist. + """ + CONTRACT_NOT_FOUND + + """ + Subscription contract cannot be billed if paused. + """ + CONTRACT_PAUSED + + """ + Subscription contract cannot be billed once terminated. + """ + CONTRACT_TERMINATED + + """ + Subscription contract is under review, origin order is high risk and unfulfilled. + """ + CONTRACT_UNDER_REVIEW + + """ + Billing cycle selector cannot select billing cycle outside of index range. + """ + CYCLE_INDEX_OUT_OF_RANGE + + """ + Billing cycle selector cannot select billing cycle outside of start date range. + """ + CYCLE_START_DATE_OUT_OF_RANGE + + """ + The input value is invalid. + """ + INVALID + + """ + Origin time cannot be before the contract creation time. + """ + ORIGIN_TIME_BEFORE_CONTRACT_CREATION + + """ + Origin time needs to be within the selected billing cycle's start and end at date. + """ + ORIGIN_TIME_OUT_OF_RANGE + + """ + Failed to process the billing attempt. + """ + PROCESSING_FAILED + + """ + Billing attempt rate limit exceeded - try later. + """ + THROTTLED + + """ + Billing cycle selector cannot select upcoming billing cycle past limit. + """ + UPCOMING_CYCLE_LIMIT_EXCEEDED +} + +""" +A feature definition for a plan that is marketed. +""" +type BillingPlanFeature @componentName(name: "billing") @privatelyDocumented { + """ + Description of the feature. + """ + description: String! + + """ + Whether the feature requires Shopify Payments to be enabled. + """ + requiresShopifyPayments: Boolean! + + """ + A summary of the feature. + """ + summary: String! + + """ + The type of feature. + """ + type: String! + + """ + The scalar value for the feature. + """ + values: [BillingPlanFeatureValue!]! +} + +""" +A section on the plan feature grid. +""" +type BillingPlanFeatureSection @componentName(name: "billing") @privatelyDocumented { + """ + The category in which a group of features belongs to. + """ + featureCategory: String! + + """ + The set of features. + """ + features: [BillingPlanFeature!]! + + """ + Title to display for section. + """ + title: String! +} + +""" +A key value pair for a feature with its plan name and value. +""" +type BillingPlanFeatureValue @componentName(name: "billing") @privatelyDocumented { + """ + Plan name to which the feature belongs. + """ + planName: String! + + """ + The value for the feature. + """ + value: JSON! + + """ + The optional value type for this feature value. + """ + valueType: BillingPlanFeatureValueType +} + +""" +The type of a plan feature value. +""" +enum BillingPlanFeatureValueType @componentName(name: "billing") { + """ + An optional add-on value. + """ + ADD_ON +} + +""" +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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { + """ + List of the blog's articles. + """ + articles( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ArticleConnection! + + """ + Count of articles. Limited to a maximum of 10000 by default. + """ + articlesCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + ): Count @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") + + """ + Indicates whether readers can post comments to the blog and if comments are moderated or not. + """ + commentPolicy: CommentPolicy! + + """ + The date and time when the blog was created. + """ + createdAt: DateTime! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): EventConnection! + + """ + FeedBurner provider details. Any blogs that aren't already integrated with FeedBurner can't use the service. + """ + feed: BlogFeed + + """ + 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! + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + A list of tags associated with the 200 most recent blog articles. + """ + tags: [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 + + """ + The title of the blog. + """ + 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 @gidTypes(types: ["Market"]) + ): [Translation!]! + + """ + The date and time when the blog was update. + """ + updatedAt: DateTime +} + +""" +An auto-generated type for paginating through multiple Blogs. +""" +type BlogConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [BlogEdge!]! + + """ + 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. + """ + 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 @componentName(name: "online_store") { + """ + Indicates whether readers can post comments to the blog and whether comments are moderated. + """ + commentPolicy: CommentPolicy + + """ + 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 + + """ + Attaches additional metadata to a store's resources. + """ + metafields: [MetafieldInput!] + + """ + 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 + + """ + The title of the blog. + """ + title: String! +} + +""" +Return type for `blogCreate` mutation. +""" +type BlogCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is invalid. + """ + INVALID + + """ + The metafield type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + The input value is too long. + """ + TOO_LONG +} + +""" +Return type for `blogDelete` mutation. +""" +type BlogDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { + """ + Blog feed provider url. + """ + location: URL! + + """ + Blog feed provider path. + """ + path: String! +} + +""" +The set of valid sort keys for the Blog query. +""" +enum BlogSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + Indicates whether readers can post comments to the blog and whether comments are moderated. + """ + commentPolicy: CommentPolicy + + """ + 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 + + """ + Attaches additional metadata to a store's resources. + """ + metafields: [MetafieldInput!] + + """ + Whether to redirect blog posts automatically. + """ + redirectArticles: Boolean = false + + """ + 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 + + """ + 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 + + """ + The title of the blog. + """ + title: String +} + +""" +Return type for `blogUpdate` mutation. +""" +type BlogUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + 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 +} + +""" +Return type for `bulkDiscountResourceFeedbackCreate` mutation. +""" +type BulkDiscountResourceFeedbackCreatePayload @componentName(name: "platform") { + """ + The feedback that's created. + """ + feedback: [DiscountResourceFeedback!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BulkDiscountResourceFeedbackCreateUserError!]! +} + +""" +An error that occurs during the execution of `BulkDiscountResourceFeedbackCreate`. +""" +type BulkDiscountResourceFeedbackCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: BulkDiscountResourceFeedbackCreateUserErrorCode + + """ + 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 `BulkDiscountResourceFeedbackCreateUserError`. +""" +enum BulkDiscountResourceFeedbackCreateUserErrorCode @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + The discount wasn't found or isn't available to the channel. + """ + DISCOUNT_NOT_FOUND + + """ + 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 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 input value needs to be blank. + """ + PRESENT +} + +""" +Possible error codes that can be returned by `BulkMutationUserError`. +""" +enum BulkMutationErrorCode @componentName(name: "platform") { + """ + 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 + + """ + 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 + + """ + Bulk operations limit reached. Please try again later. + """ + LIMIT_REACHED + + """ + 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 + + """ + 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 +} + +""" +Represents an error that happens during execution of a bulk mutation. +""" +type BulkMutationUserError implements DisplayableError @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Only accessible by supported access tokens: https:\/\/shopify.dev\/docs\/api\/usage\/bulk-operations\/queries#access-token-considerations.") @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The bulk operation is a mutation. + """ + MUTATION + + """ + The bulk operation is a query. + """ + QUERY +} + +""" +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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + Bulk operations limit reached. Please try again later. + """ + LIMIT_REACHED + + """ + A bulk operation is already in progress. + """ + OPERATION_IN_PROGRESS +} + +""" +The set of valid sort keys for the BulkOperations query. +""" +enum BulkOperationsSortKeys @componentName(name: "platform") { + """ + Sort by the `completed_at` value. + """ + COMPLETED_AT + + """ + Sort by the `created_at` value. + """ + CREATED_AT +} + +""" +Return type for `bulkProductResourceFeedbackCreate` mutation. +""" +type BulkProductResourceFeedbackCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + 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 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 channel was not found or does not belong to this app. + """ + NOT_FOUND + + """ + The feedback for a later version of this resource was already accepted. + """ + OUTDATED_FEEDBACK + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The product wasn't found or isn't available to the channel. + """ + PRODUCT_NOT_FOUND +} + +""" +The input fields representing the components of a bundle line item. +""" +input BundlesDraftOrderBundleLineItemComponentInput @componentName(name: "draft_orders") { + """ + 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 + + """ + The ID of the product variant corresponding to the bundle component. + """ + variantId: ID @gidTypes(types: ["ProductVariant"]) +} + +""" +Represents the Bundles feature configuration for the shop. +""" +type BundlesFeature @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + Deleting the resource failed. + """ + FAILED_TO_DELETE + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + The input is invalid. + """ + INVALID_INPUT + + """ + The number of resources exceeded the limit. + """ + LIMIT_REACHED + + """ + The input is empty. + """ + NO_INPUT + + """ + Missing a required field. + """ + REQUIRED + + """ + The resource wasn't found. + """ + RESOURCE_NOT_FOUND + + """ + The input value is already taken. + """ + TAKEN + + """ + The field value is too long. + """ + TOO_LONG + + """ + Unexpected type. + """ + UNEXPECTED_TYPE +} + +""" +An error that happens during the execution of a business customer mutation. +""" +type BusinessCustomerUserError implements DisplayableError @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope.") @componentName(name: "business_customers") { + """ + 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 @componentName(name: "shop_identity") { + """ + 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! + + """ + The stable central legal entity ID associated with this business entity. + """ + legalEntityId: BigInt + + """ + 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 @accessRestricted(reason: "Requires the `read_shopify_payments` approval scope.") +} + +""" +Represents the address of a merchant's Business Entity. +""" +type BusinessEntityAddress @componentName(name: "shop_identity") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + Whether to checkout to draft order for merchant review. + """ + checkoutToDraft: Boolean + + """ + The input fields configuring the deposit a B2B buyer. + """ + deposit: DepositInput + + """ + Whether to allow customers to edit their shipping address at checkout. + """ + editableShippingAddress: Boolean + + """ + Represents the merchant configured payment terms. + """ + paymentTermsTemplateId: ID @gidTypes(types: ["PaymentTermsTemplate"]) +} + +""" +The input fields for a buyer signal. +""" +input BuyerSignalInput @componentName(name: "markets") { + """ + The country code of the buyer. + """ + countryCode: CountryCode! + + """ + The province or state code. + """ + province: String +} + +""" +The input fields for exchange line items on a calculated return. +""" +input CalculateExchangeLineItemInput @componentName(name: "returns") { + """ + The discount to be applied to the exchange line item. + """ + appliedDiscount: ExchangeLineItemAppliedDiscountInput + + """ + The quantity of the item to be added. + """ + quantity: Int! + + """ + The ID of the product variant to be added to the order as part of an exchange. + """ + variantId: ID @gidTypes(types: ["ProductVariant"]) +} + +""" +The input fields to calculate return amounts associated with an order. +""" +input CalculateReturnInput @componentName(name: "returns") { + """ + The exchange line items to add to the order. + """ + exchangeLineItems: [CalculateExchangeLineItemInput!] = [] + + """ + The ID of the order that will be returned. + """ + orderId: ID! @gidTypes(types: ["Order"]) + + """ + The line items from the order to include in the return. + """ + returnLineItems: [CalculateReturnLineItemInput!] = [] + + """ + The return shipping fee associated with the return. + """ + returnShippingFee: ReturnShippingFeeInput +} + +""" +The input fields for return line items on a calculated return. +""" +input CalculateReturnLineItemInput @componentName(name: "returns") { + """ + The ID of the fulfillment line item to be returned. + """ + fulfillmentLineItemId: ID! @gidTypes(types: ["FulfillmentLineItem"]) + + """ + The quantity of the item to be returned. + """ + quantity: Int! + + """ + The restocking fee for the return line item. + """ + restockingFee: RestockingFeeInput +} + +""" +A discount that is automatically applied to an order that is being edited. +""" +type CalculatedAutomaticDiscountApplication implements CalculatedDiscountApplication @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope or `read_returns` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope or `read_returns` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") @protectedObject(subject: "customer") { + """ + 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! + + """ + The amount due later. + When there are payment terms, this is the total price minus the deposit amount (if any). + When there are no payment terms, this is 0. + """ + amountDueLaterSet: MoneyBag! + + """ + The amount due now. + When there are payment terms this is the value of the deposit (0 by default). + When there are no payment terms, this is the total price. + """ + amountDueNowSet: MoneyBag! + + """ + 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 + + """ + The portion required to be paid at checkout. + """ + deposit: DepositConfiguration + + """ + 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 @protectedField(subject: "customer", content: "phone") + + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") @protectedObject(subject: "customer") { + """ + 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 source of the line item's merchandise information. + """ + merchandiseSource: DraftOrderLineItemMerchandiseSourceType! + + """ + 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 ID of the variant associated with the line item. Will still be returned even if the variant has been + deleted since the draft was created or last updated. + """ + variantId: ID + + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 + + """ + The weight unit and value of the line item. + """ + weight: Weight +} + +""" +An auto-generated type for paginating through multiple CalculatedLineItems. +""" +type CalculatedLineItemConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope or `read_returns` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + Returns only the new discount applications being added to the order in the current edit. + """ + addedDiscountApplications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | editable | boolean | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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!]! + + """ + Duties charged on the order. + """ + totalDuties: TotalDuties + + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + The shipping line was added as part of the current order edit. + """ + ADDED + + """ + The shipping line has no staged changes associated with it. + """ + NONE + + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Carrier service creation failed. + """ + CARRIER_SERVICE_CREATE_FAILED +} + +""" +Return type for `carrierServiceDelete` mutation. +""" +type CarrierServiceDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Carrier service deletion failed. + """ + CARRIER_SERVICE_DELETE_FAILED +} + +""" +The set of valid sort keys for the CarrierService query. +""" +enum CarrierServiceSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_cart_transforms` access scope.") @componentName(name: "merchandising") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! +} + +""" +An auto-generated type for paginating through multiple CartTransforms. +""" +type CartTransformConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + No Shopify Function found for provided function_id. + """ + FUNCTION_NOT_FOUND + + """ + Failed to create cart transform due to invalid input. + """ + INPUT_INVALID + + """ + 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 +} + +""" +Return type for `cartTransformDelete` mutation. +""" +type CartTransformDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "shop_identity") { + """ + The cart transform operations eligible for the shop. + """ + eligibleOperations: CartTransformEligibleOperations! +} + +""" +The set of valid sort keys for the CashActivities query. +""" +enum CashActivitiesSortKeys @componentName(name: "platform") { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `time` value. + """ + TIME +} + +""" +An activity on a cash drawer. +""" +interface CashActivity @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The amount of cash added or removed as part of the activity. + """ + cash: MoneyV2! + + """ + The point of sale device payment session associated with the activity. + """ + paymentSession: PointOfSaleDevicePaymentSession! + + """ + The staff member who performed the activity. + """ + staffMember: StaffMember! + + """ + The time at which the activity occurred. + """ + time: DateTime! +} + +""" +An auto-generated type for paginating through multiple CashActivities. +""" +type CashActivityConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashActivityEdge!]! + + """ + A list of nodes that are contained in CashActivityEdge. 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: [CashActivity!]! + + """ + 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 CashActivity and a cursor during pagination. +""" +type CashActivityEdge @componentName(name: "retail") { + """ + 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 CashActivityEdge. + """ + node: CashActivity! +} + +""" +A cash adjustment activity. +""" +type CashAdjustmentActivity implements CashActivity @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The amount of cash added or removed as part of the activity. + """ + cash: MoneyV2! + + """ + The gift card associated with the activity. + """ + giftCard: GiftCard + + """ + A note associated with the activity. + """ + note: String + + """ + The point of sale device payment session associated with the activity. + """ + paymentSession: PointOfSaleDevicePaymentSession! + + """ + The reason code for the activity. + """ + reasonCode: CashManagementReasonCode + + """ + The staff member who performed the activity. + """ + staffMember: StaffMember! + + """ + The time at which the activity occurred. + """ + time: DateTime! + + """ + The type of adjustment activity. + """ + type: CashAdjustmentActivityType! +} + +""" +The type of adjustment activity. +""" +enum CashAdjustmentActivityType @componentName(name: "retail") { + """ + A manual cash adjustment. + """ + ADJUSTMENT + + """ + A cash payout, such as a gift card cash out. + """ + CASH_PAYOUT + + """ + A closing adjustment. + """ + CLOSING_ADJUSTMENT +} + +""" +A cash count activity. +""" +type CashCountActivity implements CashActivity @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The amount of cash added or removed as part of the activity. + """ + cash: MoneyV2! + + """ + The amount of cash counted during the activity. + """ + cashCounted: MoneyV2! + + """ + The discrepancy between the counted and expected cash amounts. + """ + cashDiscrepancy: MoneyV2! + + """ + The expected amount of cash in the drawer at the time of the activity. + """ + cashExpected: MoneyV2! + + """ + A note associated with the activity. + """ + note: String + + """ + The point of sale device payment session associated with the activity. + """ + paymentSession: PointOfSaleDevicePaymentSession! + + """ + The reason code for the activity. + """ + reasonCode: CashManagementReasonCode + + """ + The staff member who performed the activity. + """ + staffMember: StaffMember! + + """ + The time at which the activity occurred. + """ + time: DateTime! + + """ + The type of count activity. + """ + type: CashCountActivityType! +} + +""" +The type of count activity. +""" +enum CashCountActivityType @componentName(name: "retail") { + """ + A count performed at the closing of a session. + """ + CLOSING + + """ + A count performed during a session. + """ + MID_SESSION + + """ + A count performed at the opening of a session. + """ + OPENING +} + +""" +A cash drawer for cash management. +""" +type CashDrawer implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The current balance in the cash drawer. + """ + balance: MoneyV2! + + """ + The activities on the cash drawer. + """ + cashActivities( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | type | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: CashActivitiesSortKeys = TIME + + """ + Filter activities by staff member. + """ + staffMemberId: ID @gidTypes(types: ["StaffMember"]) + ): CashActivityConnection! + + """ + A unique ID for the cash drawer. + """ + id: ID! + + """ + The location of the cash drawer. + """ + location: Location! + + """ + The name of the cash drawer. + """ + name: String! + + """ + The net sales for this cash drawer. + """ + netSales( + """ + The date and time range for filtering net sales. + """ + dateRange: CashDrawerDateRangeInput! + ): MoneyV2! + + """ + The Point of Sale devices assigned to this cash drawer. + """ + pointOfSaleDevices( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + ): PointOfSaleDeviceConnection + + """ + The total adjustments for this cash drawer. + """ + totalAdjustments( + """ + The date and time range for filtering adjustments. + """ + dateRange: CashDrawerDateRangeInput! + ): MoneyV2! + + """ + The total discrepancies for this cash drawer. + """ + totalDiscrepancies( + """ + The date and time range for filtering discrepancies. + """ + dateRange: CashDrawerDateRangeInput! + ): MoneyV2! + + """ + The total refunds for this cash drawer. + """ + totalRefunds( + """ + The date and time range for filtering refunds. + """ + dateRange: CashDrawerDateRangeInput! + ): MoneyV2! + + """ + The total sales for this cash drawer. + """ + totalSales( + """ + The date and time range for filtering sales. + """ + dateRange: CashDrawerDateRangeInput! + ): MoneyV2! +} + +""" +An auto-generated type for paginating through multiple CashDrawers. +""" +type CashDrawerConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashDrawerEdge!]! + + """ + A list of nodes that are contained in CashDrawerEdge. 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: [CashDrawer!]! + + """ + 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 `cashDrawerCreate` mutation. +""" +type CashDrawerCreatePayload @componentName(name: "platform") { + """ + The created cash drawer. + """ + cashDrawer: CashDrawer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CashDrawerCreateUserError!]! +} + +""" +An error that occurs during the execution of `CashDrawerCreate`. +""" +type CashDrawerCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: CashDrawerCreateUserErrorCode + + """ + 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 `CashDrawerCreateUserError`. +""" +enum CashDrawerCreateUserErrorCode @componentName(name: "platform") { + """ + A cash drawer with this name already exists at the specified location. + """ + CASH_DRAWER_ALREADY_EXISTS + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The name provided is invalid. + """ + INVALID_NAME + + """ + The location was not found. + """ + LOCATION_NOT_FOUND + + """ + Failed to create cash drawer. + """ + NOT_SAVED +} + +""" +The input fields for date and time range filter. +""" +input CashDrawerDateRangeInput @componentName(name: "retail") { + """ + The start of the date and time range. + """ + from: DateTime! + + """ + The end of the date and time range. + """ + to: DateTime! +} + +""" +An auto-generated type which holds one CashDrawer and a cursor during pagination. +""" +type CashDrawerEdge @componentName(name: "retail") { + """ + 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 CashDrawerEdge. + """ + node: CashDrawer! +} + +""" +Return type for `cashDrawerFindOrCreate` mutation. +""" +type CashDrawerFindOrCreatePayload @componentName(name: "platform") { + """ + The cash drawer. + """ + cashDrawer: CashDrawer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CashDrawerFindOrCreateUserError!]! +} + +""" +An error that occurs during the execution of `CashDrawerFindOrCreate`. +""" +type CashDrawerFindOrCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: CashDrawerFindOrCreateUserErrorCode + + """ + 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 `CashDrawerFindOrCreateUserError`. +""" +enum CashDrawerFindOrCreateUserErrorCode @componentName(name: "platform") { + """ + The cash drawer assignment already exists. + """ + CASH_DRAWER_ASSIGNMENT_ALREADY_EXISTS + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The location was not found. + """ + LOCATION_NOT_FOUND + + """ + Failed to find or create cash drawer. + """ + NOT_SAVED + + """ + The point of sale device was not found. + """ + POINT_OF_SALE_DEVICE_NOT_FOUND +} + +""" +The input fields for updating a cash drawer. +""" +input CashDrawerUpdateInput @componentName(name: "retail") { + """ + The new name for the cash drawer. + """ + name: String! +} + +""" +Return type for `cashDrawerUpdate` mutation. +""" +type CashDrawerUpdatePayload @componentName(name: "platform") { + """ + The updated cash drawer. + """ + cashDrawer: CashDrawer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CashDrawerUpdateUserError!]! +} + +""" +An error that occurs during the execution of `CashDrawerUpdate`. +""" +type CashDrawerUpdateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: CashDrawerUpdateUserErrorCode + + """ + 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 `CashDrawerUpdateUserError`. +""" +enum CashDrawerUpdateUserErrorCode @componentName(name: "platform") { + """ + A cash drawer with this name already exists at the specified location. + """ + CASH_DRAWER_ALREADY_EXISTS + + """ + The cash drawer was not found. + """ + CASH_DRAWER_NOT_FOUND + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The name provided is invalid. + """ + INVALID_NAME + + """ + Failed to update cash drawer. + """ + NOT_SAVED +} + +""" +Custom reason code. +""" +type CashManagementCustomReasonCode implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The code for the custom reason code. + """ + code: String! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Default reason code. +""" +type CashManagementDefaultReasonCode implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The code for the default reason code. + """ + code: CashManagementDefaultReasonCodeEnum! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Default reason codes for cash management. +""" +enum CashManagementDefaultReasonCodeEnum @componentName(name: "retail") { + """ + Point of sale device payment session was automatically closed because the device switched to a different location. + """ + AUTO_END_SESSION_LOCATION_CHANGE + + """ + Point of sale device payment session was automatically closed because a staff member logged out. + """ + AUTO_END_SESSION_LOGOUT + + """ + Point of sale device payment session was automatically opened by a cash payment at checkout. + """ + AUTO_START_SESSION_CHECKOUT + + """ + Cash count. + """ + CASH_COUNT + + """ + Cash payout. + """ + CASH_PAYOUT + + """ + Cash pickup. + """ + CASH_PICKUP + + """ + Change correction. + """ + CHANGE_CORRECTION + + """ + Other. + """ + OTHER + + """ + Petty cash. + """ + PETTY_CASH + + """ + Tip payout. + """ + TIP_PAYOUT +} + +""" +Reason code for cash management. +""" +union CashManagementReasonCode @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") = CashManagementCustomReasonCode | CashManagementDefaultReasonCode | CashManagementSystemReasonCode + +""" +An auto-generated type for paginating through multiple CashManagementReasonCodes. +""" +type CashManagementReasonCodeConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CashManagementReasonCodeEdge!]! + + """ + A list of nodes that are contained in CashManagementReasonCodeEdge. 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: [CashManagementReasonCode!]! + + """ + 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 `cashManagementReasonCodeCreate` mutation. +""" +type CashManagementReasonCodeCreatePayload @componentName(name: "platform") { + """ + The created cash management reason code. + """ + reasonCode: CashManagementCustomReasonCode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CashManagementReasonCodeCreateUserError!]! +} + +""" +An error that occurs during the execution of `CashManagementReasonCodeCreate`. +""" +type CashManagementReasonCodeCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: CashManagementReasonCodeCreateUserErrorCode + + """ + 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 `CashManagementReasonCodeCreateUserError`. +""" +enum CashManagementReasonCodeCreateUserErrorCode @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + The reason code already exists. + """ + CODE_ALREADY_EXISTS + + """ + Failed to create cash management reason code. + """ + NOT_SAVED +} + +""" +Return type for `cashManagementReasonCodeDelete` mutation. +""" +type CashManagementReasonCodeDeletePayload @componentName(name: "platform") { + """ + The deleted cash management reason code gid. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CashManagementReasonCodeDeleteUserError!]! +} + +""" +An error that occurs during the execution of `CashManagementReasonCodeDelete`. +""" +type CashManagementReasonCodeDeleteUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: CashManagementReasonCodeDeleteUserErrorCode + + """ + 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 `CashManagementReasonCodeDeleteUserError`. +""" +enum CashManagementReasonCodeDeleteUserErrorCode @componentName(name: "platform") { + """ + Database error occurred. + """ + DATABASE_ERROR + + """ + SYSTEM type reason codes are not deletable. + """ + NOT_DELETABLE + + """ + Reason code not found. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one CashManagementReasonCode and a cursor during pagination. +""" +type CashManagementReasonCodeEdge @componentName(name: "retail") { + """ + 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 CashManagementReasonCodeEdge. + """ + node: CashManagementReasonCode! +} + +""" +A summary of cash management data. +""" +type CashManagementSummary @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The cumulative cash balance of all cash drawers at the provided end date. + """ + cashBalanceAtEnd: MoneyV2! + + """ + The cumulative cash balance of all cash drawers at the provided start date. + """ + cashBalanceAtStart: MoneyV2! + + """ + The net cash flow during the specified period (start date to end date). Calculated as net sales plus adjustments. + """ + netCash: MoneyV2! + + """ + The number of sessions that were closed during the specified period (start date to end date). + """ + sessionsClosed: Int! + + """ + The number of sessions that were opened during the specified period (start date to end date). + """ + sessionsOpened: Int! + + """ + The total cash discrepancies during the specified period (start date to end date). + """ + totalDiscrepancies: MoneyV2! +} + +""" +System reason code. +""" +type CashManagementSystemReasonCode implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The code for the system reason code. + """ + code: CashManagementSystemReasonCodeEnum! + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +System reason codes for cash management. +""" +enum CashManagementSystemReasonCodeEnum @componentName(name: "retail") { + """ + Point of sale device payment session was automatically closed because the device switched to a different location. + """ + AUTO_END_SESSION_LOCATION_CHANGE + + """ + Point of sale device payment session was automatically closed because a staff member logged out. + """ + AUTO_END_SESSION_LOGOUT + + """ + Point of sale device payment session was automatically opened by a cash payment at checkout. + """ + AUTO_START_SESSION_CHECKOUT + + """ + Cash payout. + """ + CASH_PAYOUT + + """ + Float setup. + """ + FLOAT_SETUP + + """ + Other. + """ + OTHER @deprecated(reason: "Use CashManagementDefaultReasonCodeEnum.OTHER instead.") +} + +""" +The rounding adjustment applied to total payment or refund received for an Order involving cash payments. +""" +type CashRoundingAdjustment @requiredAccess(scope: "`read_orders` access scope or `read_quick_sale` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "retail") { + """ + 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 @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The adjustments made to the cash drawer during this session. + """ + adjustments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | kind | string | + | processed_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "retail") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 cash transaction activity. +""" +type CashTransactionActivity implements CashActivity @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The amount of cash added or removed as part of the activity. + """ + cash: MoneyV2! + + """ + The order transaction associated with the activity. + """ + orderTransaction: OrderTransaction! + + """ + The point of sale device payment session associated with the activity. + """ + paymentSession: PointOfSaleDevicePaymentSession! + + """ + The staff member who performed the activity. + """ + staffMember: StaffMember! + + """ + The time at which the activity occurred. + """ + time: DateTime! + + """ + The type of transaction activity. + """ + type: CashTransactionActivityType! +} + +""" +The type of transaction activity. +""" +enum CashTransactionActivityType @componentName(name: "retail") { + """ + Change given to a customer. + """ + CHANGE + + """ + A cash refund. + """ + REFUND + + """ + A cash sale. + """ + SALE +} + +""" +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 @requiredAccess(scope: "products or product_listings read access scope. The user must have permission to view markets or customers or companies.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The IDs of the company locations to associate to the catalog. + """ + companyLocationIds: [ID!] @gidTypes(types: ["CompanyLocation"]) + + """ + The IDs of the markets to associate to the catalog. + """ + marketIds: [ID!] @gidTypes(types: ["Market"]) +} + +""" +Return type for `catalogContextUpdate` mutation. +""" +type CatalogContextUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The context associated with the catalog. + """ + context: CatalogContextInput! + + """ + The ID of the price list to associate to the catalog. + """ + priceListId: ID @gidTypes(types: ["PriceList"]) + + """ + 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 @gidTypes(types: ["Publication"]) + + """ + The status of the catalog. + """ + status: CatalogStatus! + + """ + The name of the catalog. + """ + title: String! +} + +""" +Return type for `catalogCreate` mutation. +""" +type CatalogCreatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The catalog is active. + """ + ACTIVE + + """ + The catalog is archived. + """ + ARCHIVED + + """ + The catalog is in draft. + """ + DRAFT +} + +""" +The associated catalog's type. +""" +enum CatalogType @componentName(name: "merchandising") { + """ + Catalogs belonging to apps. + """ + APP + + """ + Catalogs belonging to company locations. + """ + COMPANY_LOCATION + + """ + Catalogs belonging to markets. + """ + MARKET + + """ + Not associated to a catalog. + """ + NONE +} + +""" +The input fields used to update a catalog. +""" +input CatalogUpdateInput @componentName(name: "merchandising") { + """ + The context associated with the catalog. + """ + context: CatalogContextInput + + """ + The ID of the price list to associate to the catalog. + """ + priceListId: ID @gidTypes(types: ["PriceList"]) + + """ + The ID of the publication to associate to the catalog. + """ + publicationId: ID @gidTypes(types: ["Publication"]) + + """ + The status of the catalog. + """ + status: CatalogStatus + + """ + The name of the catalog. + """ + title: String +} + +""" +Return type for `catalogUpdate` mutation. +""" +type CatalogUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + An app catalog cannot be assigned to a price list. + """ + APP_CATALOG_PRICE_LIST_ASSIGNMENT + + """ + You've reached the maximum number of B2B catalogs allowed for your plan. + """ + B2B_CATALOG_LIMIT_REACHED + + """ + The input value is blank. + """ + BLANK + + """ + The catalog can't be associated with more than one market. + """ + CANNOT_ADD_MORE_THAN_ONE_MARKET + + """ + Cannot create a catalog for an app. + """ + CANNOT_CREATE_APP_CATALOG + + """ + Cannot create a catalog for a market. + """ + CANNOT_CREATE_MARKET_CATALOG + + """ + Cannot delete a catalog for an app. + """ + CANNOT_DELETE_APP_CATALOG + + """ + Cannot delete a catalog for a market. + """ + CANNOT_DELETE_MARKET_CATALOG + + """ + Cannot modify a catalog for an app. + """ + CANNOT_MODIFY_APP_CATALOG + + """ + Cannot modify a catalog for a market. + """ + CANNOT_MODIFY_MARKET_CATALOG + + """ + 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 + + """ + Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES + + """ + The catalog context is currently being modified. Please try again later. + """ + CATALOG_CONTEXT_LOCKED + + """ + Catalog failed to save. + """ + CATALOG_FAILED_TO_SAVE + + """ + The catalog wasn't found. + """ + CATALOG_NOT_FOUND + + """ + A company location catalog outside of a supported plan can only have an archived status. + """ + COMPANY_LOCATION_CATALOG_STATUS_PLAN + + """ + The company location could not be found. + """ + COMPANY_LOCATION_NOT_FOUND + + """ + 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 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 input value is invalid. + """ + INVALID + + """ + The catalog context type is invalid. + """ + INVALID_CATALOG_CONTEXT_TYPE + + """ + Cannot change context to specified type. + """ + INVALID_CONTEXT_CHANGE + + """ + The managed country belongs to another catalog. + """ + MANAGED_COUNTRY_BELONGS_TO_ANOTHER_CATALOG + + """ + The catalog's market and price list currencies do not match. + """ + MARKET_AND_PRICE_LIST_CURRENCY_MISMATCH + + """ + A market catalog must have an active status. + """ + MARKET_CATALOG_STATUS + + """ + Market not found. + """ + MARKET_NOT_FOUND + + """ + Market already belongs to another catalog. + """ + MARKET_TAKEN + + """ + Must provide exactly one context type. + """ + MUST_PROVIDE_EXACTLY_ONE_CONTEXT_TYPE + + """ + Price list failed to save. + """ + PRICE_LIST_FAILED_TO_SAVE + + """ + The price list is currently being modified. Please try again later. + """ + PRICE_LIST_LOCKED + + """ + A price list cannot be assigned to the primary market. + """ + PRICE_LIST_NOT_ALLOWED_FOR_PRIMARY_MARKET + + """ + Price list not found. + """ + PRICE_LIST_NOT_FOUND + + """ + Publication not found. + """ + PUBLICATION_NOT_FOUND + + """ + Must have `contexts_to_add` or `contexts_to_remove` argument. + """ + REQUIRES_CONTEXTS_TO_ADD_OR_REMOVE + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Catalogs assigned to company locations can't be set to active with your plan. + """ + UNPERMITTED_ENTITLEMENTS_DIRECT_CATALOG_ASSIGNMENT + + """ + Managing this catalog is not supported by your plan. + """ + UNPERMITTED_ENTITLEMENTS_MARKET_CATALOGS + + """ + Can't perform this action on a catalog of this type. + """ + UNSUPPORTED_CATALOG_ACTION +} + +""" +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 @componentName(name: "channels") { + """ + The unique account ID for the merchant on the external platform. This value is + opaque to Shopify — its format is determined by the channel, such as an Amazon + Seller ID or Google Merchant Center ID. + """ + accountId: String + + """ + The merchant-facing name for the external account. Displayed in Shopify Admin + wherever the channel connection is referenced, such as in Markets and order attribution. + """ + accountName: String + + """ + The regions where the channel is currently active. Includes spec-declared regions plus regions with active product feeds. + """ + activeRegions: [CountryCode!]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationConnection! + + """ + The list of collections published to the channel. + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @gidTypes(types: ["Collection"]) + ): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The markets associated with this channel. + """ + markets( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketConnection + + """ + The number of markets associated with this channel. + """ + marketsCount: Count + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationConnection! + + """ + The list of products published to the channel. + """ + products( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-1234` | + | 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` | + | 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` | + | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) + field. | | | - `collection_id:108179161409` | + | 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` | + | 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'` | + | 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` | + | error_feedback | string | Filter by products with publishing errors. | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | 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` | + | has_only_composites | boolean | Filter by products that have only + composite variants. | | | - `has_only_composites:true` | + | 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` | + | has_variant_with_components | boolean | Filter by products that have + variants with associated components. | | | - + `has_variant_with_components:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_total | integer | Filter by inventory count. | | | - + `inventory_total:0`
- `inventory_total:>150`
- + `inventory_total:>=200` | + | 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` | + | 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"` | + | out_of_stock_somewhere | boolean | Filter by products that are out of + stock in at least one location. | | | - `out_of_stock_somewhere:true` | + | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) + field. | | | - `price:100.57` | + | 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` | + | 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` | + | product_type | string | Filter by a comma-separated list of [product + types](https://help.shopify.com/manual/products/details/product-type). | | | + - `product_type:snowboard` | + | publication_ids | string | Filter by a comma-separated list of publication + IDs that are associated with the product. | | | - + `publication_ids:184111530305,184111694145` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | `active` | - + `status:active,draft` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) + field. | | | - `title:The Minimal Snowboard` | + | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + enabled. | | | - `tracks_inventory:true` | + | 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'` | + | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) + field. | | | - `variant_id:45779434701121` | + | 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'` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): Count @requiredAccess(scope: "`read_products` access scope.") + + """ + The resource feedback for the channel. Returns `null` when no active feedback + exists—for example, after `shopResourceFeedbackCreate` is called with `state: + ACCEPTED`, which clears the feedback signal. A `null` result is expected and + means the channel has no outstanding feedback. + """ + resourceFeedback: AppFeedback + + """ + The handle of the [channel specification](https://shopify.dev/docs/apps/build/sales-channels/channel-config-extension) + bound to this channel. The specification declares the channel's regional + coverage, capabilities, and requirements, and is deployed by the Sales Channel + application via `shopify app deploy`. + """ + specificationHandle: String + + """ + Whether the channel supports future publishing. + """ + supportsFuturePublishing: Boolean! +} + +""" +An auto-generated type for paginating through multiple Channels. +""" +type ChannelConnection @componentName(name: "platform") { + """ + 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! +} + +""" +The input fields for creating a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). +""" +input ChannelCreateInput @componentName(name: "channels") { + """ + A unique identifier for the merchant's account on the external platform, such + as an Amazon Seller ID or Google Merchant Center ID. Used together with + `specificationHandle` to uniquely identify the channel connection. + """ + accountId: String! + + """ + The merchant-facing name for the external account. Displayed in Shopify Admin + wherever the channel connection is referenced, such as in Markets and order + attribution. Should match how the merchant recognises the account on the + external platform. + """ + accountName: String! + + """ + A unique, human-readable identifier for the channel within the shop. For + example, `amazon-us-A1B2C3D4E5F6G7`. Used for lookups via [`channelByHandle`](https://shopify.dev/docs/api/admin-graphql/latest/queries/channelByHandle). + If not provided, auto-generated from the specification handle and account ID. + Must be unique across all channels on the shop. + """ + handle: String + + """ + The handle of the [channel specification](https://shopify.dev/docs/apps/build/sales-channels/channel-config-extension) + to bind to this channel. The specification must have been deployed by the + calling application via `shopify app deploy`. Determines the channel's + regional coverage, capabilities, and requirements. + """ + specificationHandle: String! +} + +""" +Return type for `channelCreate` mutation. +""" +type ChannelCreatePayload @componentName(name: "platform") { + """ + The channel that was created. + """ + channel: Channel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ChannelCreateUserError!]! +} + +""" +An error that occurs during the execution of `ChannelCreate`. +""" +type ChannelCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ChannelCreateUserErrorCode + + """ + 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 `ChannelCreateUserError`. +""" +enum ChannelCreateUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +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. The +marketplace flag identifies whether this surface represents a marketplace +channel such as shops on Facebook, Instagram, or Buy on Google. +""" +type ChannelDefinition implements Node @componentName(name: "channels") { + """ + 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") +} + +""" +Return type for `channelDelete` mutation. +""" +type ChannelDeletePayload @componentName(name: "platform") { + """ + The ID of the deleted channel. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ChannelDeleteUserError!]! +} + +""" +An error that occurs during the execution of `ChannelDelete`. +""" +type ChannelDeleteUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ChannelDeleteUserErrorCode + + """ + 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 `ChannelDeleteUserError`. +""" +enum ChannelDeleteUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +An auto-generated type which holds one Channel and a cursor during pagination. +""" +type ChannelEdge @componentName(name: "channels") { + """ + 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! +} + +""" +Return type for `channelFullSync` mutation. +""" +type ChannelFullSyncPayload @componentName(name: "platform") { + """ + Trace information for each country-language product feed that was triggered. Returns one entry per feed. + """ + fullSyncTraceInfo: [FullSyncTraceInfo!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ChannelFullSyncUserError!]! +} + +""" +An error that occurs during the execution of `ChannelFullSync`. +""" +type ChannelFullSyncUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ChannelFullSyncUserErrorCode + + """ + 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 `ChannelFullSyncUserError`. +""" +enum ChannelFullSyncUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +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 @componentName(name: "channels") { + """ + 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! +} + +""" +The input fields for updating a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). +""" +input ChannelUpdateInput @componentName(name: "channels") { + """ + An updated identifier for the merchant's account on the external platform. + Changing this value signals that the channel connection now represents a + different external account. + """ + accountId: String + + """ + An updated merchant-facing name for the external account. Displayed in Shopify + Admin when multiple channels exist for the same app, to help merchants + distinguish between connections. + """ + accountName: String + + """ + A new unique identifier for the channel within the shop. Must be unique across + all channels on the shop. Handles are typically set at creation and rarely + changed — use when correcting a handle or migrating legacy channel records. + """ + handle: String + + """ + The handle of the [channel specification](https://shopify.dev/docs/apps/build/sales-channels/channel-config-extension) + to bind to this channel. When changed, the platform re-evaluates the + specification's country coverage against the shop's region markets and + reconciles product feeds accordingly. + """ + specificationHandle: String +} + +""" +Return type for `channelUpdate` mutation. +""" +type ChannelUpdatePayload @componentName(name: "platform") { + """ + The channel that was updated. + """ + channel: Channel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ChannelUpdateUserError!]! +} + +""" +An error that occurs during the execution of `ChannelUpdate`. +""" +type ChannelUpdateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ChannelUpdateUserErrorCode + + """ + 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 `ChannelUpdateUserError`. +""" +enum ChannelUpdateUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +A condition checking the channel that the visitor is shopping from. +""" +type ChannelsCondition @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The channels that comprise the market. + """ + channels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection! + + """ + The total number of channels condition. + """ + channelsCount: Count +} + +""" +A checkout and account configuration packages branding settings, UI extensions, and overrides for a shop's checkout. +""" +type CheckoutAndAccountsConfiguration implements CheckoutAndAccountsConfigurationInterface & Node @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The branding configuration. + """ + branding: CheckoutAndAccountsConfigurationBranding + + """ + The date and time when the configuration was created. + """ + createdAt: DateTime! + + """ + The date and time when the configuration was last edited. + """ + editedAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Whether the configuration is published or not. + """ + isPublished: Boolean! + + """ + The configuration name. + """ + name: String! + + """ + The list of overrides for the configuration. + """ + overrides: [CheckoutAndAccountsConfigurationOverride!]! + + """ + The date and time when the configuration was last updated. + """ + updatedAt: DateTime! +} + +""" +The branding configuration for checkout and customer accounts. +""" +type CheckoutAndAccountsConfigurationBranding @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The components that apply to all surfaces. + """ + components: CheckoutAndAccountsConfigurationBrandingComponents + + """ + The design tokens allow 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. + """ + designTokens: CheckoutAndAccountsConfigurationBrandingDesignTokens + + """ + The surface-specific customizations. + """ + surfaces: CheckoutAndAccountsConfigurationBrandingSurfaces +} + +""" +The container background style. +""" +enum CheckoutAndAccountsConfigurationBrandingBackground @componentName(name: "checkouts") { + """ + The Base background style. + """ + BASE + + """ + The Subdued background style. + """ + SUBDUED +} + +""" +The base color role customizations for a surface. +""" +type CheckoutAndAccountsConfigurationBrandingBaseColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + 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 customizing a base group of colors. +""" +input CheckoutAndAccountsConfigurationBrandingBaseColorRolesInput @componentName(name: "checkouts") { + """ + 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 +} + +""" +Possible values for the border. +""" +enum CheckoutAndAccountsConfigurationBrandingBorder @componentName(name: "checkouts") { + """ + The Block End border. + """ + BLOCK_END + + """ + The Full border. + """ + FULL + + """ + The None border. + """ + NONE +} + +""" +The container border style. +""" +enum CheckoutAndAccountsConfigurationBrandingBorderStyle @componentName(name: "checkouts") { + """ + The Base border style. + """ + BASE + + """ + The Dashed border style. + """ + DASHED + + """ + The Dotted border style. + """ + DOTTED +} + +""" +The container border width. +""" +enum CheckoutAndAccountsConfigurationBrandingBorderWidth @componentName(name: "checkouts") { + """ + The Base border width. + """ + BASE + + """ + The Large border width. + """ + LARGE + + """ + The Large 100 border width. + """ + LARGE_100 + + """ + The Large 200 border width. + """ + LARGE_200 +} + +""" +The buttons customizations. +""" +type CheckoutAndAccountsConfigurationBrandingButton @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The block padding. + """ + blockPadding: CheckoutAndAccountsConfigurationBrandingSpacing + + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The inline padding. + """ + inlinePadding: CheckoutAndAccountsConfigurationBrandingSpacing + + """ + The typography. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypographyStyle +} + +""" +The input fields for customizing the buttons. +""" +input CheckoutAndAccountsConfigurationBrandingButtonInput @componentName(name: "checkouts") { + """ + The block padding. + """ + blockPadding: CheckoutAndAccountsConfigurationBrandingSpacing + + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The inline padding. + """ + inlinePadding: CheckoutAndAccountsConfigurationBrandingSpacing + + """ + The typography style. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypographyStyleInput +} + +""" +The customizations for the breadcrumbs that represent a buyer's journey to the checkout. +""" +type CheckoutAndAccountsConfigurationBrandingBuyerJourney @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + An option to display or hide the breadcrumbs that represent the buyer's journey on 3-page checkout. + """ + visibility: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +The input fields for updating breadcrumb customizations, which represent the buyer's journey to checkout. +""" +input CheckoutAndAccountsConfigurationBrandingBuyerJourneyInput @componentName(name: "checkouts") { + """ + The visibility customizations for updating breadcrumbs, which represent the buyer's journey to checkout. + """ + visibility: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +The customizations that you can make to cart links at checkout. +""" +type CheckoutAndAccountsConfigurationBrandingCartLink @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + Whether the cart link is visible at checkout. + """ + visibility: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +Possible values for the cart link content type for the header. +""" +enum CheckoutAndAccountsConfigurationBrandingCartLinkContentType @componentName(name: "checkouts") { + """ + 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 customizing the cart link at Checkout. +""" +input CheckoutAndAccountsConfigurationBrandingCartLinkInput @componentName(name: "checkouts") { + """ + 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: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +The checkboxes customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCheckbox @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius +} + +""" +The input fields for customizing the checkboxes. +""" +input CheckoutAndAccountsConfigurationBrandingCheckboxInput @componentName(name: "checkouts") { + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius +} + +""" +The checkout-specific component customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCheckoutComponents @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The customizations for the breadcrumbs that represent a buyer's journey to the checkout. + """ + buyerJourney: CheckoutAndAccountsConfigurationBrandingBuyerJourney + + """ + 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: CheckoutAndAccountsConfigurationBrandingCartLink + + """ + The content container customizations. + """ + content: CheckoutAndAccountsConfigurationBrandingContent + + """ + The express checkout customizations. + """ + expressCheckout: CheckoutAndAccountsConfigurationBrandingExpressCheckout + + """ + The checkout footer customizations. + """ + footer: CheckoutAndAccountsConfigurationBrandingCheckoutFooter + + """ + The checkout header customizations. + """ + header: CheckoutAndAccountsConfigurationBrandingCheckoutHeader + + """ + The main checkout customizations. + """ + main: CheckoutAndAccountsConfigurationBrandingMain + + """ + The order summary customizations. + """ + orderSummary: CheckoutAndAccountsConfigurationBrandingOrderSummary +} + +""" +The input fields for customizing the Checkout components. +""" +input CheckoutAndAccountsConfigurationBrandingCheckoutComponentsInput @componentName(name: "checkouts") { + """ + The breadcrumbs that represent a buyer's journey to the checkout. + """ + buyerJourney: CheckoutAndAccountsConfigurationBrandingBuyerJourneyInput + + """ + 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: CheckoutAndAccountsConfigurationBrandingCartLinkInput + + """ + The content container. + """ + content: CheckoutAndAccountsConfigurationBrandingContentInput + + """ + The express checkout. + """ + expressCheckout: CheckoutAndAccountsConfigurationBrandingExpressCheckoutInput + + """ + The footer. + """ + footer: CheckoutAndAccountsConfigurationBrandingCheckoutFooterInput + + """ + The header. + """ + header: CheckoutAndAccountsConfigurationBrandingCheckoutHeaderInput + + """ + The main area. + """ + main: CheckoutAndAccountsConfigurationBrandingMainInput + + """ + The order summary. + """ + orderSummary: CheckoutAndAccountsConfigurationBrandingOrderSummaryInput +} + +""" +A container for the checkout footer section customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCheckoutFooter @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The footer alignment. + """ + alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment + + """ + The background style of the footer container. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The footer content settings. + """ + content: CheckoutAndAccountsConfigurationBrandingFooterContent + + """ + The divided setting. + """ + divided: Boolean + + """ + The padding of the footer container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The footer position. + """ + position: CheckoutAndAccountsConfigurationBrandingFooterPosition +} + +""" +The input fields for customizing the checkout footer. +""" +input CheckoutAndAccountsConfigurationBrandingCheckoutFooterInput @componentName(name: "checkouts") { + """ + The footer alignment settings. You can set the footer native content alignment to the left, center, or right. + """ + alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment + + """ + The background style of the footer container. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The input field for setting the footer content customizations. + """ + content: CheckoutAndAccountsConfigurationBrandingFooterContentInput + + """ + The divided setting. + """ + divided: Boolean + + """ + The padding of the footer container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The footer position. + """ + position: CheckoutAndAccountsConfigurationBrandingFooterPosition +} + +""" +The checkout header customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCheckoutHeader @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The header alignment. + """ + alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment + + """ + The background style of the header container. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + 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: CheckoutAndAccountsConfigurationBrandingHeaderCartLink + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The divided setting. + """ + divided: Boolean + + """ + The store logo. + """ + logo: CheckoutAndAccountsConfigurationBrandingLogo + + """ + The padding of the header container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The header position. + """ + position: CheckoutAndAccountsConfigurationBrandingHeaderPosition +} + +""" +The input fields for customizing the checkout header. +""" +input CheckoutAndAccountsConfigurationBrandingCheckoutHeaderInput @componentName(name: "checkouts") { + """ + The header alignment. + """ + alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment + + """ + The background style of the header container. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + 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: CheckoutAndAccountsConfigurationBrandingHeaderCartLinkInput + + """ + The colors customizations for the header container. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The divided setting. + """ + divided: Boolean + + """ + The store logo. + """ + logo: CheckoutAndAccountsConfigurationBrandingLogoInput + + """ + The padding of the header container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The header position. + """ + position: CheckoutAndAccountsConfigurationBrandingHeaderPosition +} + +""" +The checkout-specific component customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCheckoutSurface @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The checkout components. + """ + components: CheckoutAndAccountsConfigurationBrandingCheckoutComponents +} + +""" +The input fields for customizing the Checkout surface. +""" +input CheckoutAndAccountsConfigurationBrandingCheckoutSurfaceInput @componentName(name: "checkouts") { + """ + The Checkout components. + """ + components: CheckoutAndAccountsConfigurationBrandingCheckoutComponentsInput +} + +""" +The choice list customizations. +""" +type CheckoutAndAccountsConfigurationBrandingChoiceList @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The 'group' variant of ChoiceList. + """ + group: CheckoutAndAccountsConfigurationBrandingChoiceListGroup +} + +""" +The customizations that apply to the 'group' variant of ChoiceList. +""" +type CheckoutAndAccountsConfigurationBrandingChoiceListGroup @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The spacing between UI elements in the list. + """ + spacing: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The input fields for customizing the 'group' variant of ChoiceList. +""" +input CheckoutAndAccountsConfigurationBrandingChoiceListGroupInput @componentName(name: "checkouts") { + """ + The spacing between UI elements in the list. + """ + spacing: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The input fields for customizing the choice list. +""" +input CheckoutAndAccountsConfigurationBrandingChoiceListInput @componentName(name: "checkouts") { + """ + The 'group' variant of ChoiceList. + """ + group: CheckoutAndAccountsConfigurationBrandingChoiceListGroupInput +} + +""" +The color role customizations for a surface. +""" +type CheckoutAndAccountsConfigurationBrandingColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + 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 customizing a group of colors used together on a surface. +""" +input CheckoutAndAccountsConfigurationBrandingColorRolesInput @componentName(name: "checkouts") { + """ + 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 color settings used to customize the user interface. +""" +type CheckoutAndAccountsConfigurationBrandingColors @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The main colors, used for the surface background, text, links, and more. + """ + base: CheckoutAndAccountsConfigurationBrandingBaseColorRoles + + """ + 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: CheckoutAndAccountsConfigurationBrandingControlColorRoles + + """ + The colors of the primary button. For example, the main payment, or **Pay now** button. + """ + primaryButton: CheckoutAndAccountsConfigurationBrandingPrimaryButtonColorRoles + + """ + The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. + """ + secondaryButton: CheckoutAndAccountsConfigurationBrandingSecondaryButtonColorRoles +} + +""" +The input fields for customizing a base set of colors, from which every component pulls its colors. +""" +input CheckoutAndAccountsConfigurationBrandingColorsInput @componentName(name: "checkouts") { + """ + The main colors, used for the surface background, text, links, and more. + """ + base: CheckoutAndAccountsConfigurationBrandingBaseColorRolesInput + + """ + 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: CheckoutAndAccountsConfigurationBrandingControlColorRolesInput + + """ + The colors of the primary button. For example, the main payment, or **Pay now** button. + """ + primaryButton: CheckoutAndAccountsConfigurationBrandingPrimaryButtonColorRolesInput + + """ + The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. + """ + secondaryButton: CheckoutAndAccountsConfigurationBrandingSecondaryButtonColorRolesInput +} + +""" +The base component customizations that apply to all surfaces. +""" +type CheckoutAndAccountsConfigurationBrandingComponents @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The checkboxes. + """ + checkbox: CheckoutAndAccountsConfigurationBrandingCheckbox + + """ + The choice list. + """ + choiceList: CheckoutAndAccountsConfigurationBrandingChoiceList + + """ + The form controls. + """ + control: CheckoutAndAccountsConfigurationBrandingControl + + """ + 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: CheckoutAndAccountsConfigurationBrandingDividerStyle + + """ + The favicon. + """ + favicon: CheckoutAndAccountsConfigurationBrandingImageValue + + """ + The footer. + """ + footer: CheckoutAndAccountsConfigurationBrandingFooter + + """ + The header. + """ + header: CheckoutAndAccountsConfigurationBrandingHeader + + """ + The Heading Level 1. + """ + headingLevel1: CheckoutAndAccountsConfigurationBrandingHeadingLevel + + """ + The Heading Level 2. + """ + headingLevel2: CheckoutAndAccountsConfigurationBrandingHeadingLevel + + """ + The Heading Level 3. + """ + headingLevel3: CheckoutAndAccountsConfigurationBrandingHeadingLevel + + """ + The main area. + """ + main: CheckoutAndAccountsConfigurationBrandingMain + + """ + The merchandise thumbnails. + """ + merchandiseThumbnail: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnail + + """ + The primary buttons. + """ + primaryButton: CheckoutAndAccountsConfigurationBrandingButton + + """ + The secondary buttons. + """ + secondaryButton: CheckoutAndAccountsConfigurationBrandingButton + + """ + The selects. + """ + select: CheckoutAndAccountsConfigurationBrandingSelect + + """ + The shared settings. + """ + shared: CheckoutAndAccountsConfigurationBrandingShared + + """ + The text fields. + """ + textField: CheckoutAndAccountsConfigurationBrandingTextField +} + +""" +The input fields for customizing the components. +""" +input CheckoutAndAccountsConfigurationBrandingComponentsInput @componentName(name: "checkouts") { + """ + The checkboxes customizations. + """ + checkbox: CheckoutAndAccountsConfigurationBrandingCheckboxInput + + """ + The choice list customizations. + """ + choiceList: CheckoutAndAccountsConfigurationBrandingChoiceListInput + + """ + The form controls customizations. + """ + control: CheckoutAndAccountsConfigurationBrandingControlInput + + """ + The divider customizations. + """ + divider: CheckoutAndAccountsConfigurationBrandingDividerStyleInput + + """ + The favicon. + """ + favicon: CheckoutAndAccountsConfigurationBrandingImageInput + + """ + The footer customizations. + """ + footer: CheckoutAndAccountsConfigurationBrandingFooterInput + + """ + The header customizations. + """ + header: CheckoutAndAccountsConfigurationBrandingHeaderInput + + """ + The Heading Level 1 customizations. + """ + headingLevel1: CheckoutAndAccountsConfigurationBrandingHeadingLevelInput + + """ + The Heading Level 2 customizations. + """ + headingLevel2: CheckoutAndAccountsConfigurationBrandingHeadingLevelInput + + """ + The Heading Level 3 customizations. + """ + headingLevel3: CheckoutAndAccountsConfigurationBrandingHeadingLevelInput + + """ + The main area customizations. + """ + main: CheckoutAndAccountsConfigurationBrandingMainInput + + """ + The merchandise thumbnails customizations. + """ + merchandiseThumbnail: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailInput + + """ + The primary buttons customizations. + """ + primaryButton: CheckoutAndAccountsConfigurationBrandingButtonInput + + """ + The secondary buttons customizations. + """ + secondaryButton: CheckoutAndAccountsConfigurationBrandingButtonInput + + """ + The selects customizations. + """ + select: CheckoutAndAccountsConfigurationBrandingSelectInput + + """ + The shared customizations. + """ + shared: CheckoutAndAccountsConfigurationBrandingSharedInput + + """ + The text fields customizations. + """ + textField: CheckoutAndAccountsConfigurationBrandingTextFieldInput +} + +""" +The container's divider customizations. +""" +type CheckoutAndAccountsConfigurationBrandingContainerDivider @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The divider style. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The divider width. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth + + """ + The divider visibility. + """ + visibility: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +The input fields for customizing a container's divider. +""" +input CheckoutAndAccountsConfigurationBrandingContainerDividerInput @componentName(name: "checkouts") { + """ + The divider style. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The divider width. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth + + """ + The divider visibility. + """ + visibility: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +The content customizations. +""" +type CheckoutAndAccountsConfigurationBrandingContent @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The divider style and visibility. + """ + divider: CheckoutAndAccountsConfigurationBrandingContainerDivider +} + +""" +The input fields for customizing the content container. +""" +input CheckoutAndAccountsConfigurationBrandingContentInput @componentName(name: "checkouts") { + """ + Divider style and visibility on the content container. + """ + divider: CheckoutAndAccountsConfigurationBrandingContainerDividerInput +} + +""" +The form controls customizations. +""" +type CheckoutAndAccountsConfigurationBrandingControl @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The label position. + """ + labelPosition: CheckoutAndAccountsConfigurationBrandingLabelPosition +} + +""" +The form control color customizations. +""" +type CheckoutAndAccountsConfigurationBrandingControlColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + 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: CheckoutAndAccountsConfigurationBrandingColorRoles + + """ + The color of text. + """ + text: String +} + +""" +The input fields for customizing colors for form controls. +""" +input CheckoutAndAccountsConfigurationBrandingControlColorRolesInput @componentName(name: "checkouts") { + """ + 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: CheckoutAndAccountsConfigurationBrandingColorRolesInput + + """ + The color of text. + """ + text: String +} + +""" +The input fields for customizing the form controls. +""" +input CheckoutAndAccountsConfigurationBrandingControlInput @componentName(name: "checkouts") { + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The label position. + """ + labelPosition: CheckoutAndAccountsConfigurationBrandingLabelPosition +} + +""" +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). +""" +enum CheckoutAndAccountsConfigurationBrandingCornerRadius @componentName(name: "checkouts") { + """ + The corner radius with a pixel value defined by designTokens.cornerRadius.base. + """ + BASE + + """ + The corner radius with a pixel value defined by designTokens.cornerRadius.large. + """ + LARGE + + """ + The 0px corner radius (square corners). + """ + NONE + + """ + The corner radius with a pixel value defined by designTokens.cornerRadius.small. + """ + SMALL +} + +""" +The corner radius variable customizations that define the pixel size of corner radius options. +""" +type CheckoutAndAccountsConfigurationBrandingCornerRadiusVariables @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + 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 for customizing the corner radius variables. +""" +input CheckoutAndAccountsConfigurationBrandingCornerRadiusVariablesInput @componentName(name: "checkouts") { + """ + 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 + + """ + The value in pixels for small corner radii. It should be greater than zero. Example: 3. + """ + small: Int +} + +""" +The custom font customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCustomFont @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + Globally unique ID reference to the custom font file. + """ + genericFileId: ID + + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +The custom font group customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCustomFontGroup @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The base custom font. + """ + base: CheckoutAndAccountsConfigurationBrandingCustomFont + + """ + The bold custom font. + """ + bold: CheckoutAndAccountsConfigurationBrandingCustomFont + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy + + """ + The font group name. + """ + name: String +} + +""" +The input fields for customizing a custom font group. +""" +input CheckoutAndAccountsConfigurationBrandingCustomFontGroupInput @componentName(name: "checkouts") { + """ + The base font. + """ + base: CheckoutAndAccountsConfigurationBrandingCustomFontInput! + + """ + The bold font. + """ + bold: CheckoutAndAccountsConfigurationBrandingCustomFontInput! + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy +} + +""" +The input fields for customizing a custom font. +""" +input CheckoutAndAccountsConfigurationBrandingCustomFontInput @componentName(name: "checkouts") { + """ + A globally-unique ID for a font file uploaded via the Files api. Allowed font types are .woff and .woff2. + """ + genericFileId: ID! @gidTypes(types: ["GenericFile"]) + + """ + The font weight. Its value should be between 100 and 900. + """ + weight: Int! +} + +""" +The customer accounts-specific component customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCustomerAccountsComponents @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The footer customizations. + """ + footer: CheckoutAndAccountsConfigurationBrandingCustomerAccountsFooter + + """ + The header customizations. + """ + header: CheckoutAndAccountsConfigurationBrandingCustomerAccountsHeader + + """ + The main customer accounts customizations. + """ + main: CheckoutAndAccountsConfigurationBrandingCustomerAccountsMain +} + +""" +The input fields for customizing the Customer Accounts components. +""" +input CheckoutAndAccountsConfigurationBrandingCustomerAccountsComponentsInput @componentName(name: "checkouts") { + """ + The footer customizations. + """ + footer: CheckoutAndAccountsConfigurationBrandingCustomerAccountsFooterInput + + """ + The header customizations. + """ + header: CheckoutAndAccountsConfigurationBrandingCustomerAccountsHeaderInput + + """ + The main area customizations. + """ + main: CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainInput +} + +""" +A container for the customer accounts footer section customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCustomerAccountsFooter @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The footer alignment. + """ + alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The padding of the footer container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The input fields for customizing the customer accounts footer. +""" +input CheckoutAndAccountsConfigurationBrandingCustomerAccountsFooterInput @componentName(name: "checkouts") { + """ + The footer alignment settings. You can set the footer native content alignment to the left, center, or right. + """ + alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The padding of the footer container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The checkout header customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCustomerAccountsHeader @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The header alignment. + """ + alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The store logo. + """ + logo: CheckoutAndAccountsConfigurationBrandingCustomerAccountsLogo + + """ + The padding of the header container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The input fields for customizing the customer accounts header. +""" +input CheckoutAndAccountsConfigurationBrandingCustomerAccountsHeaderInput @componentName(name: "checkouts") { + """ + The header alignment. + """ + alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment + + """ + The colors customizations for the header container. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The store logo. + """ + logo: CheckoutAndAccountsConfigurationBrandingCustomerAccountsLogoInput + + """ + The padding of the header container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The customer accounts store logo customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCustomerAccountsLogo @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The logo image. + """ + image: CheckoutAndAccountsConfigurationBrandingImageValue + + """ + The maximum width of the logo. + """ + maxWidth: Int +} + +""" +The input fields for customizing the logo. +""" +input CheckoutAndAccountsConfigurationBrandingCustomerAccountsLogoInput @componentName(name: "checkouts") { + """ + The logo image. + """ + image: CheckoutAndAccountsConfigurationBrandingImageInput + + """ + The maximum width of the logo. + """ + maxWidth: Int +} + +""" +The customer accounts-specific main customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCustomerAccountsMain @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The customer accounts main section. + """ + section: CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainSection +} + +""" +The input fields for customizing the main container. +""" +input CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainInput @componentName(name: "checkouts") { + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The customizations for the main sections. + """ + section: CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainSectionInput +} + +""" +The customer accounts branding section customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainSection @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The background style of the main sections. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The border for the main sections. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The border style of the main sections. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The border width of the main sections. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The corner radius of the main sections. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The padding of the main sections. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The shadow of the main sections. + """ + shadow: CheckoutAndAccountsConfigurationBrandingShadow +} + +""" +The input fields for customizing the customer accounts branding section. +""" +input CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainSectionInput @componentName(name: "checkouts") { + """ + The background style of the main sections. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The border for the main sections. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The border style of the main sections. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The border width of the main sections. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The corner radius of the main sections. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The padding of the main sections. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The shadow of the main sections. + """ + shadow: CheckoutAndAccountsConfigurationBrandingShadow +} + +""" +The customer accounts-specific component customizations. +""" +type CheckoutAndAccountsConfigurationBrandingCustomerAccountsSurface @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The customer accounts components. + """ + components: CheckoutAndAccountsConfigurationBrandingCustomerAccountsComponents +} + +""" +The input fields for customizing the Customer Accounts surface. +""" +input CheckoutAndAccountsConfigurationBrandingCustomerAccountsSurfaceInput @componentName(name: "checkouts") { + """ + The Customer Accounts components. + """ + components: CheckoutAndAccountsConfigurationBrandingCustomerAccountsComponentsInput +} + +""" +The color customizations. +""" +type CheckoutAndAccountsConfigurationBrandingDesignTokenColors @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + A set of colors used together on a surface. + """ + palette: CheckoutAndAccountsConfigurationBrandingPalette +} + +""" +The design token customizations allow 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 CheckoutAndAccountsConfigurationBrandingDesignTokens @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The colors for global colors. + """ + colors: CheckoutAndAccountsConfigurationBrandingDesignTokenColors + + """ + The corner radius variables. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadiusVariables + + """ + The typography. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypography +} + +""" +The input fields for customizing the colors. +""" +input CheckoutAndAccountsConfigurationBrandingDesignTokensColorsInput @componentName(name: "checkouts") { + """ + The input to update the color palette. + """ + palette: CheckoutAndAccountsConfigurationBrandingPaletteInput +} + +""" +The input fields for customizing the design tokens. +""" +input CheckoutAndAccountsConfigurationBrandingDesignTokensInput @componentName(name: "checkouts") { + """ + The color customizations for global colors. + """ + colors: CheckoutAndAccountsConfigurationBrandingDesignTokensColorsInput + + """ + The corner radius variables. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadiusVariablesInput + + """ + The typography. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypographyInput +} + +""" +The customizations for the page, content, main, and order summary dividers. +""" +type CheckoutAndAccountsConfigurationBrandingDividerStyle @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The border style for the divider. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The border width for the divider. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth +} + +""" +The input fields for customizing the global divider. +""" +input CheckoutAndAccountsConfigurationBrandingDividerStyleInput @componentName(name: "checkouts") { + """ + The border style for the divider. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The border width for the divider. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth +} + +""" +The Express Checkout customizations. +""" +type CheckoutAndAccountsConfigurationBrandingExpressCheckout @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutAndAccountsConfigurationBrandingExpressCheckoutButton +} + +""" +The Express Checkout button customizations. +""" +type CheckoutAndAccountsConfigurationBrandingExpressCheckoutButton @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius +} + +""" +The input fields for customizing the express checkout button. +""" +input CheckoutAndAccountsConfigurationBrandingExpressCheckoutButtonInput @componentName(name: "checkouts") { + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius +} + +""" +The input fields for customizing the Express Checkout. +""" +input CheckoutAndAccountsConfigurationBrandingExpressCheckoutInput @componentName(name: "checkouts") { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutAndAccountsConfigurationBrandingExpressCheckoutButtonInput +} + +""" +A group of fonts. +""" +union CheckoutAndAccountsConfigurationBrandingFontGroup @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") = CheckoutAndAccountsConfigurationBrandingCustomFontGroup | CheckoutAndAccountsConfigurationBrandingShopifyFontGroup + +""" +The input fields used to update a font group. +""" +input CheckoutAndAccountsConfigurationBrandingFontGroupInput @oneOf @componentName(name: "checkouts") { + """ + A custom font group. + """ + customFontGroup: CheckoutAndAccountsConfigurationBrandingCustomFontGroupInput + + """ + A Shopify font group. + """ + shopifyFontGroup: CheckoutAndAccountsConfigurationBrandingShopifyFontGroupInput +} + +""" +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 CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy @componentName(name: "checkouts") { + """ + 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 a short swap period. + """ + FALLBACK + + """ + Gives the font face an extremely small block period and no swap period. + """ + OPTIONAL + + """ + Gives the font face an extremely small block period and an infinite swap period. + """ + SWAP +} + +""" +The font size customizations. +""" +type CheckoutAndAccountsConfigurationBrandingFontSize @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + 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 for customizing the font size. +""" +input CheckoutAndAccountsConfigurationBrandingFontSizeInput @componentName(name: "checkouts") { + """ + 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 CheckoutAndAccountsConfigurationBrandingFooter @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The footer alignment. + """ + alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment + + """ + The background style of the footer container. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The footer content settings. + """ + content: CheckoutAndAccountsConfigurationBrandingFooterContent + + """ + The divided setting. + """ + divided: Boolean + + """ + The padding of the footer container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +Possible values for the footer alignment. +""" +enum CheckoutAndAccountsConfigurationBrandingFooterAlignment @componentName(name: "checkouts") { + """ + The checkout footer alignment Center value. + """ + CENTER + + """ + The checkout footer alignment End value. + """ + END + + """ + The checkout footer alignment Start value. + """ + START +} + +""" +The footer content customizations. +""" +type CheckoutAndAccountsConfigurationBrandingFooterContent @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The visibility for footer content. + """ + visibility: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +The input fields for customizing the footer content. +""" +input CheckoutAndAccountsConfigurationBrandingFooterContentInput @componentName(name: "checkouts") { + """ + The visibility customizations for footer content. + """ + visibility: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +The input fields for customizing the checkout footer. +""" +input CheckoutAndAccountsConfigurationBrandingFooterInput @componentName(name: "checkouts") { + """ + The footer alignment settings. You can set the footer native content alignment to the left, center, or right. + """ + alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment + + """ + The background style of the footer container. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The input field for setting the footer content customizations. + """ + content: CheckoutAndAccountsConfigurationBrandingFooterContentInput + + """ + The divided setting. + """ + divided: Boolean + + """ + The padding of the footer container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +Possible values for the footer position. +""" +enum CheckoutAndAccountsConfigurationBrandingFooterPosition @componentName(name: "checkouts") { + """ + The End footer position. + """ + END + + """ + The Inline footer position. + """ + INLINE +} + +""" +The header customizations. +""" +type CheckoutAndAccountsConfigurationBrandingHeader @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The header alignment. + """ + alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment + + """ + The background style of the header container. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The divided setting. + """ + divided: Boolean + + """ + The store logo. + """ + logo: CheckoutAndAccountsConfigurationBrandingLogo + + """ + The padding of the header container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The possible header alignments. +""" +enum CheckoutAndAccountsConfigurationBrandingHeaderAlignment @componentName(name: "checkouts") { + """ + Center alignment. + """ + CENTER + + """ + End alignment. + """ + END + + """ + Start alignment. + """ + START +} + +""" +The header cart link customizations. +""" +type CheckoutAndAccountsConfigurationBrandingHeaderCartLink @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + 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: CheckoutAndAccountsConfigurationBrandingCartLinkContentType + + """ + 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: CheckoutAndAccountsConfigurationBrandingImageValue +} + +""" +The input fields for customizing the cart link for 1-page checkout. This field +allows to customize the cart icon that renders by default on 1-page checkout. +""" +input CheckoutAndAccountsConfigurationBrandingHeaderCartLinkInput @componentName(name: "checkouts") { + """ + 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: CheckoutAndAccountsConfigurationBrandingCartLinkContentType + + """ + 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: CheckoutAndAccountsConfigurationBrandingImageInput +} + +""" +The input fields for customizing the header. +""" +input CheckoutAndAccountsConfigurationBrandingHeaderInput @componentName(name: "checkouts") { + """ + The header alignment. + """ + alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment + + """ + The background style of the header container. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The colors customizations for the header container. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The divided setting. + """ + divided: Boolean + + """ + The store logo. + """ + logo: CheckoutAndAccountsConfigurationBrandingLogoInput + + """ + The padding of the header container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The possible header positions. +""" +enum CheckoutAndAccountsConfigurationBrandingHeaderPosition @componentName(name: "checkouts") { + """ + Inline position. + """ + INLINE + + """ + Secondary inline position. + """ + INLINE_SECONDARY + + """ + Start position. + """ + START +} + +""" +The heading level customizations. +""" +type CheckoutAndAccountsConfigurationBrandingHeadingLevel @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The typography. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypographyStyle +} + +""" +The input fields for customizing the heading level. +""" +input CheckoutAndAccountsConfigurationBrandingHeadingLevelInput @componentName(name: "checkouts") { + """ + The typography. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypographyStyleInput +} + +""" +The image. +""" +type CheckoutAndAccountsConfigurationBrandingImage @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The image details. + """ + image: Image +} + +""" +The input fields for customizing the image. +""" +input CheckoutAndAccountsConfigurationBrandingImageInput @oneOf @componentName(name: "checkouts") { + """ + A globally-unique ID. + """ + mediaImageId: ID @gidTypes(types: ["MediaImage"]) +} + +""" +The image value. +""" +union CheckoutAndAccountsConfigurationBrandingImageValue @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") = CheckoutAndAccountsConfigurationBrandingImage + +""" +The input fields for customizing Checkout and Customer Accounts branding. +""" +input CheckoutAndAccountsConfigurationBrandingInput @componentName(name: "checkouts") { + """ + The customizations that apply to specific components or areas of the user interface. + """ + components: CheckoutAndAccountsConfigurationBrandingComponentsInput + + """ + The design tokens 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. + """ + designTokens: CheckoutAndAccountsConfigurationBrandingDesignTokensInput + + """ + The surface-level customizations. + """ + surfaces: CheckoutAndAccountsConfigurationBrandingSurfacesInput +} + +""" +The label position options. +""" +enum CheckoutAndAccountsConfigurationBrandingLabelPosition @componentName(name: "checkouts") { + """ + The Inside label position. + """ + INSIDE + + """ + The Outside label position. + """ + OUTSIDE +} + +""" +The store logo customizations. +""" +type CheckoutAndAccountsConfigurationBrandingLogo @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The logo image. + """ + image: CheckoutAndAccountsConfigurationBrandingImageValue + + """ + The maximum width of the logo. + """ + maxWidth: Int + + """ + The visibility of the logo. + """ + visibility: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +The input fields for customizing the logo. +""" +input CheckoutAndAccountsConfigurationBrandingLogoInput @componentName(name: "checkouts") { + """ + The logo image. + """ + image: CheckoutAndAccountsConfigurationBrandingImageInput + + """ + The maximum width of the logo. + """ + maxWidth: Int + + """ + The visibility of the logo. + """ + visibility: CheckoutAndAccountsConfigurationBrandingVisibility +} + +""" +The main container customizations. +""" +type CheckoutAndAccountsConfigurationBrandingMain @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The main container's divider style and visibility. + """ + divider: CheckoutAndAccountsConfigurationBrandingContainerDivider + + """ + The main sections. + """ + section: CheckoutAndAccountsConfigurationBrandingMainSection +} + +""" +The input fields for customizing the main container. +""" +input CheckoutAndAccountsConfigurationBrandingMainInput @componentName(name: "checkouts") { + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + Divider style and visibility on the main container. + """ + divider: CheckoutAndAccountsConfigurationBrandingContainerDividerInput + + """ + The customizations for the main sections. + """ + section: CheckoutAndAccountsConfigurationBrandingMainSectionInput +} + +""" +The main sections customizations. +""" +type CheckoutAndAccountsConfigurationBrandingMainSection @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The background style of the main sections. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The border for the main sections. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The border style of the main sections. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The border width of the main sections. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The corner radius of the main sections. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The padding of the main sections. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The shadow of the main sections. + """ + shadow: CheckoutAndAccountsConfigurationBrandingShadow +} + +""" +The input fields for customizing the main sections. +""" +input CheckoutAndAccountsConfigurationBrandingMainSectionInput @componentName(name: "checkouts") { + """ + The background style of the main sections. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The border for the main sections. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The border style of the main sections. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The border width of the main sections. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The corner radius of the main sections. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The padding of the main sections. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The shadow of the main sections. + """ + shadow: CheckoutAndAccountsConfigurationBrandingShadow +} + +""" +The merchandise thumbnails customizations. +""" +type CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnail @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The merchandise thumbnail badge. + """ + badge: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadge + + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The property used to customize how the product image fits within merchandise thumbnails. + """ + fit: CheckoutAndAccountsConfigurationBrandingObjectFit +} + +""" +The merchandise thumbnail badges customizations. +""" +type CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadge @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The background. + """ + background: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeBackground +} + +""" +The merchandise thumbnail badge background. +""" +enum CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeBackground @componentName(name: "checkouts") { + """ + The Accent background. + """ + ACCENT + + """ + The Base background. + """ + BASE +} + +""" +The input fields for customizing the merchandise thumbnail badges. +""" +input CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeInput @componentName(name: "checkouts") { + """ + The background. + """ + background: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeBackground +} + +""" +The input fields for customizing the merchandise thumbnails. +""" +input CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailInput @componentName(name: "checkouts") { + """ + The aspect ratio. + """ + aspectRatio: Float + + """ + The merchandise thumbnail badge. + """ + badge: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeInput + + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The corner radius. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The property used to customize how the product image fits within merchandise thumbnails. + """ + fit: CheckoutAndAccountsConfigurationBrandingObjectFit +} + +""" +Possible values for object fit. +""" +enum CheckoutAndAccountsConfigurationBrandingObjectFit @componentName(name: "checkouts") { + """ + 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 CheckoutAndAccountsConfigurationBrandingOrderSummary @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The background image of the order summary container. + """ + backgroundImage: CheckoutAndAccountsConfigurationBrandingImageValue + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The order summary container's divider style and visibility. + """ + divider: CheckoutAndAccountsConfigurationBrandingContainerDivider + + """ + The order summary sections. + """ + section: CheckoutAndAccountsConfigurationBrandingOrderSummarySection +} + +""" +The input fields for customizing the order summary container. +""" +input CheckoutAndAccountsConfigurationBrandingOrderSummaryInput @componentName(name: "checkouts") { + """ + The background image of the order summary container (must not be of SVG format). + """ + backgroundImage: CheckoutAndAccountsConfigurationBrandingImageInput + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + Divider style and visibility on the order summary container. + """ + divider: CheckoutAndAccountsConfigurationBrandingContainerDividerInput + + """ + The customizations for the order summary sections. + """ + section: CheckoutAndAccountsConfigurationBrandingOrderSummarySectionInput +} + +""" +The order summary sections customizations. +""" +type CheckoutAndAccountsConfigurationBrandingOrderSummarySection @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The background style of the order summary sections. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The border for the order summary sections. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The border style of the order summary sections. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The border width of the order summary sections. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The corner radius of the order summary sections. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The padding of the order summary sections. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The shadow of the order summary sections. + """ + shadow: CheckoutAndAccountsConfigurationBrandingShadow +} + +""" +The input fields for customizing the order summary sections. +""" +input CheckoutAndAccountsConfigurationBrandingOrderSummarySectionInput @componentName(name: "checkouts") { + """ + The background style of the order summary sections. + """ + background: CheckoutAndAccountsConfigurationBrandingBackground + + """ + The border for the order summary sections. + """ + border: CheckoutAndAccountsConfigurationBrandingSimpleBorder + + """ + The border style of the order summary sections. + """ + borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle + + """ + The border width of the order summary sections. + """ + borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The corner radius of the order summary sections. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius + + """ + The padding of the order summary sections. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword + + """ + The shadow of the order summary sections. + """ + shadow: CheckoutAndAccountsConfigurationBrandingShadow +} + +""" +A set of colors used together on a surface. +""" +type CheckoutAndAccountsConfigurationBrandingPalette @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + A color in the palette (hex value). + """ + color1: String + + """ + A color in the palette (hex value). + """ + color10: String + + """ + A color in the palette (hex value). + """ + color11: String + + """ + A color in the palette (hex value). + """ + color12: String + + """ + A color in the palette (hex value). + """ + color13: String + + """ + A color in the palette (hex value). + """ + color14: String + + """ + A color in the palette (hex value). + """ + color15: String + + """ + A color in the palette (hex value). + """ + color16: String + + """ + A color in the palette (hex value). + """ + color17: String + + """ + A color in the palette (hex value). + """ + color18: String + + """ + A color in the palette (hex value). + """ + color19: String + + """ + A color in the palette (hex value). + """ + color2: String + + """ + A color in the palette (hex value). + """ + color20: String + + """ + A color in the palette (hex value). + """ + color3: String + + """ + A color in the palette (hex value). + """ + color4: String + + """ + A color in the palette (hex value). + """ + color5: String + + """ + A color in the palette (hex value). + """ + color6: String + + """ + A color in the palette (hex value). + """ + color7: String + + """ + A color in the palette (hex value). + """ + color8: String + + """ + A color in the palette (hex value). + """ + color9: String +} + +""" +The input fields to update the color palette. +""" +input CheckoutAndAccountsConfigurationBrandingPaletteInput @componentName(name: "checkouts") { + """ + A color in the palette (hex value). + """ + color1: String + + """ + A color in the palette (hex value). + """ + color10: String + + """ + A color in the palette (hex value). + """ + color11: String + + """ + A color in the palette (hex value). + """ + color12: String + + """ + A color in the palette (hex value). + """ + color13: String + + """ + A color in the palette (hex value). + """ + color14: String + + """ + A color in the palette (hex value). + """ + color15: String + + """ + A color in the palette (hex value). + """ + color16: String + + """ + A color in the palette (hex value). + """ + color17: String + + """ + A color in the palette (hex value). + """ + color18: String + + """ + A color in the palette (hex value). + """ + color19: String + + """ + A color in the palette (hex value). + """ + color2: String + + """ + A color in the palette (hex value). + """ + color20: String + + """ + A color in the palette (hex value). + """ + color3: String + + """ + A color in the palette (hex value). + """ + color4: String + + """ + A color in the palette (hex value). + """ + color5: String + + """ + A color in the palette (hex value). + """ + color6: String + + """ + A color in the palette (hex value). + """ + color7: String + + """ + A color in the palette (hex value). + """ + color8: String + + """ + A color in the palette (hex value). + """ + color9: String +} + +""" +The primary button color customizations. +""" +type CheckoutAndAccountsConfigurationBrandingPrimaryButtonColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + 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: CheckoutAndAccountsConfigurationBrandingColorRoles + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The input fields for customizing colors for primary buttons. +""" +input CheckoutAndAccountsConfigurationBrandingPrimaryButtonColorRolesInput @componentName(name: "checkouts") { + """ + 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: CheckoutAndAccountsConfigurationBrandingColorRolesInput + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The secondary button color customizations. +""" +type CheckoutAndAccountsConfigurationBrandingSecondaryButtonColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + 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: CheckoutAndAccountsConfigurationBrandingColorRoles + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The input fields for customizing colors for secondary buttons. +""" +input CheckoutAndAccountsConfigurationBrandingSecondaryButtonColorRolesInput @componentName(name: "checkouts") { + """ + 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: CheckoutAndAccountsConfigurationBrandingColorRolesInput + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The selects customizations. +""" +type CheckoutAndAccountsConfigurationBrandingSelect @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingBorder + + """ + The typography. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypographyStyle +} + +""" +The input fields for customizing the selects. +""" +input CheckoutAndAccountsConfigurationBrandingSelectInput @componentName(name: "checkouts") { + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingBorder + + """ + The typography. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypographyStyleInput +} + +""" +The container shadow. +""" +enum CheckoutAndAccountsConfigurationBrandingShadow @componentName(name: "checkouts") { + """ + The Base shadow. + """ + BASE + + """ + The Large 100 shadow. + """ + LARGE_100 + + """ + The Large 200 shadow. + """ + LARGE_200 + + """ + The Small 100 shadow. + """ + SMALL_100 + + """ + The Small 200 shadow. + """ + SMALL_200 +} + +""" +The shared customizations. +""" +type CheckoutAndAccountsConfigurationBrandingShared @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The shared color customizations for semantic and functional colors. + """ + colors: CheckoutAndAccountsConfigurationBrandingSharedColors + + """ + The shared corner radius setting that overrides all other [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutAndAccountsConfigurationBrandingCornerRadius) + customizations. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingSharedCornerRadius + + """ + The shared typography customizations. + """ + typography: CheckoutAndAccountsConfigurationBrandingSharedTypographyStyle +} + +""" +Shared color customizations for semantic and functional colors. +""" +type CheckoutAndAccountsConfigurationBrandingSharedColors @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The accent color for interactive elements. + """ + accent: String + + """ + The button color. + """ + button: String + + """ + The form control color. + """ + control: String + + """ + The critical/error color. + """ + critical: String + + """ + The decorative color. + """ + decorative: String + + """ + The informational color. + """ + info: String + + """ + The success color. + """ + success: String + + """ + The warning color. + """ + warning: String +} + +""" +The input fields for customizing shared colors. +""" +input CheckoutAndAccountsConfigurationBrandingSharedColorsInput @componentName(name: "checkouts") { + """ + The accent color for interactive elements. + """ + accent: String + + """ + The button color. + """ + button: String + + """ + The form control color. + """ + control: String + + """ + The critical/error color. + """ + critical: String + + """ + The decorative color. + """ + decorative: String + + """ + The informational color. + """ + info: String + + """ + The success color. + """ + success: String + + """ + The warning color. + """ + warning: String +} + +""" +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). +""" +enum CheckoutAndAccountsConfigurationBrandingSharedCornerRadius @componentName(name: "checkouts") { + """ + Set the shared corner radius override to 0px (square corners). + """ + NONE +} + +""" +The input fields for customizing the shared settings. +""" +input CheckoutAndAccountsConfigurationBrandingSharedInput @componentName(name: "checkouts") { + """ + The shared color customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingSharedColorsInput + + """ + Select a shared corner radius setting that overrides all other corner radii customizations. + """ + cornerRadius: CheckoutAndAccountsConfigurationBrandingSharedCornerRadius + + """ + The shared typography customizations. + """ + typography: CheckoutAndAccountsConfigurationBrandingSharedTypographyStyleInput +} + +""" +The shared typography customizations. +""" +type CheckoutAndAccountsConfigurationBrandingSharedTypographyStyle @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The kerning. + """ + kerning: CheckoutAndAccountsConfigurationBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutAndAccountsConfigurationBrandingTypographyLetterCase +} + +""" +The input fields for customizing the shared typography. +""" +input CheckoutAndAccountsConfigurationBrandingSharedTypographyStyleInput @componentName(name: "checkouts") { + """ + The kerning. + """ + kerning: CheckoutAndAccountsConfigurationBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutAndAccountsConfigurationBrandingTypographyLetterCase +} + +""" +The Shopify font customizations. +""" +type CheckoutAndAccountsConfigurationBrandingShopifyFont @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +The Shopify font group customizations. +""" +type CheckoutAndAccountsConfigurationBrandingShopifyFontGroup @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The base Shopify font. + """ + base: CheckoutAndAccountsConfigurationBrandingShopifyFont + + """ + The bold Shopify font. + """ + bold: CheckoutAndAccountsConfigurationBrandingShopifyFont + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy + + """ + The font group name. + """ + name: String +} + +""" +The input fields for customizing a Shopify font group. +""" +input CheckoutAndAccountsConfigurationBrandingShopifyFontGroupInput @componentName(name: "checkouts") { + """ + The Shopify base font handle. + """ + baseFontHandle: String! + + """ + The Shopify bold font handle. + """ + boldFontHandle: String! + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy +} + +""" +The sign-in-specific component customizations. +""" +type CheckoutAndAccountsConfigurationBrandingSignInComponents @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The header customizations. + """ + header: CheckoutAndAccountsConfigurationBrandingSignInHeader + + """ + The main customizations. + """ + main: CheckoutAndAccountsConfigurationBrandingSignInMain +} + +""" +The input fields for customizing the sign-in components. +""" +input CheckoutAndAccountsConfigurationBrandingSignInComponentsInput @componentName(name: "checkouts") { + """ + The header customizations. + """ + header: CheckoutAndAccountsConfigurationBrandingSignInHeaderInput + + """ + The main customizations. + """ + main: CheckoutAndAccountsConfigurationBrandingSignInMainInput +} + +""" +The sign-in header customizations. +""" +type CheckoutAndAccountsConfigurationBrandingSignInHeader @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The store logo. + """ + logo: CheckoutAndAccountsConfigurationBrandingSignInLogo + + """ + The padding of the header container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The input fields for customizing the sign-in header. +""" +input CheckoutAndAccountsConfigurationBrandingSignInHeaderInput @componentName(name: "checkouts") { + """ + The store logo. + """ + logo: CheckoutAndAccountsConfigurationBrandingSignInLogoInput + + """ + The padding of the header container. + """ + padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword +} + +""" +The sign-in store logo customizations. +""" +type CheckoutAndAccountsConfigurationBrandingSignInLogo @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The logo image. + """ + image: CheckoutAndAccountsConfigurationBrandingImageValue + + """ + The maximum width of the logo. + """ + maxWidth: Int +} + +""" +The input fields for customizing the sign-in logo. +""" +input CheckoutAndAccountsConfigurationBrandingSignInLogoInput @componentName(name: "checkouts") { + """ + The logo image. + """ + image: CheckoutAndAccountsConfigurationBrandingImageInput + + """ + The maximum width of the logo. + """ + maxWidth: Int +} + +""" +The sign-in-specific main customizations. +""" +type CheckoutAndAccountsConfigurationBrandingSignInMain @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The background image of the main container. + """ + backgroundImage: CheckoutAndAccountsConfigurationBrandingImageValue + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColors + + """ + The main sections. + """ + section: CheckoutAndAccountsConfigurationBrandingMainSection +} + +""" +The input fields for customizing the sign-in main container. +""" +input CheckoutAndAccountsConfigurationBrandingSignInMainInput @componentName(name: "checkouts") { + """ + The background image of the main container. + """ + backgroundImage: CheckoutAndAccountsConfigurationBrandingImageInput + + """ + The colors customizations. + """ + colors: CheckoutAndAccountsConfigurationBrandingColorsInput + + """ + The customizations for the main sections. + """ + section: CheckoutAndAccountsConfigurationBrandingMainSectionInput +} + +""" +The sign-in-specific component customizations. +""" +type CheckoutAndAccountsConfigurationBrandingSignInSurface @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The sign-in components. + """ + components: CheckoutAndAccountsConfigurationBrandingSignInComponents +} + +""" +The input fields for customizing the sign-in surface. +""" +input CheckoutAndAccountsConfigurationBrandingSignInSurfaceInput @componentName(name: "checkouts") { + """ + The sign-in components. + """ + components: CheckoutAndAccountsConfigurationBrandingSignInComponentsInput +} + +""" +Possible values for the simple border. +""" +enum CheckoutAndAccountsConfigurationBrandingSimpleBorder @componentName(name: "checkouts") { + """ + The Full simple border. + """ + FULL + + """ + The None simple border. + """ + NONE +} + +""" +Possible values for the spacing. +""" +enum CheckoutAndAccountsConfigurationBrandingSpacing @componentName(name: "checkouts") { + """ + The Base spacing. + """ + BASE + + """ + The Extra Loose spacing. + """ + EXTRA_LOOSE + + """ + The Extra Tight spacing. + """ + EXTRA_TIGHT + + """ + The Loose spacing. + """ + LOOSE + + """ + The None spacing. + """ + NONE + + """ + The Tight spacing. + """ + TIGHT +} + +""" +The spacing between UI elements. +""" +enum CheckoutAndAccountsConfigurationBrandingSpacingKeyword @componentName(name: "checkouts") { + """ + The Base spacing. + """ + BASE + + """ + 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 None spacing. + """ + NONE + + """ + 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 surface-specific component customizations for checkout and customer accounts. +""" +type CheckoutAndAccountsConfigurationBrandingSurfaces @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The checkout-specific component overrides. + """ + checkout: CheckoutAndAccountsConfigurationBrandingCheckoutSurface + + """ + The customer accounts-specific component overrides. + """ + customerAccounts: CheckoutAndAccountsConfigurationBrandingCustomerAccountsSurface + + """ + The sign-in-specific component overrides. + """ + signIn: CheckoutAndAccountsConfigurationBrandingSignInSurface +} + +""" +The input fields for customizing surfaces branding. +""" +input CheckoutAndAccountsConfigurationBrandingSurfacesInput @componentName(name: "checkouts") { + """ + The checkout surface customizations. + """ + checkout: CheckoutAndAccountsConfigurationBrandingCheckoutSurfaceInput + + """ + The customer accounts surface customizations. + """ + customerAccounts: CheckoutAndAccountsConfigurationBrandingCustomerAccountsSurfaceInput + + """ + The sign-in surface customizations. + """ + signIn: CheckoutAndAccountsConfigurationBrandingSignInSurfaceInput +} + +""" +The text fields customizations. +""" +type CheckoutAndAccountsConfigurationBrandingTextField @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingBorder + + """ + The typography. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypographyStyle +} + +""" +The input fields for customizing the text fields. +""" +input CheckoutAndAccountsConfigurationBrandingTextFieldInput @componentName(name: "checkouts") { + """ + The border. + """ + border: CheckoutAndAccountsConfigurationBrandingBorder + + """ + The typography. + """ + typography: CheckoutAndAccountsConfigurationBrandingTypographyStyleInput +} + +""" +The typography customizations. +""" +type CheckoutAndAccountsConfigurationBrandingTypography @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The font group used for most components such as text, buttons and form controls. + """ + primary: CheckoutAndAccountsConfigurationBrandingFontGroup + + """ + The font group used for heading components by default. + """ + secondary: CheckoutAndAccountsConfigurationBrandingFontGroup + + """ + The font size (base size in pixels and scaling between different sizes). + """ + size: CheckoutAndAccountsConfigurationBrandingFontSize +} + +""" +The font selection. +""" +enum CheckoutAndAccountsConfigurationBrandingTypographyFont @componentName(name: "checkouts") { + """ + The primary font. + """ + PRIMARY + + """ + The secondary font. + """ + SECONDARY +} + +""" +The input fields for customizing the typography. +""" +input CheckoutAndAccountsConfigurationBrandingTypographyInput @componentName(name: "checkouts") { + """ + The font group used for most components such as text, buttons and form controls. + """ + primary: CheckoutAndAccountsConfigurationBrandingFontGroupInput + + """ + The font group used for heading components by default. + """ + secondary: CheckoutAndAccountsConfigurationBrandingFontGroupInput + + """ + The font size. + """ + size: CheckoutAndAccountsConfigurationBrandingFontSizeInput +} + +""" +Possible values for the typography kerning. +""" +enum CheckoutAndAccountsConfigurationBrandingTypographyKerning @componentName(name: "checkouts") { + """ + Base or default kerning. + """ + BASE + + """ + Extra loose kerning, leaving even more space in between characters. + """ + EXTRA_LOOSE + + """ + Loose kerning, leaving more space than the default in between characters. + """ + LOOSE +} + +""" +Possible values for the typography letter case. +""" +enum CheckoutAndAccountsConfigurationBrandingTypographyLetterCase @componentName(name: "checkouts") { + """ + 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. +""" +enum CheckoutAndAccountsConfigurationBrandingTypographySize @componentName(name: "checkouts") { + """ + The Base font size. Example: 14px. + """ + BASE + + """ + The Extra extra large font size. Example: 24px. + """ + EXTRA_EXTRA_LARGE + + """ + The Extra large font size. Example: 21px. + """ + EXTRA_LARGE + + """ + The Extra small font size. Example: 10px. + """ + EXTRA_SMALL + + """ + The Large font size. Example: 19px. + """ + LARGE + + """ + The Medium font size. Example: 16px. + """ + MEDIUM + + """ + The Small font size. Example: 12px. + """ + SMALL +} + +""" +The typography customizations. +""" +type CheckoutAndAccountsConfigurationBrandingTypographyStyle @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The font. + """ + font: CheckoutAndAccountsConfigurationBrandingTypographyFont + + """ + The kerning. + """ + kerning: CheckoutAndAccountsConfigurationBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutAndAccountsConfigurationBrandingTypographyLetterCase + + """ + The font size. + """ + size: CheckoutAndAccountsConfigurationBrandingTypographySize + + """ + The font weight. + """ + weight: CheckoutAndAccountsConfigurationBrandingTypographyWeight +} + +""" +The input fields for customizing the typography. +""" +input CheckoutAndAccountsConfigurationBrandingTypographyStyleInput @componentName(name: "checkouts") { + """ + The font. + """ + font: CheckoutAndAccountsConfigurationBrandingTypographyFont + + """ + The kerning. + """ + kerning: CheckoutAndAccountsConfigurationBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutAndAccountsConfigurationBrandingTypographyLetterCase + + """ + The font size. + """ + size: CheckoutAndAccountsConfigurationBrandingTypographySize + + """ + The font weight. + """ + weight: CheckoutAndAccountsConfigurationBrandingTypographyWeight +} + +""" +Possible values for the font weight. +""" +enum CheckoutAndAccountsConfigurationBrandingTypographyWeight @componentName(name: "checkouts") { + """ + The base weight. + """ + BASE + + """ + The bold weight. + """ + BOLD +} + +""" +Possible visibility states. +""" +enum CheckoutAndAccountsConfigurationBrandingVisibility @componentName(name: "checkouts") { + """ + The Hidden visibility setting. + """ + HIDDEN + + """ + The Visible visibility setting. + """ + VISIBLE +} + +""" +An auto-generated type for paginating through multiple CheckoutAndAccountsConfigurations. +""" +type CheckoutAndAccountsConfigurationConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [CheckoutAndAccountsConfigurationEdge!]! + + """ + A list of nodes that are contained in CheckoutAndAccountsConfigurationEdge. + 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: [CheckoutAndAccountsConfiguration!]! + + """ + 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 CheckoutAndAccountsConfiguration and a cursor during pagination. +""" +type CheckoutAndAccountsConfigurationEdge @componentName(name: "checkouts") { + """ + 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 CheckoutAndAccountsConfigurationEdge. + """ + node: CheckoutAndAccountsConfiguration! +} + +""" +The input fields for checkout and account configurations. +""" +input CheckoutAndAccountsConfigurationInput @componentName(name: "checkouts") { + """ + The branding settings of the configuration. + """ + branding: CheckoutAndAccountsConfigurationBrandingInput + + """ + The overrides to create/update in the configuration. + """ + overrides: [CheckoutAndAccountsConfigurationOverrideInput!] +} + +""" +Represents a checkout and accounts configuration interface. +""" +interface CheckoutAndAccountsConfigurationInterface @componentName(name: "checkouts") { + """ + The branding configuration. + """ + branding: CheckoutAndAccountsConfigurationBranding + + """ + The date and time when the configuration was created. + """ + createdAt: DateTime! + + """ + The date and time when the configuration was last edited. + """ + editedAt: DateTime! + + """ + The configuration name. + """ + name: String! + + """ + The date and time when the configuration was last updated. + """ + updatedAt: DateTime! +} + +""" +A checkout and account configuration override modifies a parent configuration for specific markets. +""" +type CheckoutAndAccountsConfigurationOverride implements CheckoutAndAccountsConfigurationInterface & Node @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The branding configuration. + """ + branding: CheckoutAndAccountsConfigurationBranding + + """ + The date and time when the configuration was created. + """ + createdAt: DateTime! + + """ + The date and time when the configuration was last edited. + """ + editedAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The configuration name. + """ + name: String! + + """ + The date and time when the configuration was last updated. + """ + updatedAt: DateTime! +} + +""" +The input fields for checkout and account configuration overrides. +""" +input CheckoutAndAccountsConfigurationOverrideInput @componentName(name: "checkouts") { + """ + The branding settings of the configuration. + """ + branding: CheckoutAndAccountsConfigurationBrandingInput + + """ + The ID of the configuration override to update. + """ + id: ID @gidTypes(types: ["ConfigurationOverride"]) +} + +""" +Return type for `checkoutAndAccountsConfigurationUpdate` mutation. +""" +type CheckoutAndAccountsConfigurationUpdatePayload @componentName(name: "platform") { + """ + The updated configuration. + """ + configuration: CheckoutAndAccountsConfiguration + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CheckoutAndAccountsConfigurationUserError!]! +} + +""" +An error that occurs during the execution of a mutation for managing checkout and accounts configurations. +""" +type CheckoutAndAccountsConfigurationUserError implements DisplayableError @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { + """ + The error code. + """ + code: CheckoutAndAccountsConfigurationUserErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! + + """ + The reason for the error. + """ + reason: String! +} + +""" +Possible error codes that can be returned by `CheckoutAndAccountsConfigurationUserError`. +""" +enum CheckoutAndAccountsConfigurationUserErrorCode @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + Internal error. Looks like something went wrong on our end. + """ + INTERNAL_SERVER_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + One or more required fields are missing in the input. + """ + MISSING + + """ + One or more requested items couldn't be found. + """ + NOT_FOUND + + """ + The request could not be completed — please try again later. + """ + TRANSIENT +} + +""" +The set of valid sort keys for the CheckoutAndAccountsConfigurationsGraphQL query. +""" +enum CheckoutAndAccountsConfigurationsGraphQLSortKeys @componentName(name: "platform") { + """ + 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 +} + +""" +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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The Base background style. + """ + BASE + + """ + The Subdued background style. + """ + SUBDUED + + """ + The Transparent background style. + """ + TRANSPARENT +} + +""" +Possible values for the background style. +""" +enum CheckoutBrandingBackgroundStyle @componentName(name: "checkouts") { + """ + The None background style. + """ + NONE + + """ + The Solid background style. + """ + SOLID +} + +""" +Possible values for the border. +""" +enum CheckoutBrandingBorder @componentName(name: "checkouts") { + """ + The Block End border. + """ + BLOCK_END + + """ + The Full border. + """ + FULL + + """ + The None border. + """ + NONE +} + +""" +The container border style. +""" +enum CheckoutBrandingBorderStyle @componentName(name: "checkouts") { + """ + The Base border style. + """ + BASE + + """ + The Dashed border style. + """ + DASHED + + """ + The Dotted border style. + """ + DOTTED +} + +""" +The container border width. +""" +enum CheckoutBrandingBorderWidth @componentName(name: "checkouts") { + """ + The Base border width. + """ + BASE + + """ + The Large border width. + """ + LARGE + + """ + The Large 100 border width. + """ + LARGE_100 + + """ + The Large 200 border width. + """ + LARGE_200 +} + +""" +The buttons customizations. +""" +type CheckoutBrandingButton @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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: CheckoutBrandingColorRolesInput + + """ + The color of icons. + """ + icon: String + + """ + The color of text. + """ + text: String +} + +""" +The input fields used to update the buttons customizations. +""" +input CheckoutBrandingButtonInput @componentName(name: "checkouts") { + """ + 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 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + Whether the cart link is visible at checkout. + """ + visibility: CheckoutBrandingVisibility +} + +""" +Possible values for the cart link content type for the header. +""" +enum CheckoutBrandingCartLinkContentType @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The corner radius used for checkboxes. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields used to update the checkboxes customizations. +""" +input CheckoutBrandingCheckboxInput @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The spacing between UI elements in the list. + """ + spacing: CheckoutBrandingSpacingKeyword +} + +""" +The input fields to use to update the choice list customizations. +""" +input CheckoutBrandingChoiceListInput @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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, such as **Pay now**, and secondary buttons, such as **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 +} + +""" +A set of colors to apply to different parts of the UI. +""" +type CheckoutBrandingColorGroup @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + A color used for visual accents such as spinners. + """ + accent: String + + """ + A color used for backgrounds. + """ + background: String + + """ + A color used for components that sit on backgrounds like text and form controls. + """ + foreground: String +} + +""" +The input fields used to update a color group. +""" +input CheckoutBrandingColorGroupInput @componentName(name: "checkouts") { + """ + A color used for visual accents such as spinners. + """ + accent: String + + """ + A color used for backgrounds. + """ + background: String + + """ + A color used for components that sit on backgrounds like text and form controls. + """ + foreground: String +} + +""" +The color palette. +""" +type CheckoutBrandingColorPalette @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + A color group used for loading screens. + """ + canvas: CheckoutBrandingColorGroup + + """ + A color group used for the main content area. + """ + color1: CheckoutBrandingColorGroup + + """ + A color group used for secondary content such as the order summary. + """ + color2: CheckoutBrandingColorGroup + + """ + A color group used for critical information such as errors. + """ + critical: CheckoutBrandingColorGroup + + """ + A color group used for interactive components such as links. + """ + interactive: CheckoutBrandingColorGroup + + """ + A color group used for primary action buttons. + """ + primary: CheckoutBrandingColorGroup +} + +""" +The input fields used to update the color palette. +""" +input CheckoutBrandingColorPaletteInput @componentName(name: "checkouts") { + """ + A color group used for loading screens. + """ + canvas: CheckoutBrandingColorGroupInput + + """ + A color group used for the main content area. + """ + color1: CheckoutBrandingColorGroupInput + + """ + A color group used for secondary content such as the order summary. + """ + color2: CheckoutBrandingColorGroupInput + + """ + A color group for critical information such as errors. + """ + critical: CheckoutBrandingColorGroupInput + + """ + A color group used for interactive components such as links. + """ + interactive: CheckoutBrandingColorGroupInput + + """ + A color group used for primary action buttons. + """ + primary: CheckoutBrandingColorGroupInput +} + +""" +A group of colors used together on a surface. +""" +type CheckoutBrandingColorRoles @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 +} + +""" +A base set of color customizations that's applied to an area of Checkout, from which every component +pulls its colors. +""" +type CheckoutBrandingColorScheme @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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_SCHEME5 color scheme selection. + """ + COLOR_SCHEME5 + + """ + The COLOR_SCHEME6 color scheme selection. + """ + COLOR_SCHEME6 + + """ + The TRANSPARENT color scheme selection. + """ + TRANSPARENT +} + +""" +The color schemes. +""" +type CheckoutBrandingColorSchemes @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme5: CheckoutBrandingColorScheme + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme6: CheckoutBrandingColorScheme +} + +""" +The input fields for the color schemes. +""" +input CheckoutBrandingColorSchemesInput @componentName(name: "checkouts") { + """ + 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 + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme5: CheckoutBrandingColorSchemeInput + + """ + An extra scheme available to customize more surfaces, components or specific states of the user interface. + """ + scheme6: CheckoutBrandingColorSchemeInput +} + +""" +The possible colors. +""" +enum CheckoutBrandingColorSelection @componentName(name: "checkouts") { + """ + Color1 color selection. + """ + COLOR1 @deprecated(reason: "Modify the control colors for the scheme applied to the desired section instead. For example, to change the control background color when `main` is set to `scheme1`, set `design_system.colors.schemes.scheme1.control.background`.\n") + + """ + Color2 color selection. + """ + COLOR2 @deprecated(reason: "Modify the control colors for the scheme applied to the desired section instead. For example, to change the control background color when `main` is set to `scheme1`, set `design_system.colors.schemes.scheme1.control.background`.\n") + + """ + Transparent color selection. + """ + TRANSPARENT +} + +""" +The color settings for global colors and color schemes. +""" +type CheckoutBrandingColors @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The divider style. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The divider width. + """ + borderWidth: CheckoutBrandingBorderWidth + + """ + The divider visibility. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The content container customizations. +""" +type CheckoutBrandingContent @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The content container's divider style and visibility. + """ + divider: CheckoutBrandingContainerDivider +} + +""" +The input fields used to update the content container customizations. +""" +input CheckoutBrandingContentInput @componentName(name: "checkouts") { + """ + Divider style and visibility on the content container. + """ + divider: CheckoutBrandingContainerDividerInput +} + +""" +The form controls customizations. +""" +type CheckoutBrandingControl @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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: CheckoutBrandingColorRolesInput + + """ + The color of text. + """ + text: String +} + +""" +The input fields used to update the form controls customizations. +""" +input CheckoutBrandingControlInput @componentName(name: "checkouts") { + """ + 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 +} + +""" +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 @componentName(name: "checkouts") { + """ + 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 + + """ + The 0px corner radius (square corners). + """ + NONE + + """ + The corner radius with a pixel value defined by designSystem.cornerRadius.small. + """ + SMALL +} + +""" +Define the pixel size of corner radius options. +""" +type CheckoutBrandingCornerRadiusVariables @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 + + """ + The value in pixels for small corner radii. It should be greater than zero. Example: 3. + """ + small: Int +} + +""" +A custom font. +""" +type CheckoutBrandingCustomFont implements CheckoutBrandingFont @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + A globally-unique ID for a font file uploaded via the Files api. + Allowed font types are .woff and .woff2. + """ + genericFileId: ID! @gidTypes(types: ["GenericFile"]) + + """ + The font weight. Its value should be between 100 and 900. + """ + weight: Int! +} + +""" +The customizations that apply to specific components or areas of the user interface. +""" +type CheckoutBrandingCustomizations @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 checkboxes customizations. + """ + checkbox: CheckoutBrandingCheckboxInput + + """ + The choice list customizations. + """ + choiceList: CheckoutBrandingChoiceListInput + + """ + The content container customizations. + """ + content: CheckoutBrandingContentInput + + """ + The form controls customizations. + """ + control: CheckoutBrandingControlInput + + """ + 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 express checkout customizations. + """ + expressCheckout: CheckoutBrandingExpressCheckoutInput + + """ + The favicon image (must be of PNG format). + """ + favicon: CheckoutBrandingImageInput + + """ + The footer customizations. + """ + footer: CheckoutBrandingFooterInput + + """ + 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 main area customizations. + """ + main: CheckoutBrandingMainInput + + """ + The merchandise thumbnails customizations. + """ + merchandiseThumbnail: CheckoutBrandingMerchandiseThumbnailInput + + """ + The order summary customizations. + """ + orderSummary: CheckoutBrandingOrderSummaryInput + + """ + The primary buttons customizations. + """ + primaryButton: CheckoutBrandingButtonInput + + """ + The secondary buttons customizations. + """ + secondaryButton: CheckoutBrandingButtonInput + + """ + The selects customizations. + """ + select: CheckoutBrandingSelectInput + + """ + The text fields customizations. + """ + textField: CheckoutBrandingTextFieldInput +} + +""" +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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The color palette. + """ + colorPalette: CheckoutBrandingColorPalette @deprecated(reason: "Use `colors` instead.") + + """ + 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 @componentName(name: "checkouts") { + """ + The color palette. + """ + colorPalette: CheckoutBrandingColorPaletteInput @deprecated(reason: "This field has been replaced by `colors`.") + + """ + The color settings for global colors and color schemes. + """ + colors: CheckoutBrandingColorsInput + + """ + The corner radius variables. + """ + cornerRadius: CheckoutBrandingCornerRadiusVariablesInput + + """ + The typography. + """ + typography: CheckoutBrandingTypographyInput +} + +""" +The customizations for the page, content, main, and order summary dividers. +""" +type CheckoutBrandingDividerStyle @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The border style for the divider. + """ + borderStyle: CheckoutBrandingBorderStyle + + """ + The border width for the divider. + """ + borderWidth: CheckoutBrandingBorderWidth +} + +""" +The Express Checkout customizations. +""" +type CheckoutBrandingExpressCheckout @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutBrandingExpressCheckoutButton +} + +""" +The Express Checkout button customizations. +""" +type CheckoutBrandingExpressCheckoutButton @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The corner radius used for the Express Checkout buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields to use to update the express checkout customizations. +""" +input CheckoutBrandingExpressCheckoutButtonInput @componentName(name: "checkouts") { + """ + The corner radius used for Express Checkout buttons. + """ + cornerRadius: CheckoutBrandingCornerRadius +} + +""" +The input fields to use to update the Express Checkout customizations. +""" +input CheckoutBrandingExpressCheckoutInput @componentName(name: "checkouts") { + """ + The Express Checkout buttons customizations. + """ + button: CheckoutBrandingExpressCheckoutButtonInput +} + +""" +A font. +""" +interface CheckoutBrandingFont @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + A custom font group. + """ + customFontGroup: CheckoutBrandingCustomFontGroupInput + + """ + A Shopify font group. + """ + shopifyFontGroup: CheckoutBrandingShopifyFontGroupInput +} + +""" +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 @componentName(name: "checkouts") { + """ + 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 a short swap period. + """ + FALLBACK + + """ + Gives the font face an extremely small block period and no swap period. + """ + OPTIONAL + + """ + Gives the font face an extremely small block period and an infinite swap period. + """ + SWAP +} + +""" +The font size. +""" +type CheckoutBrandingFontSize @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The footer alignment. + """ + alignment: CheckoutBrandingFooterAlignment + + """ + The background style of the footer container. + """ + background: CheckoutBrandingBackground + + """ + 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 @componentName(name: "checkouts") { + """ + The checkout footer alignment Center value. + """ + CENTER + + """ + The checkout footer alignment End value. + """ + END + + """ + The checkout footer alignment Start value. + """ + START +} + +""" +The footer content customizations. +""" +type CheckoutBrandingFooterContent @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The visibility settings for footer content. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields for footer content customizations. +""" +input CheckoutBrandingFooterContentInput @componentName(name: "checkouts") { + """ + The visibility settings for footer content. + """ + visibility: CheckoutBrandingVisibility +} + +""" +The input fields when mutating the checkout footer settings. +""" +input CheckoutBrandingFooterInput @componentName(name: "checkouts") { + """ + The footer alignment settings. You can set the footer native content alignment to the left, center, or right. + """ + alignment: CheckoutBrandingFooterAlignment + + """ + The background style of the footer container. + """ + background: CheckoutBrandingBackground + + """ + The selected color scheme of the footer container. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + The input field for setting the footer content customizations. + """ + content: CheckoutBrandingFooterContentInput + + """ + The divided setting. + """ + divided: Boolean + + """ + The padding of the footer container. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The input field for setting the footer position customizations. + """ + position: CheckoutBrandingFooterPosition +} + +""" +Possible values for the footer position. +""" +enum CheckoutBrandingFooterPosition @componentName(name: "checkouts") { + """ + The End footer position. + """ + END + + """ + The Inline footer position. + """ + INLINE +} + +""" +The global customizations. +""" +type CheckoutBrandingGlobal @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + Set the global corner radius override to 0px (square corners). + """ + NONE +} + +""" +The input fields used to update the global customizations. +""" +input CheckoutBrandingGlobalInput @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The header alignment. + """ + alignment: CheckoutBrandingHeaderAlignment + + """ + The background style of the header container. + """ + background: CheckoutBrandingBackground + + """ + 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 @componentName(name: "checkouts") { + """ + Center alignment. + """ + CENTER + + """ + End alignment. + """ + END + + """ + Start alignment. + """ + START +} + +""" +The header cart link customizations. +""" +type CheckoutBrandingHeaderCartLink @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The header alignment. + """ + alignment: CheckoutBrandingHeaderAlignment + + """ + The background style of the header container. + """ + background: CheckoutBrandingBackground + + """ + The background image of the header (must not be of SVG format). + """ + banner: CheckoutBrandingImageInput + + """ + 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 divided setting. + """ + divided: Boolean + + """ + The store logo. + """ + logo: CheckoutBrandingLogoInput + + """ + The padding of the header container. + """ + padding: CheckoutBrandingSpacingKeyword + + """ + The header position. + """ + position: CheckoutBrandingHeaderPosition +} + +""" +The possible header positions. +""" +enum CheckoutBrandingHeaderPosition @componentName(name: "checkouts") { + """ + Inline position. + """ + INLINE + + """ + Secondary inline position. + """ + INLINE_SECONDARY + + """ + Start position. + """ + START +} + +""" +The heading level customizations. +""" +type CheckoutBrandingHeadingLevel @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The typography customizations used for headings. + """ + typography: CheckoutBrandingTypographyStyle +} + +""" +The input fields for heading level customizations. +""" +input CheckoutBrandingHeadingLevelInput @componentName(name: "checkouts") { + """ + The typography customizations used for headings. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +A checkout branding image. +""" +type CheckoutBrandingImage @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The image details. + """ + image: Image +} + +""" +The input fields used to update a checkout branding image uploaded via the Files API. +""" +input CheckoutBrandingImageInput @componentName(name: "checkouts") { + """ + A globally-unique ID. + """ + mediaImageId: ID @gidTypes(types: ["MediaImage"]) +} + +""" +The input fields used to upsert the checkout branding settings. +""" +input CheckoutBrandingInput @componentName(name: "checkouts") { + """ + The customizations that apply to specific components or areas of the user interface. + """ + customizations: CheckoutBrandingCustomizationsInput + + """ + 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 +} + +""" +Possible values for the label position. +""" +enum CheckoutBrandingLabelPosition @componentName(name: "checkouts") { + """ + The Inside label position. + """ + INSIDE + + """ + The Outside label position. + """ + OUTSIDE +} + +""" +The store logo customizations. +""" +type CheckoutBrandingLogo @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The background image of the main container (must not be of SVG format). + """ + backgroundImage: CheckoutBrandingImageInput + + """ + The selected color scheme for the main container of the checkout. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + Divider style and visibility on the main container. + """ + divider: CheckoutBrandingContainerDividerInput + + """ + The settings for the main sections. + """ + section: CheckoutBrandingMainSectionInput +} + +""" +The main sections customizations. +""" +type CheckoutBrandingMainSection @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 for 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 merchandise thumbnails customizations. +""" +type CheckoutBrandingMerchandiseThumbnail @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The background used for merchandise thumbnail badges. + """ + background: CheckoutBrandingMerchandiseThumbnailBadgeBackground +} + +""" +The merchandise thumbnail badge background. +""" +enum CheckoutBrandingMerchandiseThumbnailBadgeBackground @componentName(name: "checkouts") { + """ + The Accent background. + """ + ACCENT + + """ + The Base background. + """ + BASE +} + +""" +The input fields used to update the merchandise thumbnail badges customizations. +""" +input CheckoutBrandingMerchandiseThumbnailBadgeInput @componentName(name: "checkouts") { + """ + The background used for merchandise thumbnail badges. + """ + background: CheckoutBrandingMerchandiseThumbnailBadgeBackground +} + +""" +The input fields used to update the merchandise thumbnails customizations. +""" +input CheckoutBrandingMerchandiseThumbnailInput @componentName(name: "checkouts") { + """ + The settings for the merchandise thumbnail badge. + """ + badge: CheckoutBrandingMerchandiseThumbnailBadgeInput + + """ + 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 +} + +""" +Possible values for object fit. +""" +enum CheckoutBrandingObjectFit @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The background image of the order summary container (must not be of SVG format). + """ + backgroundImage: CheckoutBrandingImageInput + + """ + The selected color scheme for the order summary container of the checkout. + """ + colorScheme: CheckoutBrandingColorSchemeSelection + + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 for 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 selects customizations. +""" +type CheckoutBrandingSelect @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The border used for selects. + """ + border: CheckoutBrandingBorder + + """ + The typography customizations used for selects. + """ + typography: CheckoutBrandingTypographyStyleInput +} + +""" +The container shadow. +""" +enum CheckoutBrandingShadow @componentName(name: "checkouts") { + """ + The Base shadow. + """ + BASE + + """ + The Large 100 shadow. + """ + LARGE_100 + + """ + The Large 200 shadow. + """ + LARGE_200 + + """ + The Small 100 shadow. + """ + SMALL_100 + + """ + The Small 200 shadow. + """ + SMALL_200 +} + +""" +A Shopify font. +""" +type CheckoutBrandingShopifyFont implements CheckoutBrandingFont @componentName(name: "checkouts") { + """ + The font sources. + """ + sources: String + + """ + The font weight. + """ + weight: Int +} + +""" +The input fields used to update a Shopify font group. +""" +input CheckoutBrandingShopifyFontGroupInput @componentName(name: "checkouts") { + """ + The base font weight. + """ + baseWeight: Int + + """ + The bold font weight. + """ + boldWeight: Int + + """ + The font loading strategy. + """ + loadingStrategy: CheckoutBrandingFontLoadingStrategy + + """ + 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! +} + +""" +Possible values for the simple border. +""" +enum CheckoutBrandingSimpleBorder @componentName(name: "checkouts") { + """ + The Full simple border. + """ + FULL + + """ + The None simple border. + """ + NONE +} + +""" +Possible values for the spacing. +""" +enum CheckoutBrandingSpacing @componentName(name: "checkouts") { + """ + The Base spacing. + """ + BASE + + """ + The Extra Loose spacing. + """ + EXTRA_LOOSE + + """ + The Extra Tight spacing. + """ + EXTRA_TIGHT + + """ + The Loose spacing. + """ + LOOSE + + """ + The None spacing. + """ + NONE + + """ + The Tight spacing. + """ + TIGHT +} + +""" +The spacing between UI elements. +""" +enum CheckoutBrandingSpacingKeyword @componentName(name: "checkouts") { + """ + The Base spacing. + """ + BASE + + """ + 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 None spacing. + """ + NONE + + """ + 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 text fields customizations. +""" +type CheckoutBrandingTextField @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 + + """ + The font size. + """ + size: CheckoutBrandingFontSizeInput +} + +""" +Possible values for the typography kerning. +""" +enum CheckoutBrandingTypographyKerning @componentName(name: "checkouts") { + """ + Base or default kerning. + """ + BASE + + """ + Extra loose kerning, leaving even more space in between characters. + """ + EXTRA_LOOSE + + """ + Loose kerning, leaving more space than the default in between characters. + """ + LOOSE +} + +""" +Possible values for the typography letter case. +""" +enum CheckoutBrandingTypographyLetterCase @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The base font size. Example: 14px. + """ + BASE + + """ + The extra extra large font size. Example: 24px. + """ + EXTRA_EXTRA_LARGE + + """ + The extra large font size. Example: 21px. + """ + EXTRA_LARGE + + """ + The extra small font size. Example: 10px. + """ + EXTRA_SMALL + + """ + The large font size. Example: 19px. + """ + LARGE + + """ + The medium font size. Example: 16px. + """ + MEDIUM + + """ + The small font size. Example: 12px. + """ + SMALL +} + +""" +The typography customizations. +""" +type CheckoutBrandingTypographyStyle @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase +} + +""" +The input fields used to update the global typography customizations. +""" +input CheckoutBrandingTypographyStyleGlobalInput @componentName(name: "checkouts") { + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase +} + +""" +The input fields used to update the typography customizations. +""" +input CheckoutBrandingTypographyStyleInput @componentName(name: "checkouts") { + """ + The font. + """ + font: CheckoutBrandingTypographyFont + + """ + The kerning. + """ + kerning: CheckoutBrandingTypographyKerning + + """ + The letter case. + """ + letterCase: CheckoutBrandingTypographyLetterCase + + """ + The font size. + """ + size: CheckoutBrandingTypographySize + + """ + The font weight. + """ + weight: CheckoutBrandingTypographyWeight +} + +""" +Possible values for the font weight. +""" +enum CheckoutBrandingTypographyWeight @componentName(name: "checkouts") { + """ + The base weight. + """ + BASE + + """ + The bold weight. + """ + BOLD +} + +""" +Return type for `checkoutBrandingUpsert` mutation. +""" +type CheckoutBrandingUpsertPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR +} + +""" +Possible visibility states. +""" +enum CheckoutBrandingVisibility @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "access to the checkout and accounts editor.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The ID of the child product. + """ + childProductId: ID! @gidTypes(types: ["Product"]) + + """ + The parent option values. + """ + selectedParentOptionValues: [SelectedVariantOptionInput!]! +} + +""" +An error produced by a running job. +""" +type CliHydrogenStorefrontJobError @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { + """ + The error code. + """ + code: String! + + """ + A translated error message. + """ + message: String +} + +""" +The set of valid sort keys for the CodeDiscount query. +""" +enum CodeDiscountSortKeys @componentName(name: "platform") { + """ + 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. + +There are two types of collections: + +- **[Custom (manual) collections](https://help.shopify.com/manual/products/collections/manual-shopify-collection)**: +You specify the products to include in a collection. +- **[Smart (automated) collections](https://help.shopify.com/manual/products/collections/automated-collections)**: +You define rules, and products matching those rules are automatically included +in the collection. + +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 smart collections](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). +""" +type Collection implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node & Publishable @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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! @gidTypes(types: ["Product"]) + ): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The image associated with the collection. + """ + image( + """ + Crops the image according to the specified region. + """ + crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") + + """ + Image height in pixels between 1 and 2048. + """ + maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") + + """ + Image width in pixels between 1 and 2048. + """ + maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + The products that are included in the collection. + """ + products( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 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.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + The channels where the collection is published. + """ + publications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Whether or not to return only the collection publications that are published. + """ + onlyPublished: Boolean = true + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CollectionPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! @gidTypes(types: ["Channel"]) + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + 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! @gidTypes(types: ["Publication"]) + ): Boolean! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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). + """ + resourcePublicationsV2( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationV2Connection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + For a smart (automated) collection, 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 @gidTypes(types: ["Market"]) + ): [Translation!]! + + """ + The list of channels that the resource is not published to. + """ + unpublishedChannels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The ID of the collection to be deleted. + """ + id: ID! @gidTypes(types: ["Collection"]) +} + +""" +Return type for `collectionDelete` mutation. +""" +type CollectionDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The ID of the collection to be duplicated. + """ + collectionId: ID! @gidTypes(types: ["Collection"]) + + """ + 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 + + """ + The new title of the collection. + """ + newTitle: String! +} + +""" +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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Products are being duplicated from this collection. + """ + SOURCE + + """ + Products are being duplicated onto this collection. + """ + TARGET +} + +""" +Return type for `collectionDuplicate` mutation. +""" +type CollectionDuplicatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 ID of the collection. + """ + id: ID +} + +""" +The input fields required to create a collection. +""" +input CollectionInput @componentName(name: "merchandising") { + """ + 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 @gidTypes(types: ["Collection"]) + + """ + The image associated with the collection. + """ + image: ImageInput + + """ + The metafields to associate with the collection. + """ + metafields: [MetafieldInput!] + + """ + Initial list of collection products. Only valid with `collectionCreate` and without rules. + """ + products: [ID!] @gidTypes(types: ["Product"]) + + """ + Initial list of collection publications. Only valid with `collectionCreate`. + """ + publications: [CollectionPublicationInput!] @deprecated(reason: "Use PublishablePublish instead.") + + """ + 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 + + """ + The rules used to assign products to the collection. + """ + ruleSet: CollectionRuleSetInput + + """ + SEO information for the collection. + """ + seo: SEOInput + + """ + The order in which the collection's products are sorted. + """ + sortOrder: CollectionSortOrder + + """ + The theme template used when viewing the collection in a store. + """ + templateSuffix: String + + """ + The title of the collection. Required for creating a new collection. + """ + title: String +} + +""" +Represents operations involving a collection. +""" +type CollectionOperations @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + channelHandle: String @deprecated(reason: "Use publicationId instead.") + + """ + The ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") @gidTypes(types: ["Channel"]) + + """ + The ID of the publication. + """ + publicationId: ID @gidTypes(types: ["Publication"]) +} + +""" +The input fields for specifying a collection to publish and the sales channels to publish it to. +""" +input CollectionPublishInput @componentName(name: "merchandising") { + """ + The channels where the collection will be published. + """ + collectionPublications: [CollectionPublicationInput!]! + + """ + The collection to create or update publications for. + """ + id: ID! @gidTypes(types: ["Collection"]) +} + +""" +Return type for `collectionPublish` mutation. +""" +type CollectionPublishPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + The collection was not found. Please check the collection ID and try again. + """ + COLLECTION_NOT_FOUND + + """ + The move is invalid. + """ + INVALID_MOVE + + """ + The collection is not manually sorted. Can't reorder products unless collection is manually sorted. + """ + MANUALLY_SORTED_COLLECTION + + """ + Products are currently being reordered. Please try again later. + """ + TOO_MANY_ATTEMPTS_TO_REORDER_PRODUCTS +} + +""" +Represents at rule that's used to assign products to a collection. +""" +type CollectionRule @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The taxonomy category used as condition. + """ + value: TaxonomyCategory! +} + +""" +Specifies the attribute of a product being used to populate the smart collection. +""" +enum CollectionRuleColumn @componentName(name: "merchandising") { + """ + 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 + + """ + This rule type is designed to dynamically include products in a smart 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 smart 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 + + """ + This category includes metafield definitions that have the `useAsCollectionCondition` flag set to true. + """ + PRODUCT_METAFIELD_DEFINITION + + """ + The [`product_taxonomy_node_id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.productCategory) attribute. + """ + PRODUCT_TAXONOMY_NODE_ID + + """ + 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 [`variant_compare_at_price`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.compareAtPrice) attribute. + """ + VARIANT_COMPARE_AT_PRICE + + """ + The [`variant_inventory`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.inventoryQuantity) attribute. + """ + VARIANT_INVENTORY + + """ + This category includes metafield definitions that have the `useAsCollectionCondition` flag set to true. + """ + VARIANT_METAFIELD_DEFINITION + + """ + The [`variant_price`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.price) attribute. + """ + VARIANT_PRICE + + """ + The [`variant_title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.title) attribute. + """ + VARIANT_TITLE + + """ + The [`variant_weight`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.inventoryItem.measurement.weight) attribute. + """ + VARIANT_WEIGHT + + """ + The [`vendor`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.vendor) attribute. + """ + VENDOR +} + +""" +Specifies object for the condition of the rule. +""" +union CollectionRuleConditionObject @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = CollectionRuleCategoryCondition | CollectionRuleMetafieldCondition | CollectionRuleProductCategoryCondition | CollectionRuleTextCondition + +""" +Defines the available columns and relationships that can be used when creating +rules for smart 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 smart 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 smart collection rules +and what types of comparisons are allowed for each field. + +Learn more about [smart collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). +""" +type CollectionRuleConditions @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = CollectionRuleMetafieldCondition + +""" +The input fields for a rule to associate with a collection. +""" +input CollectionRuleInput @componentName(name: "merchandising") { + """ + 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 object ID that points to additional attributes for the collection rule. + This is only required when using metafield definition rules. + """ + conditionObjectId: ID + + """ + The type of operator that the rule is based on. For example, `equals`, `contains`, or `not_equals`. + """ + relation: CollectionRuleRelation! +} + +""" +Identifies a metafield definition used as a rule for the smart collection. +""" +type CollectionRuleMetafieldCondition @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The metafield condition display name associated to the rule. + """ + metafieldConditionDisplayName: String + + """ + The metafield definition associated with the condition. + """ + metafieldDefinition: MetafieldDefinition! +} + +""" +Specifies the condition for a Product Category field. +""" +type CollectionRuleProductCategoryCondition @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The value of the condition. + """ + value: ProductTaxonomyNode! +} + +""" +Specifies the relationship between the `column` and the `condition`. +""" +enum CollectionRuleRelation @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The value of the condition. + """ + value: String! +} + +""" +The set of valid sort keys for the Collection query. +""" +enum CollectionSortKeys @componentName(name: "platform") { + """ + 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 `sort_order` value. + """ + SORT_ORDER + + """ + 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 @componentName(name: "merchandising") { + """ + 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 most relevant products. + """ + MOST_RELEVANT + + """ + 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 @componentName(name: "merchandising") { + """ + The channels where the collection is published. + """ + collectionPublications: [CollectionPublicationInput!]! + + """ + The collection to create or update publications for. + """ + id: ID! @gidTypes(types: ["Collection"]) +} + +""" +Return type for `collectionUnpublish` mutation. +""" +type CollectionUnpublishPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "reporting") { + """ + Represents an array of values. + """ + ARRAY + + """ + Represents a boolean value. + """ + BOOLEAN + + """ + Represents a hex color value. + """ + COLOR + + """ + Represents a duration in days. + """ + DAY_DURATION + + """ + Represents a day of week value. + """ + DAY_OF_WEEK + + """ + Represents a day-level timestamp value. + """ + DAY_TIMESTAMP + + """ + Represents a decimal value. + """ + DECIMAL + + """ + Represents a floating point value. + """ + FLOAT + + """ + Represents a duration in hours. + """ + HOUR_DURATION + + """ + Represents an hour of day value. + """ + HOUR_OF_DAY + + """ + Represents a hour-level timestamp value. + """ + HOUR_TIMESTAMP + + """ + Represents an identity value. + """ + IDENTITY + + """ + Represents an integer value. + """ + INTEGER + + """ + Represents a duration in milliseconds. + """ + MILLISECOND_DURATION + + """ + Represents a duration in minutes. + """ + MINUTE_DURATION + + """ + Represents a minute-level timestamp value. + """ + MINUTE_TIMESTAMP + + """ + Represents a monetary value. + """ + MONEY + + """ + Represents a month of year value. + """ + MONTH_OF_YEAR + + """ + Represents a month-level timestamp value. + """ + MONTH_TIMESTAMP + + """ + Represents a percentage value. + """ + PERCENT + + """ + Represents a quarter-level timestamp value. + """ + QUARTER_TIMESTAMP + + """ + Represents a rating value. + """ + RATING + + """ + Represents a duration in seconds. + """ + SECOND_DURATION + + """ + Represents a second-level timestamp value. + """ + SECOND_TIMESTAMP + + """ + Represents a string value. + """ + STRING + + """ + Represents a string identity value. + """ + STRING_IDENTITY + + """ + Represents a timestamp value in seconds. + """ + TIMESTAMP + + """ + Represents an unspecified data type. + """ + UNSPECIFIED + + """ + Represents a week of year value. + """ + WEEK_OF_YEAR + + """ + Represents a week-level timestamp value. + """ + WEEK_TIMESTAMP + + """ + Represents a year-level timestamp value. + """ + YEAR_TIMESTAMP +} + +""" +A combined listing of products. +""" +type CombinedListing @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + A list of child products in the combined listing. + """ + combinedListingChildren( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CombinedListingChildConnection! + + """ + The parent product. + """ + parentProduct: Product! +} + +""" +A child of a combined listing. +""" +type CombinedListingChild @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The parent variant. + """ + parentVariant: ProductVariant! + + """ + The child product. + """ + product: Product! +} + +""" +An auto-generated type for paginating through multiple CombinedListingChildren. +""" +type CombinedListingChildConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Unable to add duplicated products. + """ + CANNOT_HAVE_DUPLICATED_PRODUCTS + + """ + Unable to add a product that is a parent. + """ + CANNOT_HAVE_PARENT_AS_CHILD + + """ + Unable to add products with repeated options. + """ + CANNOT_HAVE_REPEATED_OPTIONS + + """ + Option values cannot be repeated. + """ + CANNOT_HAVE_REPEATED_OPTION_VALUES + + """ + 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 + + """ + The same metafield cannot be linked to multiple options. + """ + LINKED_METAFIELDS_CANNOT_BE_REPEATED + + """ + 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 + + """ + 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 + + """ + All child products must include the same options. + """ + OPTIONS_MUST_BE_EQUAL_TO_THE_OTHER_COMPONENTS + + """ + 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 + + """ + 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 products that can be added to an individual combined listing. + """ + TOO_MANY_PRODUCTS + + """ + You have reached the maximum number of variants across all products for an individual combined listing. + """ + TOO_MANY_VARIANTS + + """ + An unexpected error occurred. + """ + UNEXPECTED_ERROR +} + +""" +The role of the combined listing. +""" +enum CombinedListingsRole @componentName(name: "merchandising") { + """ + The product is the child of a combined listing. + """ + CHILD + + """ + The product is the parent of a combined listing. + """ + PARENT +} + +""" +A comment on an article. +""" +type Comment implements HasEvents & Node @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") @protectedObject(subject: "customer") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") @protectedObject(subject: "customer") { + """ + The author's email. + """ + email: String! @protectedField(subject: "customer", content: "email") + + """ + The author’s name. + """ + name: String! @protectedField(subject: "customer", content: "name") +} + +""" +An auto-generated type for paginating through multiple Comments. +""" +type CommentConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + 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 @componentName(name: "timeline") @protectedObject(subject: "customer") { + """ + 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 @componentName(name: "timeline") { + """ + 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( + """ + Crops the image according to the specified region. + """ + crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") + + """ + Image height in pixels between 1 and 2048. + """ + maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") + + """ + Image width in pixels between 1 and 2048. + """ + maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 @componentName(name: "timeline") = Customer | DraftOrder | InventoryTransfer | Order | Product | ProductVariant + +""" +The subject line of a comment event. +""" +interface CommentEventSubject @componentName(name: "timeline") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +Possible comment policies for a blog. +""" +enum CommentPolicy @componentName(name: "online_store") { + """ + 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 @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +Return type for `commentSpam` mutation. +""" +type CommentSpamPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +The status of a comment. +""" +enum CommentStatus @componentName(name: "online_store") { + """ + The comment is pending approval. + """ + PENDING + + """ + The comment is published. + """ + PUBLISHED + + """ + The comment has been removed. + """ + REMOVED + + """ + The comment is marked as spam. + """ + SPAM + + """ + The comment is unapproved. + """ + UNAPPROVED +} + +""" +Return type for `companiesDelete` mutation. +""" +type CompaniesDeletePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | company_id | id | + | company_location_id | id | + | created_at | time | + | email | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | location_name | string | + | name | string | + | role_name | string | + | status | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: CompanyContactSortKeys = ID + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | customer_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | source | string | + | status | string | + | tag | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): DraftOrderConnection! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | company_id | id | + | created_at | time | + | external_id | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | ids | string | + | 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"` | + | name | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: CompanyLocationSortKeys = ID + ): 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + The name of the company. + """ + name: String! + + """ + A note about the company. + """ + note: String + + """ + The list of the company's orders. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) + (`ChannelInformation.channelDefinition.handle`) field. | | | - + `channel:web`
- `channel:web,pos` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | 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"` | + | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) + field. | | | - `name:1001-A` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) + of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). + | - `has_issues`
- `no_issues`
- `not_validated` | | - + `shipping_address_validation_result_summary:no_issues` | + | 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` | + | 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` | + | 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` | + | status | string | Filter by the order's status to manage workflows or + analyze the order lifecycle. | - `open`
- `closed`
- + `cancelled`
- `not_closed` | | - `status:open` | + | 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` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { + """ + 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! @protectedField(subject: "customer", content: "name") + + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + The formatted version of the address. + """ + formattedAddress( + """ + Whether to include the company name in the formatted address. + """ + withCompanyName: Boolean = true + + """ + Whether to include the recipient's name in the formatted address. + """ + withName: Boolean = false + ): [String!]! @protectedField(subject: "customer", content: "address") + + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + 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 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 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 identity of the recipient e.g. 'Receiving Department'. + """ + recipient: String + + """ + The zip or postal code of the address. + """ + zip: 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 valid values for the address type of a company. +""" +enum CompanyAddressType @componentName(name: "business_customers") { + """ + The address is a billing address. + """ + BILLING + + """ + The address is a shipping address. + """ + SHIPPING +} + +""" +Return type for `companyAssignCustomerAsContact` mutation. +""" +type CompanyAssignCustomerAsContactPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | customer_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | source | string | + | status | string | + | tag | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | company_contact_id | id | + | company_contact_role_id | id | + | company_id | id | + | company_location_id | id | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | location_name | string | + | role_name | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: CompanyContactRoleAssignmentSortKeys = ID + ): 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + 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 @componentName(name: "business_customers") { + """ + The unique email address of the company contact. + """ + email: String + + """ + The company contact's first name. + """ + firstName: String + + """ + The company contact's last name. + """ + lastName: String + + """ + The contact's locale. + """ + locale: String + + """ + The phone number of the company contact. + """ + phone: String + + """ + The title of the company contact. + """ + title: String +} + +""" +Return type for `companyContactRemoveFromCompany` mutation. +""" +type CompanyContactRemoveFromCompanyPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") @protectedObject(subject: "customer") { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of a role. For example, `admin` or `buyer`. + """ + name: String! @protectedField(subject: "customer", content: "name") + + """ + A note for the role. + """ + note: String +} + +""" +The input fields for the role and location to assign to a company contact. +""" +input CompanyContactRoleAssign @componentName(name: "business_customers") { + """ + The role ID. + """ + companyContactRoleId: ID! @gidTypes(types: ["CompanyContactRole"]) + + """ + The location. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) +} + +""" +The CompanyContactRoleAssignment describes the company and location associated to a company contact's role. +""" +type CompanyContactRoleAssignment implements Node @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") @privatelyDocumented { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + 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 @componentName(name: "platform") { + """ + The created company. + """ + company: Company + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BusinessCustomerUserError!]! +} + +""" +Return type for `companyDelete` mutation. +""" +type CompanyDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + 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 @componentName(name: "business_customers") { + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at + which the company became the customer. + """ + customerSince: DateTime + + """ + A unique externally-supplied ID for the company. + """ + externalId: String + + """ + The name of the company. + """ + name: String + + """ + A note about the company. + """ + note: String +} + +""" +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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | customer_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | source | string | + | status | string | + | tag | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): DraftOrderConnection! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): EventConnection! + + """ + A unique externally-supplied ID for the company location. + """ + externalId: String + + """ + Whether the company location has a price list with the specified ID. + """ + hasPriceList( + """ + The price list ID to check. + """ + priceListId: ID! @gidTypes(types: ["PriceList"]) + ): Boolean! + + """ + 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! @gidTypes(types: ["Catalog"]) + ): 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 price lists for the company location. + """ + priceLists( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PriceListConnection! + + """ + The list of roles assigned to the company location. + """ + roleAssignments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | company_contact_id | id | + | company_contact_role_id | id | + | company_id | id | + | company_location_id | id | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | location_name | string | + | role_name | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: CompanyContactRoleAssignmentSortKeys = ID + ): CompanyContactRoleAssignmentConnection! + + """ + The address used as shipping address for the location. + """ + shippingAddress: CompanyAddress + + """ + The list of staff members assigned to the company location. + """ + staffMemberAssignments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | company_location_id | id | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | staff_member_id | id | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: CompanyLocationStaffMemberAssignmentSortKeys = ID + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | currency_code | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The company locations associated with the catalog. + """ + companyLocations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | company_id | id | + | created_at | time | + | external_id | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | ids | string | + | 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"` | + | name | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: CompanyLocationSortKeys = ID + ): 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + 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 @componentName(name: "business_customers") { + """ + The input fields to create or update the billing address for a company location. + """ + billingAddress: 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 configuration for the buyer's checkout at the company location. + """ + buyerExperienceConfiguration: BuyerExperienceConfigurationInput + + """ + A unique externally-supplied ID for the company location. + """ + externalId: String + + """ + The preferred locale of the company location. + """ + locale: String + + """ + The name of the company location. + """ + name: String + + """ + A note about the company location. + """ + note: String + + """ + The phone number of the company location. + """ + phone: String + + """ + The input fields to create or update the shipping address for a company location. + """ + shippingAddress: CompanyAddressInput + + """ + Whether the location is exempt from taxes. + """ + taxExempt: Boolean + + """ + The list of tax exemptions to apply to the company location. + """ + taxExemptions: [TaxExemption!] + + """ + The tax registration ID of the company location. + """ + taxRegistrationId: String +} + +""" +Return type for `companyLocationRemoveStaffMembers` mutation. +""" +type CompanyLocationRemoveStaffMembersPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + The company contact ID.. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + + """ + The role ID. + """ + companyContactRoleId: ID! @gidTypes(types: ["CompanyContactRole"]) +} + +""" +The set of valid sort keys for the CompanyLocation query. +""" +enum CompanyLocationSortKeys @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "business_customers") { + """ + The configuration for the buyer's checkout at the company location. + """ + buyerExperienceConfiguration: BuyerExperienceConfigurationInput + + """ + A unique externally-supplied ID for the company location. + """ + externalId: String + + """ + The preferred locale of the company location. + """ + locale: String + + """ + The name of the company location. + """ + name: String + + """ + A note about the company location. + """ + note: String + + """ + The phone number of the company location. + """ + phone: String +} + +""" +Return type for `companyLocationUpdate` mutation. +""" +type CompanyLocationUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The company locations that comprise the market. + """ + companyLocations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CompanyLocationConnection! +} + +""" +Return type for `companyLocationsDelete` mutation. +""" +type CompanyLocationsDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "privacy") { + """ + 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 @componentName(name: "privacy") { + """ + 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 @componentName(name: "platform") { + """ + Country code is required. + """ + COUNTRY_CODE_REQUIRED + + """ + Region code must match the country code. + """ + REGION_CODE_MUST_MATCH_COUNTRY_CODE + + """ + Region code is required for countries with existing regional policies. + """ + REGION_CODE_REQUIRED + + """ + 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 @componentName(name: "privacy") { + """ + 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 `ISO 3166` region code for which the policy applies. + """ + regionCode: String +} + +""" +A country or region code. +""" +type ConsentPolicyRegion @componentName(name: "privacy") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The CompanyLocation ID used to fetch company location specific prices. + """ + companyLocationId: ID @gidTypes(types: ["CompanyLocation"]) + + """ + The country code used to fetch country-specific prices. + """ + country: CountryCode + + """ + The Location ID used to fetch location specific prices. + """ + locationId: ID @gidTypes(types: ["Location"]) +} + +""" +The context data that determines the publication status of a product. +""" +input ContextualPublicationContext @componentName(name: "merchandising") { + """ + The company location ID used to fetch company-specific publication. + """ + companyLocationId: ID @gidTypes(types: ["CompanyLocation"]) + + """ + The country code used to fetch country-specific publication. + """ + country: CountryCode + + """ + The Location ID used to fetch the publication status of a product. + """ + locationId: ID @gidTypes(types: ["Location"]) +} + +""" +A shop's banner settings. +""" +type CookieBanner implements HasPublishedTranslations @requiredAccess(scope: "`read_privacy_settings` access scope.") @componentName(name: "privacy") { + """ + 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 @gidTypes(types: ["Market"]) + ): [Translation!]! +} + +""" +A numeric count with precision information indicating whether the count is exact or an estimate. +""" +type Count @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The count is at least the value. A limit was imposed and reached. + """ + AT_LEAST + + """ + The count is exactly the value. A write may not be reflected instantaneously. + """ + EXACT +} + +""" +The list of all the countries from the combined shipping zones for the shop. +""" +type CountriesInShippingZones @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Ascension Island. + """ + AC + + """ + Andorra. + """ + AD + + """ + United Arab Emirates. + """ + AE + + """ + Afghanistan. + """ + AF + + """ + Antigua & Barbuda. + """ + AG + + """ + Anguilla. + """ + AI + + """ + Albania. + """ + AL + + """ + Armenia. + """ + AM + + """ + Netherlands Antilles. + """ + AN + + """ + Angola. + """ + AO + + """ + Argentina. + """ + AR + + """ + Austria. + """ + AT + + """ + Australia. + """ + AU + + """ + Aruba. + """ + AW + + """ + Åland Islands. + """ + AX + + """ + Azerbaijan. + """ + AZ + + """ + Bosnia & Herzegovina. + """ + BA + + """ + Barbados. + """ + BB + + """ + Bangladesh. + """ + BD + + """ + Belgium. + """ + BE + + """ + Burkina Faso. + """ + BF + + """ + Bulgaria. + """ + BG + + """ + Bahrain. + """ + BH + + """ + Burundi. + """ + BI + + """ + Benin. + """ + BJ + + """ + St. Barthélemy. + """ + BL + + """ + Bermuda. + """ + BM + + """ + Brunei. + """ + BN + + """ + Bolivia. + """ + BO + + """ + Caribbean Netherlands. + """ + BQ + + """ + Brazil. + """ + BR + + """ + Bahamas. + """ + BS + + """ + Bhutan. + """ + BT + + """ + Bouvet Island. + """ + BV + + """ + Botswana. + """ + BW + + """ + Belarus. + """ + BY + + """ + Belize. + """ + BZ + + """ + Canada. + """ + CA + + """ + Cocos (Keeling) Islands. + """ + CC + + """ + Congo - Kinshasa. + """ + CD + + """ + Central African Republic. + """ + CF + + """ + Congo - Brazzaville. + """ + CG + + """ + Switzerland. + """ + CH + + """ + Côte d’Ivoire. + """ + CI + + """ + Cook Islands. + """ + CK + + """ + Chile. + """ + CL + + """ + Cameroon. + """ + CM + + """ + China. + """ + CN + + """ + Colombia. + """ + CO + + """ + Costa Rica. + """ + CR + + """ + Cuba. + """ + CU + + """ + Cape Verde. + """ + CV + + """ + Curaçao. + """ + CW + + """ + Christmas Island. + """ + CX + + """ + Cyprus. + """ + CY + + """ + Czechia. + """ + CZ + + """ + Germany. + """ + DE + + """ + Djibouti. + """ + DJ + + """ + Denmark. + """ + DK + + """ + Dominica. + """ + DM + + """ + Dominican Republic. + """ + DO + + """ + Algeria. + """ + DZ + + """ + Ecuador. + """ + EC + + """ + Estonia. + """ + EE + + """ + Egypt. + """ + EG + + """ + Western Sahara. + """ + EH + + """ + Eritrea. + """ + ER + + """ + Spain. + """ + ES + + """ + Ethiopia. + """ + ET + + """ + Finland. + """ + FI + + """ + Fiji. + """ + FJ + + """ + Falkland Islands. + """ + FK + + """ + Faroe Islands. + """ + FO + + """ + France. + """ + FR + + """ + Gabon. + """ + GA + + """ + United Kingdom. + """ + GB + + """ + Grenada. + """ + GD + + """ + Georgia. + """ + GE + + """ + French Guiana. + """ + GF + + """ + Guernsey. + """ + GG + + """ + Ghana. + """ + GH + + """ + Gibraltar. + """ + GI + + """ + Greenland. + """ + GL + + """ + Gambia. + """ + GM + + """ + Guinea. + """ + GN + + """ + Guadeloupe. + """ + GP + + """ + Equatorial Guinea. + """ + GQ + + """ + Greece. + """ + GR + + """ + South Georgia & South Sandwich Islands. + """ + GS + + """ + Guatemala. + """ + GT + + """ + Guinea-Bissau. + """ + GW + + """ + Guyana. + """ + GY + + """ + Hong Kong SAR. + """ + HK + + """ + Heard & McDonald Islands. + """ + HM + + """ + Honduras. + """ + HN + + """ + Croatia. + """ + HR + + """ + Haiti. + """ + HT + + """ + Hungary. + """ + HU + + """ + Indonesia. + """ + ID + + """ + Ireland. + """ + IE + + """ + Israel. + """ + IL + + """ + Isle of Man. + """ + IM + + """ + India. + """ + IN + + """ + British Indian Ocean Territory. + """ + IO + + """ + Iraq. + """ + IQ + + """ + Iran. + """ + IR + + """ + Iceland. + """ + IS + + """ + Italy. + """ + IT + + """ + Jersey. + """ + JE + + """ + Jamaica. + """ + JM + + """ + Jordan. + """ + JO + + """ + Japan. + """ + JP + + """ + Kenya. + """ + KE + + """ + Kyrgyzstan. + """ + KG + + """ + Cambodia. + """ + KH + + """ + Kiribati. + """ + KI + + """ + Comoros. + """ + KM + + """ + St. Kitts & Nevis. + """ + KN + + """ + North Korea. + """ + KP + + """ + South Korea. + """ + KR + + """ + Kuwait. + """ + KW + + """ + Cayman Islands. + """ + KY + + """ + Kazakhstan. + """ + KZ + + """ + Laos. + """ + LA + + """ + Lebanon. + """ + LB + + """ + St. Lucia. + """ + LC + + """ + Liechtenstein. + """ + LI + + """ + Sri Lanka. + """ + LK + + """ + Liberia. + """ + LR + + """ + Lesotho. + """ + LS + + """ + Lithuania. + """ + LT + + """ + Luxembourg. + """ + LU + + """ + Latvia. + """ + LV + + """ + Libya. + """ + LY + + """ + Morocco. + """ + MA + + """ + Monaco. + """ + MC + + """ + Moldova. + """ + MD + + """ + Montenegro. + """ + ME + + """ + St. Martin. + """ + MF + + """ + Madagascar. + """ + MG + + """ + North Macedonia. + """ + MK + + """ + Mali. + """ + ML + + """ + Myanmar (Burma). + """ + MM + + """ + Mongolia. + """ + MN + + """ + Macao SAR. + """ + MO + + """ + Martinique. + """ + MQ + + """ + Mauritania. + """ + MR + + """ + Montserrat. + """ + MS + + """ + Malta. + """ + MT + + """ + Mauritius. + """ + MU + + """ + Maldives. + """ + MV + + """ + Malawi. + """ + MW + + """ + Mexico. + """ + MX + + """ + Malaysia. + """ + MY + + """ + Mozambique. + """ + MZ + + """ + Namibia. + """ + NA + + """ + New Caledonia. + """ + NC + + """ + Niger. + """ + NE + + """ + Norfolk Island. + """ + NF + + """ + Nigeria. + """ + NG + + """ + Nicaragua. + """ + NI + + """ + Netherlands. + """ + NL + + """ + Norway. + """ + NO + + """ + Nepal. + """ + NP + + """ + Nauru. + """ + NR + + """ + Niue. + """ + NU + + """ + New Zealand. + """ + NZ + + """ + Oman. + """ + OM + + """ + Panama. + """ + PA + + """ + Peru. + """ + PE + + """ + French Polynesia. + """ + PF + + """ + Papua New Guinea. + """ + PG + + """ + Philippines. + """ + PH + + """ + Pakistan. + """ + PK + + """ + Poland. + """ + PL + + """ + St. Pierre & Miquelon. + """ + PM + + """ + Pitcairn Islands. + """ + PN + + """ + Palestinian Territories. + """ + PS + + """ + Portugal. + """ + PT + + """ + Paraguay. + """ + PY + + """ + Qatar. + """ + QA + + """ + Réunion. + """ + RE + + """ + Romania. + """ + RO + + """ + Serbia. + """ + RS + + """ + Russia. + """ + RU + + """ + Rwanda. + """ + RW + + """ + Saudi Arabia. + """ + SA + + """ + Solomon Islands. + """ + SB + + """ + Seychelles. + """ + SC + + """ + Sudan. + """ + SD + + """ + Sweden. + """ + SE + + """ + Singapore. + """ + SG + + """ + St. Helena. + """ + SH + + """ + Slovenia. + """ + SI + + """ + Svalbard & Jan Mayen. + """ + SJ + + """ + Slovakia. + """ + SK + + """ + Sierra Leone. + """ + SL + + """ + San Marino. + """ + SM + + """ + Senegal. + """ + SN + + """ + Somalia. + """ + SO + + """ + Suriname. + """ + SR + + """ + South Sudan. + """ + SS + + """ + São Tomé & Príncipe. + """ + ST + + """ + El Salvador. + """ + SV + + """ + Sint Maarten. + """ + SX + + """ + Syria. + """ + SY + + """ + Eswatini. + """ + SZ + + """ + Tristan da Cunha. + """ + TA + + """ + Turks & Caicos Islands. + """ + TC + + """ + Chad. + """ + TD + + """ + French Southern Territories. + """ + TF + + """ + Togo. + """ + TG + + """ + Thailand. + """ + TH + + """ + Tajikistan. + """ + TJ + + """ + Tokelau. + """ + TK + + """ + Timor-Leste. + """ + TL + + """ + Turkmenistan. + """ + TM + + """ + Tunisia. + """ + TN + + """ + Tonga. + """ + TO + + """ + Türkiye. + """ + TR + + """ + Trinidad & Tobago. + """ + TT + + """ + Tuvalu. + """ + TV + + """ + Taiwan. + """ + TW + + """ + Tanzania. + """ + TZ + + """ + Ukraine. + """ + UA + + """ + Uganda. + """ + UG + + """ + U.S. Outlying Islands. + """ + UM + + """ + United States. + """ + US + + """ + Uruguay. + """ + UY + + """ + Uzbekistan. + """ + UZ + + """ + Vatican City. + """ + VA + + """ + St. Vincent & Grenadines. + """ + VC + + """ + Venezuela. + """ + VE + + """ + British Virgin Islands. + """ + VG + + """ + Vietnam. + """ + VN + + """ + Vanuatu. + """ + VU + + """ + Wallis & Futuna. + """ + WF + + """ + Samoa. + """ + WS + + """ + Kosovo. + """ + XK + + """ + Yemen. + """ + YE + + """ + Mayotte. + """ + YT + + """ + South Africa. + """ + ZA + + """ + Zambia. + """ + ZM + + """ + Zimbabwe. + """ + ZW + + """ + Unknown Region. + """ + ZZ +} + +""" +The country-specific harmonized system code and ISO country code for an inventory item. +""" +type CountryHarmonizedSystemCode @requiredAccess(scope: "`read_inventory` access scope or `read_products` access scope.") @componentName(name: "inventory") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "inventory") { + """ + 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 @componentName(name: "inventory") { + """ + 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 + + """ + Country specific harmonized system code. + """ + harmonizedSystemCode: String! +} + +""" +The input fields required to create a media object. +""" +input CreateMediaInput @componentName(name: "merchandising") { + """ + The alt text associated with the media. + """ + alt: String + + """ + The media content type. + """ + mediaContentType: MediaContentType + + """ + The original source of the media object. This might be an external URL or a staged upload URL. + """ + originalSource: String +} + +""" +The part of the image that should remain after cropping. +""" +enum CropRegion @componentName(name: "platform") { + """ + Keep the bottom of the image. + """ + BOTTOM + + """ + Keep the center of the image. + """ + CENTER + + """ + Keep the left of the image. + """ + LEFT + + """ + Crop the exact region of the image specified by the crop_left, crop_top, crop_width and crop_height parameters. + """ + REGION + + """ + Keep the right of the image. + """ + RIGHT + + """ + Keep the top of the image. + """ + TOP +} + +""" +The input fields for defining an arbitrary cropping region. +""" +input CropRegionInput @componentName(name: "platform") { + """ + Height of the region of the image to extract when using the region crop mode. + """ + height: Int! + + """ + Left position of the region of the image to extract when using the region crop mode. + """ + left: Int! + + """ + Top position of the region of the image to extract when using the region crop mode. + """ + top: Int! + + """ + Width of the region of the image to extract when using the region crop mode. + """ + width: Int! +} + +""" +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 @componentName(name: "platform") { + """ + United Arab Emirates Dirham (AED). + """ + AED + + """ + Afghan Afghani (AFN). + """ + AFN + + """ + Albanian Lek (ALL). + """ + ALL + + """ + Armenian Dram (AMD). + """ + AMD + + """ + Netherlands Antillean Guilder. + """ + ANG + + """ + Angolan Kwanza (AOA). + """ + AOA + + """ + Argentine Pesos (ARS). + """ + ARS + + """ + Australian Dollars (AUD). + """ + AUD + + """ + Aruban Florin (AWG). + """ + AWG + + """ + Azerbaijani Manat (AZN). + """ + AZN + + """ + Bosnia and Herzegovina Convertible Mark (BAM). + """ + BAM + + """ + Barbadian Dollar (BBD). + """ + BBD + + """ + Bangladesh Taka (BDT). + """ + BDT + + """ + Bulgarian Lev (BGN). + """ + BGN + + """ + Bahraini Dinar (BHD). + """ + BHD + + """ + Burundian Franc (BIF). + """ + BIF + + """ + Bermudian Dollar (BMD). + """ + BMD + + """ + Brunei Dollar (BND). + """ + BND + + """ + Bolivian Boliviano (BOB). + """ + BOB + + """ + Brazilian Real (BRL). + """ + BRL + + """ + Bahamian Dollar (BSD). + """ + BSD + + """ + Bhutanese Ngultrum (BTN). + """ + BTN + + """ + Botswana Pula (BWP). + """ + BWP + + """ + Belarusian Ruble (BYN). + """ + BYN + + """ + Belarusian Ruble (BYR). + """ + BYR @deprecated(reason: "Use `BYN` instead.") + + """ + Belize Dollar (BZD). + """ + BZD + + """ + Canadian Dollars (CAD). + """ + CAD + + """ + Congolese franc (CDF). + """ + CDF + + """ + Swiss Francs (CHF). + """ + CHF + + """ + Chilean Peso (CLP). + """ + CLP + + """ + Chinese Yuan Renminbi (CNY). + """ + CNY + + """ + Colombian Peso (COP). + """ + COP + + """ + Costa Rican Colones (CRC). + """ + CRC + + """ + Cape Verdean escudo (CVE). + """ + CVE + + """ + Czech Koruny (CZK). + """ + CZK + + """ + Djiboutian Franc (DJF). + """ + DJF + + """ + Danish Kroner (DKK). + """ + DKK + + """ + Dominican Peso (DOP). + """ + DOP + + """ + Algerian Dinar (DZD). + """ + DZD + + """ + Egyptian Pound (EGP). + """ + EGP + + """ + Eritrean Nakfa (ERN). + """ + ERN + + """ + Ethiopian Birr (ETB). + """ + ETB + + """ + Euro (EUR). + """ + EUR + + """ + Fijian Dollars (FJD). + """ + FJD + + """ + Falkland Islands Pounds (FKP). + """ + FKP + + """ + United Kingdom Pounds (GBP). + """ + GBP + + """ + Georgian Lari (GEL). + """ + GEL + + """ + Ghanaian Cedi (GHS). + """ + GHS + + """ + Gibraltar Pounds (GIP). + """ + GIP + + """ + Gambian Dalasi (GMD). + """ + GMD + + """ + Guinean Franc (GNF). + """ + GNF + + """ + Guatemalan Quetzal (GTQ). + """ + GTQ + + """ + Guyanese Dollar (GYD). + """ + GYD + + """ + Hong Kong Dollars (HKD). + """ + HKD + + """ + Honduran Lempira (HNL). + """ + HNL + + """ + Croatian Kuna (HRK). + """ + HRK + + """ + Haitian Gourde (HTG). + """ + HTG + + """ + Hungarian Forint (HUF). + """ + HUF + + """ + Indonesian Rupiah (IDR). + """ + IDR + + """ + Israeli New Shekel (NIS). + """ + ILS + + """ + Indian Rupees (INR). + """ + INR + + """ + Iraqi Dinar (IQD). + """ + IQD + + """ + Iranian Rial (IRR). + """ + IRR + + """ + Icelandic Kronur (ISK). + """ + ISK + + """ + Jersey Pound. + """ + JEP + + """ + Jamaican Dollars (JMD). + """ + JMD + + """ + Jordanian Dinar (JOD). + """ + JOD + + """ + Japanese Yen (JPY). + """ + JPY + + """ + Kenyan Shilling (KES). + """ + KES + + """ + Kyrgyzstani Som (KGS). + """ + KGS + + """ + Cambodian Riel. + """ + KHR + + """ + Kiribati Dollar (KID). + """ + KID + + """ + Comorian Franc (KMF). + """ + KMF + + """ + South Korean Won (KRW). + """ + KRW + + """ + Kuwaiti Dinar (KWD). + """ + KWD + + """ + Cayman Dollars (KYD). + """ + KYD + + """ + Kazakhstani Tenge (KZT). + """ + KZT + + """ + Laotian Kip (LAK). + """ + LAK + + """ + Lebanese Pounds (LBP). + """ + LBP + + """ + Sri Lankan Rupees (LKR). + """ + LKR + + """ + Liberian Dollar (LRD). + """ + LRD + + """ + Lesotho Loti (LSL). + """ + LSL + + """ + Lithuanian Litai (LTL). + """ + LTL + + """ + Latvian Lati (LVL). + """ + LVL + + """ + Libyan Dinar (LYD). + """ + LYD + + """ + Moroccan Dirham. + """ + MAD + + """ + Moldovan Leu (MDL). + """ + MDL + + """ + Malagasy Ariary (MGA). + """ + MGA + + """ + Macedonia Denar (MKD). + """ + MKD + + """ + Burmese Kyat (MMK). + """ + MMK + + """ + Mongolian Tugrik. + """ + MNT + + """ + Macanese Pataca (MOP). + """ + MOP + + """ + Mauritanian Ouguiya (MRU). + """ + MRU + + """ + Mauritian Rupee (MUR). + """ + MUR + + """ + Maldivian Rufiyaa (MVR). + """ + MVR + + """ + Malawian Kwacha (MWK). + """ + MWK + + """ + Mexican Pesos (MXN). + """ + MXN + + """ + Malaysian Ringgits (MYR). + """ + MYR + + """ + Mozambican Metical. + """ + MZN + + """ + Namibian Dollar. + """ + NAD + + """ + Nigerian Naira (NGN). + """ + NGN + + """ + Nicaraguan Córdoba (NIO). + """ + NIO + + """ + Norwegian Kroner (NOK). + """ + NOK + + """ + Nepalese Rupee (NPR). + """ + NPR + + """ + New Zealand Dollars (NZD). + """ + NZD + + """ + Omani Rial (OMR). + """ + OMR + + """ + Panamian Balboa (PAB). + """ + PAB + + """ + Peruvian Nuevo Sol (PEN). + """ + PEN + + """ + Papua New Guinean Kina (PGK). + """ + PGK + + """ + Philippine Peso (PHP). + """ + PHP + + """ + Pakistani Rupee (PKR). + """ + PKR + + """ + Polish Zlotych (PLN). + """ + PLN + + """ + Paraguayan Guarani (PYG). + """ + PYG + + """ + Qatari Rial (QAR). + """ + QAR + + """ + Romanian Lei (RON). + """ + RON + + """ + Serbian dinar (RSD). + """ + RSD + + """ + Russian Rubles (RUB). + """ + RUB + + """ + Rwandan Franc (RWF). + """ + RWF + + """ + Saudi Riyal (SAR). + """ + SAR + + """ + Solomon Islands Dollar (SBD). + """ + SBD + + """ + Seychellois Rupee (SCR). + """ + SCR + + """ + Sudanese Pound (SDG). + """ + SDG + + """ + Swedish Kronor (SEK). + """ + SEK + + """ + Singapore Dollars (SGD). + """ + SGD + + """ + Saint Helena Pounds (SHP). + """ + SHP + + """ + Sierra Leonean Leone (SLL). + """ + SLL + + """ + Somali Shilling (SOS). + """ + SOS + + """ + Surinamese Dollar (SRD). + """ + SRD + + """ + South Sudanese Pound (SSP). + """ + SSP + + """ + Sao Tome And Principe Dobra (STD). + """ + STD @deprecated(reason: "Use `STN` instead.") + + """ + Sao Tome And Principe Dobra (STN). + """ + STN + + """ + Syrian Pound (SYP). + """ + SYP + + """ + Swazi Lilangeni (SZL). + """ + SZL + + """ + Thai baht (THB). + """ + THB + + """ + Tajikistani Somoni (TJS). + """ + TJS + + """ + Turkmenistani Manat (TMT). + """ + TMT + + """ + Tunisian Dinar (TND). + """ + TND + + """ + Tongan Pa'anga (TOP). + """ + TOP + + """ + Turkish Lira (TRY). + """ + TRY + + """ + Trinidad and Tobago Dollars (TTD). + """ + TTD + + """ + Taiwan Dollars (TWD). + """ + TWD + + """ + Tanzanian Shilling (TZS). + """ + TZS + + """ + Ukrainian Hryvnia (UAH). + """ + UAH + + """ + Ugandan Shilling (UGX). + """ + UGX + + """ + United States Dollars (USD). + """ + USD + + """ + United States Dollars Coin (USDC). + """ + USDC + + """ + Uruguayan Pesos (UYU). + """ + UYU + + """ + Uzbekistan som (UZS). + """ + UZS + + """ + Venezuelan Bolivares (VED). + """ + VED + + """ + Venezuelan Bolivares (VEF). + """ + VEF @deprecated(reason: "Use `VES` instead.") + + """ + Venezuelan Bolivares Soberanos (VES). + """ + VES + + """ + Vietnamese đồng (VND). + """ + VND + + """ + Vanuatu Vatu (VUV). + """ + VUV + + """ + Samoan Tala (WST). + """ + WST + + """ + Central African CFA Franc (XAF). + """ + XAF + + """ + East Caribbean Dollar (XCD). + """ + XCD + + """ + West African CFA franc (XOF). + """ + XOF + + """ + CFP Franc (XPF). + """ + XPF + + """ + Unrecognized currency. + """ + XXX + + """ + Yemeni Rial (YER). + """ + YER + + """ + South African Rand (ZAR). + """ + ZAR + + """ + Zambian Kwacha (ZMW). + """ + ZMW +} + +""" +Represents a currency exchange adjustment applied to an order transaction. +""" +type CurrencyExchangeAdjustment implements Node @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "payment_processing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "payment_processing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "payment_processing") { + """ + 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 @componentName(name: "delivery") { + """ + The default package is the one used to calculate shipping costs on checkout. + """ + default: Boolean = false + + """ + Outside dimensions of the empty shipping package. + """ + dimensions: ObjectDimensionsInput + + """ + Descriptive name for the package. + """ + name: String + + """ + Type of package. + """ + type: ShippingPackageType + + """ + Weight of the empty shipping package. + """ + weight: WeightInput +} + +""" +Possible custom storefront environment types. +""" +enum CustomStorefrontEnvironmentType @componentName(name: "channels") { + """ + The environment is used by a specific non-production branch. + """ + CUSTOM + + """ + The environment has no associated branch. + """ + PREVIEW + + """ + The environment is used by your production branch. + """ + PRODUCTION +} + +""" +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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @protectedField(subject: "customer", content: "name") + + """ + The customer's email address. + """ + email: String @deprecated(reason: "Use `defaultEmailAddress.emailAddress` instead.") @protectedField(subject: "customer", content: "email") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): EventConnection! + + """ + The customer's first name. + """ + firstName: String @protectedField(subject: "customer", content: "name") + + """ + 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 identity provider subject identifiers associated with this customer. + """ + identityProviderSubjects: [IdentityProviderSubject!]! + + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) + (`ChannelInformation.channelDefinition.handle`) field. | | | - + `channel:web`
- `channel:web,pos` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | 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"` | + | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) + field. | | | - `name:1001-A` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) + of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). + | - `has_issues`
- `no_issues`
- `not_validated` | | - + `shipping_address_validation_result_summary:no_issues` | + | 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` | + | 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` | + | 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` | + | status | string | Filter by the order's status to manage workflows or + analyze the order lifecycle. | - `open`
- `closed`
- + `cancelled`
- `not_closed` | | - `status:open` | + | 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` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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! + + """ + A list of the customer's payment methods. + """ + paymentMethods( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Whether to show the customer's revoked payment method. + """ + showRevoked: Boolean = false + + """ + When true, shows unrevoked payment methods and revoked payment methods that + are connected to future payments. Overrides the `showRevoked` argument. + """ + showWithPreauthorizedPayments: Boolean = false + ): CustomerPaymentMethodConnection! + + """ + The customer's phone number. + """ + phone: String @deprecated(reason: "Use `defaultPhoneNumber.phoneNumber` instead.") @protectedField(subject: "customer", content: "phone") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | currency_code | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): StoreCreditAccountConnection! + + """ + A list of the customer's subscription contracts. + """ + subscriptionContracts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 customer's tax settings. + """ + taxSettings: TaxSettings! + + """ + The URL to unsubscribe the customer from the mailing list. + """ + unsubscribeUrl: URL! @deprecated(reason: "Use `defaultEmailAddress.marketingUnsubscribeUrl` instead.") @requiredAccess(scope: "`write_customers` access scope. Also: User needs create_and_edit_customers permission.") + + """ + 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { + """ + 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { + """ + 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 @componentName(name: "online_store") { + """ + An orders page type. + """ + NATIVE_ORDERS + + """ + A profile page type. + """ + NATIVE_PROFILE + + """ + A settings page type. + """ + NATIVE_SETTINGS + + """ + 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + 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 @componentName(name: "customers") { + """ + 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 @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerAddressCreate` mutation. +""" +type CustomerAddressCreatePayload @componentName(name: "platform") { + """ + The created address. + """ + address: MailingAddress + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerAddressDelete` mutation. +""" +type CustomerAddressDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The updated address. + """ + address: MailingAddress + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The data sharing preferences set by the merchant. +""" +type CustomerBehaviorTrackingPreference @componentName(name: "merchant_marketing") @privatelyDocumented { + """ + The data sharing level set by the merchant. + """ + dataSharingLevel: CustomerDataSharingLevel! +} + +""" +Possible error codes that can be returned by `CustomerCancelDataErasureUserError`. +""" +enum CustomerCancelDataErasureErrorCode @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customer_data_erasure` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + The customer consent was collected outside of Shopify. + """ + OTHER + + """ + The customer consent was collected by Shopify. + """ + SHOPIFY +} + +""" +Return type for `customerCreate` mutation. +""" +type CustomerCreatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + 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! @protectedField(subject: "customer", content: "name") + + """ + 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String @protectedField(subject: "customer", content: "address") + + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + The last name in the billing address. + """ + lastName: String @protectedField(subject: "customer", content: "name") + + """ + 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 @protectedField(subject: "customer", content: "address") +} + +""" +The data sharing level set by the merchant. +""" +enum CustomerDataSharingLevel @componentName(name: "merchant_marketing") @privatelyDocumented { + """ + The conservative level. + """ + CONSERVATIVE + + """ + The disabled level. + """ + DISABLED + + """ + The enhanced level. + """ + ENHANCED + + """ + The maximum level. + """ + MAXIMUM +} + +""" +The input fields to delete a customer. +""" +input CustomerDeleteInput @componentName(name: "customers") { + """ + The ID of the customer to delete. + """ + id: ID! @gidTypes(types: ["Customer"]) +} + +""" +Return type for `customerDelete` mutation. +""" +type CustomerDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + The customer's default email address. + """ + emailAddress: String! @protectedField(subject: "customer", content: "email") + + """ + 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! @requiredAccess(scope: "`write_customers` access scope. Also: User needs create_and_edit_customers permission.") + + """ + 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! @requiredAccess(scope: "`write_customers` access scope. Also: User needs create_and_edit_customers permission.") + + """ + 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 @componentName(name: "customers") { + """ + 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 @componentName(name: "customers") { + """ + 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 + + """ + The customer has not specified whether they want to opt in or out of having their open emails tracked. + """ + UNKNOWN +} + +""" +Information that describes when a customer consented to + receiving marketing material by email. +""" +input CustomerEmailMarketingConsentInput @componentName(name: "customers") { + """ + The latest date and time when the customer consented or objected to + receiving marketing material by email. + """ + consentUpdatedAt: DateTime + + """ + 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! + + """ + Identifies the location where the customer consented to receiving marketing material by email. + """ + sourceLocationId: ID @gidTypes(types: ["Location"]) +} + +""" +The record of when a customer consented to receive marketing material by email. +""" +type CustomerEmailMarketingConsentState @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "customers") { + """ + 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! @gidTypes(types: ["Customer"]) + + """ + The marketing consent information when the customer consented to receiving marketing material by email. + """ + emailMarketingConsent: CustomerEmailMarketingConsentInput! +} + +""" +Return type for `customerEmailMarketingConsentUpdate` mutation. +""" +type CustomerEmailMarketingConsentUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + Missing a required argument. + """ + MISSING_ARGUMENT +} + +""" +The possible email marketing states for a customer. +""" +enum CustomerEmailMarketingState @componentName(name: "customers") { + """ + This value is internally-set and read-only. + """ + INVALID + + """ + 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's personal data is erased. This value is internally-set and read-only. + """ + REDACTED + + """ + The customer is subscribed to email marketing. + """ + SUBSCRIBED + + """ + The customer isn't currently subscribed to email marketing but was previously subscribed. + """ + UNSUBSCRIBED +} + +""" +Return type for `customerGenerateAccountActivationUrl` mutation. +""" +type CustomerGenerateAccountActivationUrlPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + 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 ID of the customer. + """ + id: ID + + """ + The phone number of the customer. + """ + phoneNumber: String +} + +""" +The input fields and values to use when creating or updating a customer. +""" +input CustomerInput @componentName(name: "customers") { + """ + 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 + + """ + 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 customer's first name. + """ + firstName: String + + """ + The ID of the customer to update. + """ + id: ID @gidTypes(types: ["Customer"]) + + """ + The customer's last name. + """ + lastName: String + + """ + The customer's locale. + """ + locale: String + + """ + Additional metafields to associate to the customer. + """ + metafields: [MetafieldInput!] + + """ + A unique identifier for the customer that's used with Multipass login. + """ + multipassIdentifier: String + + """ + A note about the customer. + """ + note: String + + """ + The unique phone number for the customer. + """ + phone: String + + """ + 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 + + """ + 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!] +} + +""" +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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "merchant_marketing") @protectedObject(subject: "customer") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "merchant_marketing") @protectedObject(subject: "customer") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CustomerMomentConnection + + """ + 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 @componentName(name: "customers") { + """ + After providing their information, the customer receives a confirmation and is required to + perform a intermediate step before receiving marketing information. + """ + CONFIRMED_OPT_IN + + """ + After providing their information, the customer receives marketing information without any + intermediate steps. + """ + SINGLE_OPT_IN + + """ + The customer receives marketing information but how they were opted in is unknown. + """ + UNKNOWN +} + +""" +The error blocking a customer merge. +""" +type CustomerMergeError @requiredAccess(scope: "The user must have `read_customer_merge` permissions.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + 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 @componentName(name: "platform") { + """ + The customer cannot be merged because it has associated gift cards. + """ + CUSTOMER_HAS_GIFT_CARDS + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The customer cannot be merged. + """ + INVALID_CUSTOMER + + """ + The customer ID is invalid. + """ + INVALID_CUSTOMER_ID + + """ + 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 @componentName(name: "customers") { + """ + The customer is a company contact. + """ + COMPANY_CONTACT + + """ + The customer has payment methods. + """ + CUSTOMER_PAYMENT_METHODS + + """ + The customer does not exist. + """ + DELETED_AT + + """ + The customer has gift cards. + """ + GIFT_CARDS + + """ + The customer has a merge in progress. + """ + MERGE_IN_PROGRESS + + """ + The customer has a multipass identifier. + """ + MULTIPASS_IDENTIFIER + + """ + The override fields are invalid. + """ + OVERRIDE_FIELDS + + """ + The customer has a pending data request. + """ + PENDING_DATA_REQUEST + + """ + The customer has a pending or completed redaction. + """ + REDACTED_AT + + """ + The customer has store credit. + """ + STORE_CREDIT + + """ + The customer has a subscription history. + """ + SUBSCRIPTIONS +} + +""" +The input fields to override default customer merge rules. +""" +input CustomerMergeOverrideFields @componentName(name: "customers") { + """ + The ID of the customer whose default address will be kept. + """ + customerIdOfDefaultAddressToKeep: ID @gidTypes(types: ["Customer"]) + + """ + The ID of the customer whose email will be kept. + """ + customerIdOfEmailToKeep: ID @gidTypes(types: ["Customer"]) + + """ + The ID of the customer whose first name will be kept. + """ + customerIdOfFirstNameToKeep: ID @gidTypes(types: ["Customer"]) + + """ + The ID of the customer whose last name will be kept. + """ + customerIdOfLastNameToKeep: ID @gidTypes(types: ["Customer"]) + + """ + The ID of the customer whose phone number will be kept. + """ + customerIdOfPhoneNumberToKeep: ID @gidTypes(types: ["Customer"]) + + """ + The note to keep. + """ + note: String + + """ + The tags to keep. + """ + tags: [String!] +} + +""" +Return type for `customerMerge` mutation. +""" +type CustomerMergePayload @componentName(name: "platform") { + """ + The asynchronous job for merging the customers. + """ + job: Job + + """ + The ID of the customer resulting from the merge. + """ + resultingCustomerId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [CustomerMergeUserError!]! +} + +""" +A preview of the results of a customer merge request. +""" +type CustomerMergePreview @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + 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 resulting customer ID if the two customers are merged. + """ + resultingCustomerId: ID +} + +""" +The fields that can be used to override the default fields. +""" +type CustomerMergePreviewAlternateFields @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + The default address of a customer. + """ + defaultAddress: MailingAddress + + """ + The email state of a customer. + """ + email: CustomerEmailAddress @protectedField(subject: "customer", content: "email") + + """ + The first name of a customer. + """ + firstName: String @protectedField(subject: "customer", content: "name") + + """ + The last name of a customer. + """ + lastName: String @protectedField(subject: "customer", content: "name") + + """ + The phone number state of a customer. + """ + phoneNumber: CustomerPhoneNumber @protectedField(subject: "customer", content: "phone") +} + +""" +The blocking fields of a customer merge preview. These fields will block customer merge unless edited. +""" +type CustomerMergePreviewBlockingFields @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + 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 @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + The merged addresses resulting from a customer merge. + """ + addresses( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @protectedField(subject: "customer", content: "name") + + """ + The total number of merged draft orders. + """ + draftOrderCount: UnsignedInt64! + + """ + The merged draft orders resulting from a customer merge. + """ + draftOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @protectedField(subject: "customer", content: "email") + + """ + The first name resulting from a customer merge. + """ + firstName: String @protectedField(subject: "customer", content: "name") + + """ + The total number of merged gift cards. + """ + giftCardCount: UnsignedInt64! + + """ + The merged gift cards resulting from a customer merge. + """ + giftCards( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @requiredAccess(scope: "The user must have `read_customer_merge` permissions.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + 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 resulting from the merge. + """ + resultingCustomerId: ID! + + """ + The status of the customer merge request. + """ + status: CustomerMergeRequestStatus! +} + +""" +The status of the customer merge request. +""" +enum CustomerMergeRequestStatus @componentName(name: "customers") { + """ + The customer merge request has been completed. + """ + COMPLETED + + """ + The customer merge request has failed. + """ + FAILED + + """ + The customer merge request is currently in progress. + """ + IN_PROGRESS + + """ + The customer merge request has been requested. + """ + REQUESTED +} + +""" +An error that occurs while merging two customers. +""" +type CustomerMergeUserError implements DisplayableError @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "The user must have `read_customer_merge` permissions.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "merchant_marketing") { + """ + The date and time when the customer's session occurred. + """ + occurredAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple CustomerMoments. +""" +type CustomerMomentConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") = BankAccount | CustomerCreditCard | CustomerPaypalBillingAgreement | CustomerShopPayAgreement + +""" +The billing address of a payment instrument. +""" +type CustomerPaymentInstrumentBillingAddress @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String @protectedField(subject: "customer", content: "address") + + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + 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 @protectedField(subject: "customer", content: "address") +} + +""" +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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionContractConnection! +} + +""" +An auto-generated type for paginating through multiple CustomerPaymentMethods. +""" +type CustomerPaymentMethodConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") @privatelyDocumented { + """ + 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 @componentName(name: "platform") @privatelyDocumented { + """ + 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 @componentName(name: "platform") @privatelyDocumented { + """ + Customer doesn't exist. + """ + CUSTOMER_DOES_NOT_EXIST + + """ + Invalid encrypted duplication data. + """ + INVALID_ENCRYPTED_DUPLICATION_DATA + + """ + Too many requests. + """ + TOO_MANY_REQUESTS +} + +""" +Return type for `customerPaymentMethodCreditCardCreate` mutation. +""" +type CustomerPaymentMethodCreditCardCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "payments") { + """ + 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 @componentName(name: "platform") @privatelyDocumented { + """ + 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 @componentName(name: "platform") @privatelyDocumented { + """ + 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 @componentName(name: "platform") @privatelyDocumented { + """ + Customer doesn't exist. + """ + CUSTOMER_DOES_NOT_EXIST + + """ + Invalid payment instrument. + """ + INVALID_INSTRUMENT + + """ + Must be targeted to another shop in the same organization. + """ + INVALID_ORGANIZATION_SHOP + + """ + Payment method doesn't exist. + """ + PAYMENT_METHOD_DOES_NOT_EXIST + + """ + Target shop cannot be the same as the source. + """ + SAME_SHOP + + """ + Too many requests. + """ + TOO_MANY_REQUESTS +} + +""" +Return type for `customerPaymentMethodGetUpdateUrl` mutation. +""" +type CustomerPaymentMethodGetUpdateUrlPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Customer doesn't exist. + """ + CUSTOMER_DOES_NOT_EXIST + + """ + Invalid payment instrument. + """ + INVALID_INSTRUMENT + + """ + Payment method doesn't exist. + """ + PAYMENT_METHOD_DOES_NOT_EXIST + + """ + Too many requests. + """ + TOO_MANY_REQUESTS +} + +""" +Return type for `customerPaymentMethodPaypalBillingAgreementCreate` mutation. +""" +type CustomerPaymentMethodPaypalBillingAgreementCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "payments") { + """ + The input fields for a remote Adyen customer payment method. + """ + adyenPaymentMethod: RemoteAdyenPaymentMethodInput + + """ + The input fields for a remote authorize net customer profile. + """ + authorizeNetCustomerPaymentProfile: RemoteAuthorizeNetCustomerPaymentProfileInput + + """ + The input fields for a remote Braintree customer profile. + """ + braintreePaymentMethod: RemoteBraintreePaymentMethodInput + + """ + The input fields for a remote PayPal customer payment method. + """ + paypalPaymentMethod: RemotePaypalPaymentMethodInput + + """ + Input containing the fields for a remote stripe credit card. + """ + stripePaymentMethod: RemoteStripePaymentMethodInput +} + +""" +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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") { + """ + 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 @componentName(name: "platform") { + """ + Adyen is not enabled for subscriptions. + """ + ADYEN_NOT_ENABLED_FOR_SUBSCRIPTIONS + + """ + Authorize.net is not enabled for subscriptions. + """ + AUTHORIZE_NET_NOT_ENABLED_FOR_SUBSCRIPTIONS + + """ + The input value is blank. + """ + BLANK + + """ + Braintree is not enabled for subscriptions. + """ + BRAINTREE_NOT_ENABLED_FOR_SUBSCRIPTIONS + + """ + Exactly one remote reference is required. + """ + EXACTLY_ONE_REMOTE_REFERENCE_REQUIRED + + """ + The input value is invalid. + """ + INVALID + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is already taken. + """ + TAKEN +} + +""" +The revocation reason types for a customer payment method. +""" +enum CustomerPaymentMethodRevocationReason @componentName(name: "payments") { + """ + 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 + + """ + Failed to contact Braintree API. + """ + BRAINTREE_API_AUTHENTICATION_ERROR + + """ + The Braintree payment gateway is not enabled. + """ + BRAINTREE_GATEWAY_NOT_ENABLED + + """ + The Braintree payment method type should be a credit card or Apple Pay card. + """ + BRAINTREE_PAYMENT_METHOD_NOT_CARD + + """ + Braintree returned no payment methods. Make sure the correct Braintree account is linked. + """ + BRAINTREE_RETURNED_NO_PAYMENT_METHOD + + """ + The customer redacted their payment method. + """ + CUSTOMER_REDACTED + + """ + CVV attempts limit exceeded. + """ + CVV_ATTEMPTS_LIMIT_EXCEEDED + + """ + The billing address failed to retrieve. + """ + FAILED_TO_RETRIEVE_BILLING_ADDRESS + + """ + The credit card failed to update. + """ + FAILED_TO_UPDATE_CREDIT_CARD + + """ + The payment method was manually revoked. + """ + MANUALLY_REVOKED + + """ + The payment method was replaced with an existing payment method. The + associated contracts have been migrated to the other payment method. + """ + MERGED + + """ + Verification of payment method failed. + """ + PAYMENT_METHOD_VERIFICATION_FAILED + + """ + 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 + + """ + The Stripe payment method type should be card. + """ + STRIPE_PAYMENT_METHOD_NOT_CARD + + """ + Stripe did not return any payment methods. Make sure that the correct Stripe account is linked. + """ + STRIPE_RETURNED_NO_PAYMENT_METHOD + + """ + Verification of the payment method failed due to 3DS not being supported. + """ + THREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTED + + """ + Too many consecutive failed attempts. + """ + TOO_MANY_CONSECUTIVE_FAILURES +} + +""" +Return type for `customerPaymentMethodRevoke` mutation. +""" +type CustomerPaymentMethodRevokePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + 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 @protectedField(subject: "customer", content: "email") +} + +""" +A phone number. +""" +type CustomerPhoneNumber @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + The source from which the SMS marketing information for the customer was collected. + """ + marketingCollectedFrom: CustomerConsentCollectedFrom + + """ + 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 SMS marketing material. + """ + marketingState: CustomerSmsMarketingState! + + """ + 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 + + """ + A customer's phone number. + """ + phoneNumber: String! @protectedField(subject: "customer", content: "phone") + + """ + The location where the customer consented to receive marketing material by SMS. + """ + sourceLocation: Location +} + +""" +The valid tiers for the predicted spend of a customer with a shop. +""" +enum CustomerPredictedSpendTier @componentName(name: "customers") { + """ + 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 zero, or in the lowest spending range for the shop in the following year. + """ + LOW + + """ + The customer's spending is predicted to be in the normal spending range for the shop in the following year. + """ + MEDIUM +} + +""" +The possible product subscription states for a customer, as defined by the customer's subscription contracts. +""" +enum CustomerProductSubscriberStatus @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + The updated customer. + """ + customer: Customer + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `customerReplaceTaxExemptions` mutation. +""" +type CustomerReplaceTaxExemptionsPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Customer does not exist. + """ + DOES_NOT_EXIST + + """ + Failed to request customer data erasure. + """ + FAILED_TO_REQUEST +} + +""" +Return type for `customerRequestDataErasure` mutation. +""" +type CustomerRequestDataErasurePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customer_data_erasure` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "customers") { + """ + Customers with recent purchases, some orders, and moderate spend. + """ + ACTIVE + + """ + Customers without recent purchases, fewer orders, and with lower spend. + """ + ALMOST_LOST + + """ + Customers without recent purchases, but with a strong history of orders and spend. + """ + AT_RISK + + """ + Customers with very recent purchases, many orders, and the most spend. + """ + CHAMPIONS + + """ + Customers without recent orders, with infrequent orders, and with low spend. + """ + DORMANT + + """ + Customers with recent purchases, many orders, and the most spend. + """ + LOYAL + + """ + Customers with recent purchases, some orders, and moderate spend. + """ + NEEDS_ATTENTION + + """ + Customers with very recent purchases, few orders, and low spend. + """ + NEW + + """ + Customers without recent purchases, but with a very strong history of orders and spend. + """ + PREVIOUSLY_LOYAL + + """ + Customers with recent purchases, few orders, and low spend. + """ + PROMISING + + """ + Customers with no orders yet. + """ + PROSPECTS +} + +""" +The set of valid sort keys for the CustomerSavedSearch query. +""" +enum CustomerSavedSearchSortKeys @componentName(name: "platform") { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME +} + +""" +The member of a segment. +""" +type CustomerSegmentMember implements HasMetafields @requiredAccess(scope: "`read_customers` access scope. Also: The user must not have restricted access.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + 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! @protectedField(subject: "customer", content: "name") + + """ + The member's first name. + """ + firstName: String @protectedField(subject: "customer", content: "name") + + """ + The member’s ID. + """ + id: ID! + + """ + The member's last name. + """ + lastName: String @protectedField(subject: "customer", content: "name") + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 @componentName(name: "customers") { + """ + 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 @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope. Also: The user must not have restricted access.") @componentName(name: "customers") { + """ + 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! + + """ + The status of the customer segment members query. + """ + status: CustomerSegmentMembersQueryStatus! +} + +""" +Return type for `customerSegmentMembersQueryCreate` mutation. +""" +type CustomerSegmentMembersQueryCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + 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 + + """ + The ID of the segment. + """ + segmentId: ID @gidTypes(types: ["Segment"]) + + """ + Sort the list by a given key. + """ + sortKey: String +} + +""" +The status of a customer segment members query. +""" +enum CustomerSegmentMembersQueryStatus @componentName(name: "customers") { + """ + The query has completed. + """ + COMPLETED + + """ + The query has been deleted. + """ + DELETED + + """ + The query has failed. + """ + FAILED + + """ + The query has been initialized. + """ + INITIALIZED +} + +""" +Represents a customer segment members query custom error. +""" +type CustomerSegmentMembersQueryUserError implements DisplayableError @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `customerSendAccountInviteEmail` mutation. +""" +type CustomerSendAccountInviteEmailPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields required to identify a customer. +""" +input CustomerSetIdentifiers @oneOf @componentName(name: "customers") { + """ + Custom ID of customer to upsert. + """ + customId: UniqueMetafieldValueInput + + """ + Email address of the customer to upsert. + """ + email: String + + """ + ID of customer to update. + """ + id: ID + + """ + Phone number of the customer to upsert. + """ + phone: String +} + +""" +The input fields and values to use when creating or updating a customer. +""" +input CustomerSetInput @componentName(name: "customers") { + """ + 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.") @gidTypes(types: ["Customer"]) + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + The id field is not allowed if identifier is provided. + """ + ID_NOT_ALLOWED + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The identifier value does not match the value of the corresponding field in the input. + """ + INPUT_MISMATCH + + """ + The input value is invalid. + """ + INVALID + + """ + The input argument `metafields` (if present) must contain the `customId` value. + """ + METAFIELD_MISMATCH + + """ + The input field corresponding to the identifier is required. + """ + MISSING_FIELD_REQUIRED + + """ + Resource matching the identifier was not found. + """ + NOT_FOUND + + """ + 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 +} + +""" +Represents a Shop Pay card instrument for customer payment method. +""" +type CustomerShopPayAgreement @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + 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! @protectedField(subject: "customer", content: "name") +} + +""" +An error that occurs during execution of an SMS marketing consent mutation. +""" +type CustomerSmsMarketingConsentError implements DisplayableError @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + Missing a required argument. + """ + MISSING_ARGUMENT +} + +""" +The marketing consent information when the customer consented to + receiving marketing material by SMS. +""" +input CustomerSmsMarketingConsentInput @componentName(name: "customers") { + """ + 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! + + """ + Identifies the location where the customer consented to receiving marketing material by SMS. + """ + sourceLocationId: ID @gidTypes(types: ["Location"]) +} + +""" +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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { + """ + 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 @componentName(name: "customers") { + """ + 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! @gidTypes(types: ["Customer"]) + + """ + The marketing consent information when the customer consented to receiving marketing material by SMS. + """ + smsMarketingConsent: CustomerSmsMarketingConsentInput! +} + +""" +Return type for `customerSmsMarketingConsentUpdate` mutation. +""" +type CustomerSmsMarketingConsentUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + The customer hasn't subscribed to SMS marketing. + """ + NOT_SUBSCRIBED + + """ + The customer is in the process of subscribing to SMS marketing. + """ + PENDING + + """ + The customer's personal data is erased. This value is internally-set and read-only. + """ + REDACTED + + """ + The customer is subscribed to SMS marketing. + """ + SUBSCRIBED + + """ + The customer isn't currently subscribed to SMS marketing but was previously subscribed. + """ + UNSUBSCRIBED +} + +""" +The set of valid sort keys for the Customer query. +""" +enum CustomerSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "merchant_marketing") @protectedObject(subject: "customer") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @requiredAccess(scope: "`read_privacy_settings` access scope, `read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "privacy") { + """ + If the data sale opt out page is auto managed. + """ + autoManaged: Boolean! +} + +""" +Return type for `dataSaleOptOut` mutation. +""" +type DataSaleOptOutPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Friday. + """ + FRIDAY + + """ + Monday. + """ + MONDAY + + """ + Saturday. + """ + SATURDAY + + """ + Sunday. + """ + SUNDAY + + """ + Thursday. + """ + THURSDAY + + """ + Tuesday. + """ + TUESDAY + + """ + Wednesday. + """ + WEDNESDAY +} + +""" +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 @componentName(name: "apps") { + """ + 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! + + """ + The number of seconds until the delegate access token expires. + """ + expiresIn: Int +} + +""" +Return type for `delegateAccessTokenCreate` mutation. +""" +type DelegateAccessTokenCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The parent access token can't be a delegate token. + """ + DELEGATE_ACCESS_TOKEN + + """ + The access scope can't be empty. + """ + EMPTY_ACCESS_SCOPE + + """ + The delegate token can't expire after the parent token. + """ + EXPIRES_AFTER_PARENT + + """ + The expires_in value must be greater than 0. + """ + NEGATIVE_EXPIRES_IN + + """ + Persistence failed. + """ + PERSISTENCE_FAILED + + """ + The parent access token can't have a refresh token. + """ + REFRESH_TOKEN + + """ + Unknown scopes. + """ + UNKNOWN_SCOPES +} + +""" +Return type for `delegateAccessTokenDestroy` mutation. +""" +type DelegateAccessTokenDestroyPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Access denied. + """ + ACCESS_DENIED + + """ + Access token not found. + """ + ACCESS_TOKEN_NOT_FOUND + + """ + Cannot delete parent access token. + """ + CAN_ONLY_DELETE_DELEGATE_TOKENS + + """ + Persistence failed. + """ + PERSISTENCE_FAILED +} + +""" +The input fields for a delegate access token. +""" +input DelegateAccessTokenInput @componentName(name: "apps") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The supported subject types of deletion events. +""" +enum DeletionEventSubjectType @componentName(name: "platform") { + COLLECTION + PRODUCT +} + +""" +A shipping service and a list of countries that the service is available for. +""" +type DeliveryAvailableService @requiredAccess(scope: "Any of `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "Any of `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + Whether the carrier service is active. + """ + active: Boolean! + + """ + The list of services offered for given destinations. + """ + availableServicesForCountries( + """ + The country codes of the destinations. + """ + countryCodes: [CountryCode!] + + """ + The locations of the possible origins. + """ + origins: [ID!] @gidTypes(types: ["Location"]) + + """ + 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( + """ + The country codes of the destinations. + """ + countryCodes: [CountryCode!] + ): 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 @requiredAccess(scope: "Any of `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "delivery") { + """ + Whether this carrier service is active. If `true`, then the service will be available to serve rates in checkout. + """ + active: Boolean! + + """ + The URL endpoint that Shopify needs to retrieve shipping rates. This must be a public URL. + """ + callbackUrl: URL! + + """ + The name of the shipping service as seen by merchants and their customers. + """ + name: String! + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean! +} + +""" +An auto-generated type which holds one DeliveryCarrierService and a cursor during pagination. +""" +type DeliveryCarrierServiceEdge @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + Whether this carrier service is active. If `true`, then the service will be available to serve rates in checkout. + """ + active: Boolean + + """ + The URL endpoint that Shopify needs to retrieve shipping rates. This must be a public URL. + """ + callbackUrl: URL + + """ + The global ID of the carrier service to update. + """ + id: ID! @gidTypes(types: ["CarrierService"]) + + """ + The name of the shipping service as seen by merchants and their customers. + """ + name: String + + """ + Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. + """ + supportsServiceDiscovery: Boolean +} + +""" +A condition that must pass for a delivery method definition to be applied to an order. +""" +type DeliveryCondition implements Node @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") = MoneyV2 | Weight + +""" +The field type that the condition will be applied to. +""" +enum DeliveryConditionField @componentName(name: "delivery") { + """ + The condition will check against the total price of the order. + """ + TOTAL_PRICE + + """ + The condition will check against the total weight of the order. + """ + TOTAL_WEIGHT +} + +""" +The operator to use to determine if the condition passes. +""" +enum DeliveryConditionOperator @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + The country code of the country in the ISO 3166-1 alpha-2 format. + """ + code: CountryCode + + """ + Associate all available provinces with this country. + """ + includeAllProvinces: Boolean + + """ + The regions associated with this country. + """ + provinces: [DeliveryProvinceInput!] + + """ + Whether the country is a part of the 'Rest of World' shipping zone. + """ + restOfWorld: Boolean +} + +""" +A delivery customization. +""" +type DeliveryCustomization implements HasMetafieldDefinitions & HasMetafields & Node @requiredAccess(scope: "`read_delivery_customizations` access scope.") @componentName(name: "delivery") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + The Shopify Function implementing the delivery customization. + """ + shopifyFunction: ShopifyFunction! + + """ + The title of the delivery customization. + """ + title: String! +} + +""" +Return type for `deliveryCustomizationActivation` mutation. +""" +type DeliveryCustomizationActivationPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "`read_delivery_customizations` access scope.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "platform") { + """ + Shop must be on a Shopify Plus plan to activate functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Shop must be on a Shopify Plus plan to activate delivery customizations from a custom app. + """ + DELIVERY_CUSTOMIZATION_FUNCTION_NOT_ELIGIBLE + + """ + Delivery customization not found. + """ + DELIVERY_CUSTOMIZATION_NOT_FOUND + + """ + Function does not implement the required interface for this delivery customization. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """ + Function ID cannot be changed. + """ + FUNCTION_ID_CANNOT_BE_CHANGED + + """ + Function not found. + """ + FUNCTION_NOT_FOUND + + """ + Function is pending deletion. + """ + FUNCTION_PENDING_DELETION + + """ + The input value is invalid. + """ + INVALID + + """ + Could not create or update metafields. + """ + INVALID_METAFIELDS + + """ + Maximum delivery customizations are already enabled. + """ + MAXIMUM_ACTIVE_DELIVERY_CUSTOMIZATIONS + + """ + 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 + + """ + Required input field must be present. + """ + REQUIRED_INPUT_FIELD + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +The input fields to create and update a delivery customization. +""" +input DeliveryCustomizationInput @componentName(name: "delivery") { + """ + The enabled status of the delivery customization. + """ + enabled: Boolean + + """ + Function handle scoped to your current app ID. Only finds functions within your app. + """ + functionHandle: String + + """ + The ID of the function providing the delivery customization. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + Additional metafields to associate to the delivery customization. + """ + metafields: [MetafieldInput!] = [] + + """ + The title of the delivery customization. + """ + title: String +} + +""" +Return type for `deliveryCustomizationUpdate` mutation. +""" +type DeliveryCustomizationUpdatePayload @componentName(name: "platform") { + """ + Returns the updated delivery customization. + """ + deliveryCustomization: DeliveryCustomization + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DeliveryCustomizationError!]! +} + +""" +Local pickup settings associated with a location. +""" +type DeliveryLocalPickupSettings @requiredAccess(scope: "Any of `locations` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + Custom pickup time. Unrecognized pickup time enum value. + """ + CUSTOM @deprecated(reason: "Custom pickup time is no longer supported.") + + """ + Usually ready in 5+ days. + """ + FIVE_OR_MORE_DAYS + + """ + Usually ready in 4 hours. + """ + FOUR_HOURS + + """ + Usually ready in 1 hour. + """ + ONE_HOUR + + """ + Usually ready in 24 hours. + """ + TWENTY_FOUR_HOURS + + """ + Usually ready in 2 hours. + """ + TWO_HOURS + + """ + Usually ready in 2-4 days. + """ + TWO_TO_FOUR_DAYS +} + +""" +A location group is a collection of locations. They share zones and delivery methods across delivery +profiles. +""" +type DeliveryLocationGroup implements Node @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + A globally-unique ID. + """ + id: ID! + + """ + A list of all locations that are part of this location group. + """ + locations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Whether to include the locations that are deactivated. + """ + includeInactive: Boolean = false + + """ + Whether to include the legacy locations of fulfillment services. + """ + includeLegacy: Boolean = false + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | active | string | + | address1 | string | + | address2 | string | + | city | string | + | country | string | + | created_at | time | + | geolocated | boolean | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | legacy | boolean | + | location_id | id | + | name | string | + | pickup_in_store | string | | - `enabled`
- `disabled` | + | province | string | + | zip | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): LocationConnection! + + """ + A count of all locations that are part of this location group. + """ + locationsCount: Int! +} + +""" +Links a location group with a zone and the associated method definitions. +""" +type DeliveryLocationGroupZone @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + The number of method definitions for the zone. + """ + methodDefinitionCounts: DeliveryMethodDefinitionCounts! + + """ + The method definitions associated to a zone and location group. + """ + methodDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + Return only eligible or ineligible method definitions. + """ + eligible: Boolean + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + Return only merchant or participant method definitions. + """ + type: DeliveryMethodDefinitionType + ): DeliveryMethodDefinitionConnection! + + """ + The zone associated to a location group. + """ + zone: DeliveryZone! +} + +""" +An auto-generated type for paginating through multiple DeliveryLocationGroupZones. +""" +type DeliveryLocationGroupZoneConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + A list of countries to associate with the zone. + """ + countries: [DeliveryCountryInput!] + + """ + A globally-unique ID of the zone. + """ + id: ID @gidTypes(types: ["Zone"]) + + """ + A list of method definitions to create. + """ + methodDefinitionsToCreate: [DeliveryMethodDefinitionInput!] + + """ + A list of method definitions to update. + """ + methodDefinitionsToUpdate: [DeliveryMethodDefinitionInput!] + + """ + The name of the zone. + """ + name: String +} + +""" +The input fields for a local pickup setting associated with a location. +""" +input DeliveryLocationLocalPickupEnableInput @componentName(name: "delivery") { + """ + The instructions for the local pickup. + """ + instructions: String + + """ + The ID of the location associated with the location setting. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + The time of the local pickup. + """ + pickupTime: DeliveryLocalPickupTime! +} + +""" +Represents an error that happened when changing local pickup settings for a location. +""" +type DeliveryLocationLocalPickupSettingsError implements DisplayableError @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "platform") { + """ + 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 HasMetafields & Node @requiredAccess(scope: "`read_orders` access scope, `read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "delivery") { + """ + 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 + + """ + This represents the pickup point for the delivery. It returns null when the + delivery method doesn't utilize a pickup point generated by a delivery option + generator, or when the used pickup point isn't generated by a delivery option + generator owned by the requesting app. + """ + deliveryOptionGeneratorPickupPoint: DeliveryOptionGeneratorPickupPoint + + """ + 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 + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 @componentName(name: "delivery") @protectedObject(subject: "customer") { + """ + The delivery instructions to follow when performing the delivery. + """ + instructions: String + + """ + The phone number to contact when performing the delivery. + """ + phone: String @protectedField(subject: "customer", content: "phone") +} + +""" +A method definition contains the delivery rate and the conditions that must be met for the method to be +applied. +""" +type DeliveryMethodDefinition implements Node @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + Whether this method definition is active. + """ + active: Boolean! + + """ + The currency used in this method definition. + """ + currencyCode: CurrencyCode + + """ + The description of the method definition. Only available on shipping rates that are custom. + """ + description: String + + """ + The conditions that must pass for free delivery to be applied to an order. + """ + freeConditions: [DeliveryRateRangeCondition!]! + + """ + 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 rate groups that make up this method definition. + """ + rateGroups( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DeliveryRateGroupConnection + + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + Whether to use this method definition during rate calculation. + """ + active: Boolean + + """ + A list of conditions to update on the method definition. + """ + conditionsToUpdate: [DeliveryUpdateConditionInput!] + + """ + The currency used for this method definition, as well as all rate definitions, + participants, and rate range conditions in this method definition. + """ + currencyCode: CurrencyCode + + """ + The description of the method definition. + """ + description: String + + """ + A list of at most one `TOTAL_CART_VALUE`-based rate range condition without a + `max` value. If a buyer's cart exceeds this amount, the delivery option will be free. + """ + freeConditions: [DeliveryRateRangeConditionInput!] + + """ + A globally-unique ID of the method definition. Use only when updating a method definition. + """ + id: ID @gidTypes(types: ["MethodDefinition"]) + + """ + The name of the method definition. + """ + name: String + + """ + A participant to apply to the method definition. + """ + participant: DeliveryParticipantInput + + """ + A list of price conditions on the method definition. + """ + priceConditionsToCreate: [DeliveryPriceConditionInput!] + + """ + A rate definition to apply to the method definition. + """ + rateDefinition: DeliveryRateDefinitionInput + + """ + A list of rate groups to create on the method definition. A method definition must have one and only one rate group. + """ + rateGroupsToCreate: [DeliveryRateGroupCreateInput!] + + """ + A list of rate groups to update on the method definition. A method definition must have one and only one rate group. + """ + rateGroupsToUpdate: [DeliveryRateGroupUpdateInput!] + + """ + A list of weight conditions on the method definition. + """ + weightConditionsToCreate: [DeliveryWeightConditionInput!] +} + +""" +The different types of method definitions to filter by. +""" +enum DeliveryMethodDefinitionType @componentName(name: "delivery") { + """ + A static merchant-defined rate. + """ + MERCHANT + + """ + A dynamic participant rate. + """ + PARTICIPANT +} + +""" +Possible method types that a delivery method can have. +""" +enum DeliveryMethodType @componentName(name: "delivery") { + """ + The order is delivered using a local delivery service. + """ + LOCAL + + """ + Non-physical items, no delivery needed. + """ + NONE + + """ + The order is delivered to a pickup point. + """ + PICKUP_POINT + + """ + The order is picked up by the customer. + """ + PICK_UP + + """ + In-store sale, no delivery needed. + """ + RETAIL + + """ + The order is shipped. + """ + SHIPPING +} + +""" +Represents a delivery option generator pickup point. +""" +type DeliveryOptionGeneratorPickupPoint @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "delivery") { + """ + The ID of the app that owns the function. + """ + appId: ID! + + """ + The external ID of the pickup point. + """ + externalId: String! + + """ + The ID of the pickup point delivery option generator function. + """ + functionId: String! +} + +""" +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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 creating a participant on a rate group. +""" +input DeliveryParticipantCreateInput @componentName(name: "delivery") { + """ + Whether to automatically display new shipping services to the customer when a service becomes available. + """ + adaptToNewServices: Boolean + + """ + The ID of the carrier service for this participant. + """ + carrierServiceId: ID! @gidTypes(types: ["CarrierService"]) + + """ + The fixed fee 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. + """ + services: [DeliveryParticipantServiceInput!] +} + +""" +The input fields for a participant. +""" +input DeliveryParticipantInput @componentName(name: "delivery") { + """ + Whether to automatically display new shipping services to the customer when a service becomes available. + """ + adaptToNewServices: Boolean + + """ + The ID of the carrier service for this participant. + """ + carrierServiceId: ID @gidTypes(types: ["CarrierService"]) + + """ + The fixed feed that's defined by the merchant for this participant. + """ + fixedFee: MoneyInput + + """ + The ID of the participant. + """ + id: ID @gidTypes(types: ["Participant"]) + + """ + The list of shipping services offered by the participant. + """ + participantServices: [DeliveryParticipantServiceInput!] + + """ + The merchant-defined percentage-of-rate fee for this participant. + """ + percentageOfRateFee: Float +} + +""" +A mail service provided by the participant. +""" +type DeliveryParticipantService @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + Whether the service is active. + """ + active: Boolean! + + """ + The name of the service. + """ + name: String! +} + +""" +The input fields for updating a participant. +""" +input DeliveryParticipantUpdateInput @componentName(name: "delivery") { + """ + Whether new services should be included for the participant. + """ + adaptToNewServices: Boolean + + """ + A globally-unique ID of the carrier service. + """ + carrierServiceId: ID @gidTypes(types: ["CarrierService"]) + + """ + The fixed fee to charge for the participant. + """ + fixedFee: MoneyInput + + """ + A globally-unique ID of the participant. + """ + id: ID! @gidTypes(types: ["Participant"]) + + """ + The percentage of rate fee to charge for the participant. + """ + percentageOfRateFee: Float + + """ + The list of shipping services offered by the participant. + """ + services: [DeliveryParticipantServiceInput!] +} + +""" +The input fields for a price-based condition of a delivery method definition. +""" +input DeliveryPriceConditionInput @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + 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! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DeliveryProfileItemConnection! + + """ + The location groups and associated zones using this profile. + """ + profileLocationGroups( + """ + Filter the location groups of the profile by location group ID. + """ + locationGroupId: ID @gidTypes(types: ["LocationGroup"]) + ): [DeliveryProfileLocationGroup!]! + + """ + Selling plan groups associated with the specified delivery profile. + """ + sellingPlanGroups( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + The list of condition IDs to delete. + """ + conditionsToDelete: [ID!] @gidTypes(types: ["Condition"]) + + """ + 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 deleted from the delivery profile. + """ + locationGroupsToDelete: [ID!] @gidTypes(types: ["LocationGroup"]) + + """ + 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 method definition IDs to delete. + """ + methodDefinitionsToDelete: [ID!] @gidTypes(types: ["MethodDefinition"]) + + """ + The name of the delivery profile. + """ + name: String + + """ + The list of location groups associated with the delivery profile. + """ + profileLocationGroups: [DeliveryProfileLocationGroupInput!] + + """ + The list of selling plan groups to be associated with the delivery profile. + """ + sellingPlanGroupsToAssociate: [ID!] @gidTypes(types: ["SellingPlanGroup"]) + + """ + The list of selling plan groups to be dissociated with the delivery profile. + """ + sellingPlanGroupsToDissociate: [ID!] @gidTypes(types: ["SellingPlanGroup"]) + + """ + The list of product variant IDs to be associated with the delivery profile. + """ + variantsToAssociate: [ID!] @gidTypes(types: ["ProductVariant"]) + + """ + 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!] @gidTypes(types: ["ProductVariant"]) + + """ + The list of zone IDs to delete. + """ + zonesToDelete: [ID!] @gidTypes(types: ["Zone"]) +} + +""" +A product and the subset of associated variants that are part of this delivery profile. +""" +type DeliveryProfileItem implements Node @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + A globally-unique ID. + """ + id: ID! + + """ + A product associated with this profile. + """ + product: Product! + + """ + The product variants associated with this delivery profile. + """ + variants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductVariantConnection! +} + +""" +An auto-generated type for paginating through multiple DeliveryProfileItems. +""" +type DeliveryProfileItemConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "delivery") { + """ + The globally-unique ID of the delivery profile location group. + """ + id: ID @gidTypes(types: ["LocationGroup"]) + + """ + The list of location IDs to be moved to this location group. + """ + locations: [ID!] @gidTypes(types: ["Location"]) + + """ + 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!] @gidTypes(types: ["Location"]) + + """ + 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!] @gidTypes(types: ["Location"]) + + """ + 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 @componentName(name: "platform") { + """ + The delivery profile deletion job triggered by the mutation. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The set of valid sort keys for the DeliveryProfile query. +""" +enum DeliveryProfileSortKeys @componentName(name: "platform") { + """ + 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 `deliveryProfileUpdate` mutation. +""" +type DeliveryProfileUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_delivery_promises` access scope.") @componentName(name: "delivery") { + """ + The branded promise handle of the promise participant. + """ + brandedPromiseHandle: String! + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "`read_delivery_promises` access scope.") @componentName(name: "delivery") = ProductVariant + +""" +The type of object that the participant is attached to. +""" +enum DeliveryPromiseParticipantOwnerType @componentName(name: "delivery") { + """ + A product variant. + """ + PRODUCTVARIANT +} + +""" +Return type for `deliveryPromiseParticipantsUpdate` mutation. +""" +type DeliveryPromiseParticipantsUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_delivery_promises` access scope.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The time zone is invalid. + """ + INVALID_TIME_ZONE + + """ + The location doesn't belong to the app. + """ + MUST_BELONG_TO_APP + + """ + 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 delivery promise settings. +""" +type DeliveryPromiseSetting @requiredAccess(scope: "`read_shipping` access scope or `read_shop_promise_program` access scope.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + 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 @componentName(name: "delivery") { + """ + The code of the region. + """ + code: String! +} + +""" +The rate class of a rate definition. +""" +type DeliveryRateClass @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + A globally-unique ID. + """ + id: ID! + + """ + The maximum transit time in seconds. + """ + maxTransitTime: Int! + + """ + The minimum transit time in seconds. + """ + minTransitTime: Int! + + """ + Name of the rate class. + """ + name: String! +} + +""" +The merchant-defined rate of the [DeliveryMethodDefinition](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryMethodDefinition). +""" +type DeliveryRateDefinition implements Node @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + The conditions that must pass for this rate definition to be applied to an order. + """ + conditions: [DeliveryRateRangeCondition!]! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The maximum transit time of the rate in seconds. + """ + maxTransitTime: Int + + """ + The minimum transit time of the rate in seconds. + """ + minTransitTime: Int + + """ + The price of this rate. + """ + price: MoneyV2! + + """ + The class of the rate. The corresponding delivery method definition must have the same name. + """ + rateClass: DeliveryRateClass +} + +""" +The input fields for creating a rate definition on a rate group. +""" +input DeliveryRateDefinitionCreateInput @componentName(name: "delivery") { + """ + The rate range conditions for the rate definition. + """ + conditions: [DeliveryRateRangeConditionInput!] + + """ + The maximum transit time of the rate in seconds. + """ + maxTransitTime: Int + + """ + The minimum transit time of the rate in seconds. + """ + minTransitTime: Int + + """ + The price of the rate definition. The currency must match the currency of the + method definition this rate definition is in. + """ + price: MoneyInput! +} + +""" +The input fields for a rate definition. +""" +input DeliveryRateDefinitionInput @componentName(name: "delivery") { + """ + A globally-unique ID of the rate definition. + """ + id: ID @gidTypes(types: ["RateDefinition"]) + + """ + The price of the rate definition. + """ + price: MoneyInput! +} + +""" +The input fields for updating a rate definition. +""" +input DeliveryRateDefinitionUpdateInput @componentName(name: "delivery") { + """ + The rate range conditions for the rate definition. + """ + conditions: [DeliveryRateRangeConditionInput!] + + """ + A globally-unique ID of the rate definition. + """ + id: ID! @gidTypes(types: ["RateDefinition"]) + + """ + The maximum delivery time in days. + """ + maxTransitTime: Int + + """ + The minimum delivery time in days. + """ + minTransitTime: Int + + """ + The price of the rate definition. The currency must match the currency of the + method definition this rate definition is in. + """ + price: MoneyInput +} + +""" +A group of rates that make up a method definition. +""" +type DeliveryRateGroup @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + Globally unique identifier for this delivery rate group. + """ + id: ID! + + """ + The rate providers that make up this rate group. + """ + rateProviders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DeliveryRateProviderConnection +} + +""" +An auto-generated type for paginating through multiple DeliveryRateGroups. +""" +type DeliveryRateGroupConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryRateGroupEdge!]! + + """ + A list of nodes that are contained in DeliveryRateGroupEdge. 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: [DeliveryRateGroup!]! + + """ + 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 rate group on a method definition. A rate group can +contain either one participant, one rate definition (with or without a rate +range condition), or many rate definitions (so long as they all have a rate +range condition, and those rate range conditions all have the same subject and unit). +""" +input DeliveryRateGroupCreateInput @componentName(name: "delivery") { + """ + A list of at most one participant to create in the rate group. + """ + participantsToCreate: [DeliveryParticipantCreateInput!] + + """ + A list of rate definitions to create in the rate group. If more than one is + created, they must all have a single rate range condition with the same + subject and unit. + """ + rateDefinitionsToCreate: [DeliveryRateDefinitionCreateInput!] +} + +""" +An auto-generated type which holds one DeliveryRateGroup and a cursor during pagination. +""" +type DeliveryRateGroupEdge @componentName(name: "delivery") { + """ + 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 DeliveryRateGroupEdge. + """ + node: DeliveryRateGroup! +} + +""" +The input fields to update a rate group. A rate group can contain either one +participant, one rate definition (with or without a rate range condition), or +many rate definitions (so long as they all have a rate range condition, and +those rate range conditions all have the same subject and unit). +To migrate from a rate group with rate definition(s) to a rate group with a +participant (or vice versa), the original rate definitions (or participant) must +be deleted via `rateDefinitionsToDelete` (or `participantsToDelete`) in the same mutation. +""" +input DeliveryRateGroupUpdateInput @componentName(name: "delivery") { + """ + A globally-unique ID of the rate group to update. + """ + id: ID! @gidTypes(types: ["RateGroup"]) + + """ + A list of at most one participant to create in the rate group. + """ + participantsToCreate: [DeliveryParticipantCreateInput!] + + """ + A list of participants to delete from the rate group. + """ + participantsToDelete: [ID!] @gidTypes(types: ["Participant"]) + + """ + A list of at most one participant to update in the rate group. + """ + participantsToUpdate: [DeliveryParticipantUpdateInput!] + + """ + A list of rate definitions to create in the rate group. If this results in + more than one rate definition in the rate group, they must all have a single + rate range condition with the same subject and unit. + """ + rateDefinitionsToCreate: [DeliveryRateDefinitionCreateInput!] + + """ + A list of rate definitions to delete from the rate group. + """ + rateDefinitionsToDelete: [ID!] @gidTypes(types: ["RateDefinition"]) + + """ + A list of rate definitions to update in the rate group. If this results in + more than one rate definition in the rate group, they must all have a single + rate range condition with the same subject and unit. + """ + rateDefinitionsToUpdate: [DeliveryRateDefinitionUpdateInput!] +} + +""" +A rate provided by a merchant-defined rate or a participant. +""" +union DeliveryRateProvider @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") = DeliveryParticipant | DeliveryRateDefinition + +""" +An auto-generated type for paginating through multiple DeliveryRateProviders. +""" +type DeliveryRateProviderConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DeliveryRateProviderEdge!]! + + """ + A list of nodes that are contained in DeliveryRateProviderEdge. 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: [DeliveryRateProvider!]! + + """ + 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 DeliveryRateProvider and a cursor during pagination. +""" +type DeliveryRateProviderEdge @componentName(name: "delivery") { + """ + 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 DeliveryRateProviderEdge. + """ + node: DeliveryRateProvider! +} + +""" +The rate range condition for a conditionable object. +""" +type DeliveryRateRangeCondition @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + The maximum value for the condition range. + """ + max: DeliveryRateRangeConditionCriteria + + """ + The minimum value for the condition range. + """ + min: DeliveryRateRangeConditionCriteria! + + """ + The subject of the rate range condition. + """ + subject: DeliveryRateRangeConditionSubject! +} + +""" +The value (weight or price) that the condition field is compared to. +""" +union DeliveryRateRangeConditionCriteria @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") = MoneyV2 | Weight + +""" +The input fields for creating a rate range condition. +""" +input DeliveryRateRangeConditionInput @componentName(name: "delivery") { + """ + The maximum value for the condition range. + """ + max: Float + + """ + The minimum value for the condition range. + """ + min: Float! + + """ + The subject of the rate range condition. + """ + subject: DeliveryRateRangeConditionSubject! + + """ + The unit associated with the min and max values that will be used in + comparison. If the subject is `TOTAL_CART_VALUE`, the unit must match the + currency code of the method definition this rate range condition is in. If the + subject is `WEIGHT`, the unit must be a valid weight unit. + """ + unit: String! +} + +""" +The subject of the rate range condition. +""" +enum DeliveryRateRangeConditionSubject @componentName(name: "delivery") { + """ + The condition will check against the package weight of the order. + """ + PACKAGE_WEIGHT + + """ + The condition will check against the total cart value of the order. + """ + TOTAL_CART_VALUE +} + +""" +Return type for `deliverySettingUpdate` mutation. +""" +type DeliverySettingUpdatePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `deliveryShippingOriginAssign` mutation. +""" +type DeliveryShippingOriginAssignPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "delivery") { + """ + 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 + + """ + A globally-unique ID of the condition. + """ + id: ID! @gidTypes(types: ["Condition"]) + + """ + The operator to use for comparison. + """ + operator: DeliveryConditionOperator +} + +""" +The input fields for a weight-based condition of a delivery method definition. +""" +input DeliveryWeightConditionInput @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @componentName(name: "checkouts") = DepositPercentage + +""" +The input fields configuring the deposit for a B2B buyer. +""" +input DepositInput @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The percentage value of the deposit. + """ + percentage: Float! +} + +""" +Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. +""" +enum DigitalWallet @componentName(name: "payment_processing") { + """ + Amazon Pay. + """ + AMAZON_PAY + + """ + Android Pay. + """ + ANDROID_PAY + + """ + Apple Pay. + """ + APPLE_PAY + + """ + Facebook Pay. + """ + FACEBOOK_PAY + + """ + Google Pay. + """ + GOOGLE_PAY + + """ + Shopify Pay. + """ + SHOPIFY_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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + The discount is applied at the line level. + Line level discounts are factored into the discountedUnitPriceSet on line items. + """ + LINE + + """ + The discount is applied at the order level. + Order level discounts are not factored into the discountedUnitPriceSet on line items. + """ + ORDER +} + +""" +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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountAutomaticApp | DiscountAutomaticBasic | DiscountAutomaticBxgy | DiscountAutomaticFreeShipping + +""" +Return type for `discountAutomaticActivate` mutation. +""" +type DiscountAutomaticActivatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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! + + """ + A list of searchable keywords that are associated with the discount. + For example, a merchant might apply the `loyalty` tag to discounts + that are associated with their loyalty program. + """ + tags: [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! +} + +""" +Return type for `discountAutomaticAppCreate` mutation. +""" +type DiscountAutomaticAppCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + Whether the discount applies on one-time purchases. + """ + appliesOnOneTimePurchase: Boolean = true + + """ + 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 + + """ + 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), + and the product discount tags that determine which product discounts can apply + together on the same cart line. + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 + + """ + Determines which discount effects the discount can apply. + """ + 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 handle of the function providing the discount. + """ + functionHandle: String + + """ + The ID of the function providing the discount. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + 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!] = [] + + """ + 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 + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + A list of searchable keywords that are associated with the discount. + + Use these tags on product discounts to determine which other product discounts can + apply to the same cart line when you configure + `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. + + For example, you can apply a `loyalty` tag to discounts + that are associated with a loyalty program. + + Updating `tags` overwrites any existing tags that were previously added to the discount. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String +} + +""" +Return type for `discountAutomaticAppUpdate` mutation. +""" +type DiscountAutomaticAppUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 + + """ + 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! + + """ + 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! + + """ + A list of searchable keywords that are associated with the discount. + For example, a merchant might apply the `loyalty` tag to discounts + that are associated with their loyalty program. + """ + tags: [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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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), + and the product discount tags that determine which product discounts can apply + together on the same cart line. + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 + + """ + Information about the qualifying items and their discount. + """ + customerGets: DiscountCustomerGetsInput + + """ + 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: DiscountMinimumRequirementInput + + """ + 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 + + """ + A list of searchable keywords that are associated with the discount. + + Use these tags on product discounts to determine which other product discounts can + apply to the same cart line when you configure + `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. + + For example, you can apply a `loyalty` tag to discounts + that are associated with a loyalty program. + + Updating `tags` overwrites any existing tags that were previously added to the discount. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String +} + +""" +Return type for `discountAutomaticBasicUpdate` mutation. +""" +type DiscountAutomaticBasicUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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! + + """ + A list of searchable keywords that are associated with the discount. + For example, a merchant might apply the `loyalty` tag to discounts + that are associated with their loyalty program. + """ + tags: [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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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), + and the product discount tags that determine which product discounts can apply + together on the same cart line. + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 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 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 date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + A list of searchable keywords that are associated with the discount. + + Use these tags on product discounts to determine which other product discounts can + apply to the same cart line when you configure + `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. + + For example, you can apply a `loyalty` tag to discounts + that are associated with a loyalty program. + + Updating `tags` overwrites any existing tags that were previously added to the discount. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The maximum number of times that the discount can be applied to an order. + """ + usesPerOrderLimit: UnsignedInt64 +} + +""" +Return type for `discountAutomaticBxgyUpdate` mutation. +""" +type DiscountAutomaticBxgyUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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! + + """ + A list of searchable keywords that are associated with the discount. + For example, a merchant might apply the `loyalty` tag to discounts + that are associated with their loyalty program. + """ + tags: [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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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 + [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 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 + + """ + A list of destinations where the discount will apply. + """ + destination: DiscountShippingDestinationSelectionInput + + """ + 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 maximum shipping price that qualifies for the discount. + """ + maximumShippingPrice: Decimal + + """ + The minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """ + 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 + + """ + A list of searchable keywords that are associated with the discount. + + Use these tags on product discounts to determine which other product discounts can + apply to the same cart line when you configure + `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. + + For example, you can apply a `loyalty` tag to discounts + that are associated with a loyalty program. + + Updating `tags` overwrites any existing tags that were previously added to the discount. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String +} + +""" +Return type for `discountAutomaticFreeShippingUpdate` mutation. +""" +type DiscountAutomaticFreeShippingUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! +} + +""" +An auto-generated type for paginating through multiple DiscountAutomaticNodes. +""" +type DiscountAutomaticNodeConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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! +} + +""" +Return type for `discountBulkTagsAdd` mutation. +""" +type DiscountBulkTagsAddPayload @componentName(name: "platform") { + """ + The asynchronous job that adds the tags. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +Return type for `discountBulkTagsRemove` mutation. +""" +type DiscountBulkTagsRemovePayload @componentName(name: "platform") { + """ + The asynchronous job that removes the tags. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +All buyers are eligible for the discount. +""" +enum DiscountBuyerSelection @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + 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 + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + PRODUCT + + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping + +""" +Return type for `discountCodeActivate` mutation. +""" +type DiscountCodeActivatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | times_used | integer | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): 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! + + """ + A list of searchable keywords that are associated with the discount. + For example, a merchant might apply the `loyalty` tag to discounts + that are associated with their loyalty program. + """ + tags: [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 `discountCodeAppCreate` mutation. +""" +type DiscountCodeAppCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + Whether the discount applies on regular one-time-purchase items. + """ + appliesOnOneTimePurchase: Boolean = true + + """ + Whether the discount applies to subscriptions items. + """ + appliesOnSubscription: Boolean = true + + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + 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), + and the product discount tags that determine which product discounts can apply + together on the same cart line. + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 customers that can use the discount. + """ + customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") + + """ + Determines which discount effects the discount can apply. + """ + 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 handle of the function providing the discount. + """ + functionHandle: String + + """ + The ID of the function providing the discount. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + 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!] = [] + + """ + 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 + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + A list of searchable keywords that are associated with the discount. + + Use these tags on product discounts to determine which other product discounts can + apply to the same cart line when you configure + `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. + + For example, you can apply a `loyalty` tag to discounts + that are associated with a loyalty program. + + Updating `tags` overwrites any existing tags that were previously added to the discount. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeAppUpdate` mutation. +""" +type DiscountCodeAppUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | times_used | integer | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): 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! + + """ + A list of searchable keywords that are associated with the discount. + For example, a merchant might apply the `loyalty` tag to discounts + that are associated with their loyalty program. + """ + tags: [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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + 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), + and the product discount tags that determine which product discounts can apply + together on the same cart line. + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGetsInput + + """ + The customers that can use the discount. + """ + customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") + + """ + 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: DiscountMinimumRequirementInput + + """ + 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 + + """ + A list of searchable keywords that are associated with the discount. + + Use these tags on product discounts to determine which other product discounts can + apply to the same cart line when you configure + `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. + + For example, you can apply a `loyalty` tag to discounts + that are associated with a loyalty program. + + Updating `tags` overwrites any existing tags that were previously added to the discount. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeBasicUpdate` mutation. +""" +type DiscountCodeBasicUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | times_used | integer | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): 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!]! + + """ + An abbreviated version of the discount + [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBxgy#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! + + """ + A list of searchable keywords that are associated with the discount. + For example, a merchant might apply the `loyalty` tag to discounts + that are associated with their loyalty program. + """ + tags: [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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + Whether a customer can only use the discount once. + """ + appliesOncePerCustomer: Boolean + + """ + The code that customers use to apply the discount. + """ + code: String + + """ + 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), + and the product discount tags that determine which product discounts can apply + together on the same cart line. + """ + combinesWith: DiscountCombinesWithInput + + """ + 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 customers that can use the discount. + """ + customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") + + """ + 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 date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + A list of searchable keywords that are associated with the discount. + + Use these tags on product discounts to determine which other product discounts can + apply to the same cart line when you configure + `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. + + For example, you can apply a `loyalty` tag to discounts + that are associated with a loyalty program. + + Updating `tags` overwrites any existing tags that were previously added to the discount. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + 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 `discountCodeBxgyUpdate` mutation. +""" +type DiscountCodeBxgyUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | times_used | integer | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): 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! + + """ + A list of searchable keywords that are associated with the discount. + For example, a merchant might apply the `loyalty` tag to discounts + that are associated with their loyalty program. + """ + tags: [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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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 code that customers use to apply the discount. + """ + code: String + + """ + 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 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 customers that can use the discount. + """ + customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") + + """ + 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 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 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 minimum subtotal or quantity of items that are required for the discount to be applied. + """ + minimumRequirement: DiscountMinimumRequirementInput + + """ + 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 + + """ + The date and time when the discount becomes active and is available to customers. + """ + startsAt: DateTime + + """ + A list of searchable keywords that are associated with the discount. + + Use these tags on product discounts to determine which other product discounts can + apply to the same cart line when you configure + `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. + + For example, you can apply a `loyalty` tag to discounts + that are associated with a loyalty program. + + Updating `tags` overwrites any existing tags that were previously added to the discount. + To add new tags without overwriting existing tags, use the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + mutation. + """ + tags: [String!] + + """ + The discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String + + """ + The maximum number of times the discount can be redeemed. + For unlimited usage, specify `null`. + """ + usageLimit: Int +} + +""" +Return type for `discountCodeFreeShippingUpdate` mutation. +""" +type DiscountCodeFreeShippingUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + The underlying code discount object. + """ + codeDiscount: DiscountCode! + + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! +} + +""" +An auto-generated type for paginating through multiple DiscountCodeNodes. +""" +type DiscountCodeNodeConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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! +} + +""" +The input fields for publishing a discount code. +""" +input DiscountCodePublishInput @componentName(name: "pricing") @privatelyDocumented { + """ + The discount code string. + """ + code: String! + + """ + The reason or context of publishing the discount code. + """ + reason: String! +} + +""" +Return type for `discountCodePublish` mutation. +""" +type DiscountCodePublishPayload @componentName(name: "platform") @privatelyDocumented { + """ + The code discount node associated with the published discount code. + """ + codeDiscountNode: DiscountCodeNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountCodePublishUserError!]! +} + +""" +An error that occurs during the execution of `DiscountCodePublish`. +""" +type DiscountCodePublishUserError implements DisplayableError @componentName(name: "platform") @privatelyDocumented { + """ + The error code. + """ + code: DiscountCodePublishUserErrorCode + + """ + 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 `DiscountCodePublishUserError`. +""" +enum DiscountCodePublishUserErrorCode @componentName(name: "platform") @privatelyDocumented { + """ + Discount code not found. + """ + DISCOUNT_CODE_NOT_FOUND + + """ + Invalid channel. + """ + INVALID_CHANNEL + + """ + Invalid discount. + """ + INVALID_DISCOUNT +} + +""" +Return type for `discountCodeRedeemCodeBulkDelete` mutation. +""" +type DiscountCodeRedeemCodeBulkDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CollectionConnection! +} + +""" +The input fields for collections attached to a discount. +""" +input DiscountCollectionsInput @componentName(name: "pricing") { + """ + Specifies list of collection ids to add. + """ + add: [ID!] @gidTypes(types: ["Collection"]) + + """ + Specifies list of collection ids to remove. + """ + remove: [ID!] @gidTypes(types: ["Collection"]) +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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! + + """ + Controls which product discounts can apply together on the same cart line. By + default, only one product discount applies per line. Available only on a Shopify + Plus plan and requires the `productDiscounts` field to be set to `true`. + + For discounts to apply together, they must match tags in both directions. Each + discount has two tag sets: the tags that identify the discount, and the tags that + it agrees to apply with. Use the `tags` field on the discount input to set the + discount's own tags. This field returns the tags that this discount agrees to + apply with. Two discounts apply together only if each one allows at least one tag + that the other is tagged with. Any number of product discounts can apply to the + same line if this two-way match holds for every pair in the group. + + Example: Discount A is tagged with `LOYALTY` and allows `SEASONAL`, and Discount B + is tagged with `SEASONAL` and allows `LOYALTY`. They apply together. To add a + third discount, it must meet the same mutual-match rule with both A and B. + """ + productDiscountsWithTagsOnSameCartLine: [String!] + + """ + 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 @componentName(name: "pricing") { + """ + 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 + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + productDiscounts: Boolean = false + + """ + Controls which product discounts can apply together on the same cart line. By + default, only one product discount applies per line. Available only on a Shopify + Plus plan and requires the `productDiscounts` field to be set to `true`. + + For discounts to apply together, they must match tags in both directions. Each + discount has two tag sets: the tags that identify the discount, and the tags that + it agrees to apply with. Use the `tags` field on the discount input to set the + discount's own tags. Use this field to set the tags that the discount can apply + with. Two discounts apply together only if each one allows at least one tag that + the other is tagged with. Any number of product discounts can apply to the same + line if this two-way match holds for every pair in the group. + + Example: Discount A is tagged with `LOYALTY` and allows `SEASONAL`, and Discount B + is tagged with `SEASONAL` and allows `LOYALTY`. They apply together. To add a + third discount, it must meet the same mutual-match rule with both A and B. + """ + productDiscountsWithTagsOnSameCartLine: ProductDiscountsWithTagsOnSameCartLineInput + + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountBuyerSelectionAll | DiscountCustomerSegments | DiscountCustomers | DiscountMarkets + +""" +The input fields for the buyers who can use this discount. +""" +input DiscountContextInput @oneOf @componentName(name: "pricing") { + """ + All buyers are eligible for this discount. + """ + all: DiscountBuyerSelection + + """ + The list of customer segment IDs to add or remove from the list of customer segments. + """ + customerSegments: DiscountCustomerSegmentsInput + + """ + The list of customer IDs to add or remove from the list of customers. + """ + customers: DiscountCustomersInput + + """ + The list of market IDs to add or remove from the list of markets. + """ + markets: DiscountMarketsInput +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + The country codes to add to the list of countries where the discount applies. + """ + add: [CountryCode!] + + """ + Whether the discount code is applicable to countries that haven't been defined in the shop's shipping zones. + """ + includeRestOfWorld: Boolean = false + + """ + The country codes to remove from the list of countries where the discount applies. + """ + remove: [CountryCode!] +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + 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 IDs of items that the customer buys. The items can be either collections or products. + """ + items: DiscountItemsInput + + """ + The quantity of prerequisite items. + """ + value: DiscountCustomerBuysValueInput +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountPurchaseAmount | DiscountQuantity + +""" +The input fields for prerequisite quantity or minimum purchase amount required for the discount. +""" +input DiscountCustomerBuysValueInput @componentName(name: "pricing") { + """ + The prerequisite minimum purchase amount required for the discount to be applicable. + """ + amount: Decimal + + """ + The quantity of prerequisite items. + """ + quantity: UnsignedInt64 +} + +""" +The items in the order that qualify for the discount, their quantities, and the total value of the discount. +""" +type DiscountCustomerGets @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + 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 IDs of the items that the customer gets. The items can be either collections or products. + """ + items: DiscountItemsInput + + """ + The quantity of items discounted and the discount value. + """ + value: DiscountCustomerGetsValueInput +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountAmount | DiscountOnQuantity | DiscountPercentage + +""" +The input fields for the quantity of items discounted and the discount value. +""" +input DiscountCustomerGetsValueInput @componentName(name: "pricing") { + """ + The value of the discount. + + Note: BXGY doesn't support discountAmount. + """ + discountAmount: DiscountAmountInput + + """ + 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 +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + A list of customer segments to add to the current list of customer segments. + """ + add: [ID!] @gidTypes(types: ["Segment"]) + + """ + A list of customer segments to remove from the current list of customer segments. + """ + remove: [ID!] @gidTypes(types: ["Segment"]) +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountCustomerAll | DiscountCustomerSegments | DiscountCustomerSelectionUnknown | DiscountCustomers + +""" +The input fields for the customers who can use this discount. +""" +input DiscountCustomerSelectionInput @componentName(name: "pricing") { + """ + Whether all customers can use this discount. + """ + all: Boolean + + """ + The list of customer segment IDs to add or remove from the list of customer segments. + """ + customerSegments: DiscountCustomerSegmentsInput + + """ + The list of customer IDs to add or remove from the list of customers. + """ + customers: DiscountCustomersInput +} + +""" +An unrecognized customer selection type. Use the `context` field on the parent discount type instead. +""" +type DiscountCustomerSelectionUnknown @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + The underlying customer selection type. + """ + customerSelectionType: String! +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + A list of customers to add to the current list of customers who can use the discount. + """ + add: [ID!] @gidTypes(types: ["Customer"]) + + """ + A list of customers to remove from the current list of customers who can use the discount. + """ + remove: [ID!] @gidTypes(types: ["Customer"]) +} + +""" +The type of discount that will be applied. Currently, only a percentage discount is supported. +""" +union DiscountEffect @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountAmount | DiscountPercentage + +""" +The input fields for how the discount will be applied. Currently, only percentage off is supported. +""" +input DiscountEffectInput @componentName(name: "pricing") { + """ + The value of the discount. + """ + amount: Decimal + + """ + The percentage value of the discount. Value must be between 0.00 - 1.00. + """ + percentage: Float +} + +""" +Possible error codes that can be returned by `DiscountUserError`. +""" +enum DiscountErrorCode @componentName(name: "platform") { + """ + The active period overlaps with other automatic discounts. At any given time, only 25 automatic discounts can be active. + """ + ACTIVE_PERIOD_OVERLAP + + """ + A discount cannot have both appliesOnOneTimePurchase and appliesOnSubscription set to false. + """ + APPLIES_ON_NOTHING + + """ + The input value is blank. + """ + BLANK + + """ + The attribute selection contains conflicting settings. + """ + CONFLICT + + """ + The input value is already present. + """ + DUPLICATE + + """ + The end date should be after the start date. + """ + END_DATE_BEFORE_START_DATE + + """ + The input value should be equal to the value allowed. + """ + EQUAL_TO + + """ + The value exceeded the maximum allowed value. + """ + EXCEEDED_MAX + + """ + 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 value is already present through another selection. + """ + IMPLICIT_DUPLICATE + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + 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 `productDiscounts` field can't be set to false when + `productDiscountsWithTagsOnSameCartLine` tags exist on the discount. + """ + INVALID_PRODUCT_DISCOUNTS_FALSE_WITH_EXISTING_TAGS_ON_SAME_CART_LINE + + """ + The `productDiscountsWithTagsOnSameCartLine` field is only valid for discounts with the PRODUCT discount class. + """ + INVALID_PRODUCT_DISCOUNTS_WITH_TAGS_ON_SAME_CART_LINE_FOR_DISCOUNT_CLASS + + """ + The `productDiscountsWithTagsOnSameCartLine` field can only be specified when `productDiscounts` is true. + """ + INVALID_PRODUCT_DISCOUNTS_WITH_TAGS_ON_SAME_CART_LINE_WITHOUT_PRODUCT_DISCOUNTS + + """ + The tag title exceeds the maximum length of 255 characters. + """ + INVALID_TAG_LENGTH + + """ + 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 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 + + """ + Specify a minimum subtotal or a quantity, but not both. + """ + MINIMUM_SUBTOTAL_AND_QUANTITY_RANGE_BOTH_PRESENT + + """ + Missing a required argument. + """ + MISSING_ARGUMENT + + """ + 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 + + """ + Recurring cycle limit must be 1 when discount does not apply to subscription items. + """ + MULTIPLE_RECURRING_CYCLE_LIMIT_FOR_NON_SUBSCRIPTION_ITEMS + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The shop's plan does not allow setting `productDiscountsWithTagsOnSameCartLine`. + """ + PRODUCT_DISCOUNTS_WITH_TAGS_ON_SAME_CART_LINE_NOT_ENTITLED + + """ + Recurring cycle limit must be a valid integer greater than or equal to 0. + """ + RECURRING_CYCLE_LIMIT_NOT_A_VALID_INTEGER + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + Too many arguments provided. + """ + TOO_MANY_ARGUMENTS + + """ + The number of tags in `productDiscountsWithTagsOnSameCartLine` exceeds the maximum of 10. + """ + TOO_MANY_PRODUCT_DISCOUNTS_WITH_TAGS_ON_SAME_CART_LINE + + """ + The number of tags exceeds the maximum of 5. + """ + TOO_MANY_TAGS + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The value is outside of the allowed range. + """ + VALUE_OUTSIDE_RANGE +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = 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 @componentName(name: "pricing") { + """ + Whether all items should be selected for the discount. Not supported for Buy X get Y discounts. + """ + all: Boolean + + """ + The collections that are attached to a discount. + """ + collections: DiscountCollectionsInput + + """ + 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 +} + +""" +Markets where the discount is available. +""" +type DiscountMarkets @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + The list of markets where the discount is available. + """ + markets( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketConnection! @requiredAccess(scope: "`read_markets` access scope is required.") + + """ + The number of markets where the discount is available. + """ + marketsCount: Int! +} + +""" +The input fields for the markets where the discount is available. +""" +input DiscountMarketsInput @componentName(name: "pricing") { + """ + The list of market IDs to add. + """ + add: [ID!] @gidTypes(types: ["Market"]) + + """ + The list of market IDs to remove. + """ + remove: [ID!] @gidTypes(types: ["Market"]) +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountMinimumQuantity | DiscountMinimumSubtotal + +""" +The input fields for the minimum quantity or subtotal required for a discount. +""" +input DiscountMinimumRequirementInput @componentName(name: "pricing") { + """ + The minimum required quantity. + """ + quantity: DiscountMinimumQuantityInput + + """ + The minimum required subtotal. + """ + subtotal: DiscountMinimumSubtotalInput +} + +""" +The minimum subtotal required for the discount to apply. +""" +type DiscountMinimumSubtotal @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! +} + +""" +An auto-generated type for paginating through multiple DiscountNodes. +""" +type DiscountNodeConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + The percentage value of the discount. + """ + effect: DiscountEffectInput + + """ + The quantity of items that are discounted. + """ + quantity: UnsignedInt64 +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "pricing") { + """ + The IDs of the product variants to add as prerequisites or as eligible items for a discount. + """ + productVariantsToAdd: [ID!] @gidTypes(types: ["ProductVariant"]) + + """ + The IDs of the product variants to remove as prerequisites or as eligible items for a discount. + """ + productVariantsToRemove: [ID!] @gidTypes(types: ["ProductVariant"]) + + """ + The IDs of the products to add as prerequisites or as eligible items for a discount. + """ + productsToAdd: [ID!] @gidTypes(types: ["Product"]) + + """ + The IDs of the products to remove as prerequisites or as eligible items for a discount. + """ + productsToRemove: [ID!] @gidTypes(types: ["Product"]) +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + The code that a customer can use at checkout to receive the associated discount. + """ + code: String! +} + +""" +Reports the status of discount for a Sales Channel or Storefront API. +This might include why a discount is not available in a Sales Channel +and how a merchant might fix this. +""" +type DiscountResourceFeedback @requiredAccess(scope: "`read_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") @componentName(name: "apps") { + """ + The ID of the discount associated with the feedback. + """ + discountId: ID! + + """ + The timestamp of the discount associated with the feedback. + """ + discountUpdatedAt: DateTime! + + """ + 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!]! + + """ + Conveys the state of the feedback and whether it requires merchant action or not. + """ + state: ResourceFeedbackState! +} + +""" +The input fields used to create a discount resource feedback. +""" +input DiscountResourceFeedbackInput @componentName(name: "apps") { + """ + The ID of the channel that the feedback is for. Used to scope feedback to a + specific sales channel when the app has multiple channels. + """ + channelId: ID @gidTypes(types: ["Channel"]) + + """ + The ID of the discount that the feedback was created on. + """ + discountId: ID! @gidTypes(types: ["DiscountNode"]) + + """ + The timestamp of the discount associated with the feedback. + """ + discountUpdatedAt: DateTime! + + """ + 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! + + """ + 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 discounts. + You can specify up to four messages. Each message is limited to 100 characters. + """ + messages: [String!] + + """ + Whether the merchant needs to take action on the discount. + """ + state: ResourceFeedbackState! +} + +""" +A shareable URL for a discount code. +""" +type DiscountShareableUrl @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + The URL lands on a collection page. + """ + COLLECTION + + """ + The URL lands on a home page. + """ + HOME + + """ + The URL lands on a product page. + """ + PRODUCT +} + +""" +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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountCountries | DiscountCountryAll + +""" +The input fields for the destinations where the free shipping discount will be applied. +""" +input DiscountShippingDestinationSelectionInput @componentName(name: "pricing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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 set of valid sort keys for the DiscountTag query. +""" +enum DiscountTagSortKeys @componentName(name: "platform") { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `title` value. + """ + TITLE +} + +""" +The type of line (line item or shipping line) on an order that the subscription discount is applicable towards. +""" +enum DiscountTargetType @componentName(name: "sales") { + """ + The discount applies onto line items. + """ + LINE_ITEM + + """ + The discount applies onto shipping lines. + """ + SHIPPING_LINE +} + +""" +The type of the subscription discount. +""" +enum DiscountType @componentName(name: "sales") { + """ + Automatic discount type. + """ + AUTOMATIC_DISCOUNT + + """ + Code discount type. + """ + CODE_DISCOUNT + + """ + Manual discount type. + """ + MANUAL +} + +""" +An error that occurs during the execution of a discount mutation. +""" +type DiscountUserError implements DisplayableError @componentName(name: "pricing") { + """ + 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! +} + +""" +Return type for `discountsAllocatorFunctionRegister` mutation. +""" +type DiscountsAllocatorFunctionRegisterPayload @componentName(name: "platform") { + """ + Boolean representing whether the discounts allocator function was registered. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountsAllocatorFunctionUserError!]! +} + +""" +Return type for `discountsAllocatorFunctionUnregister` mutation. +""" +type DiscountsAllocatorFunctionUnregisterPayload @componentName(name: "platform") { + """ + Boolean representing whether the discounts allocator function was unregistered. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountsAllocatorFunctionUserError!]! +} + +""" +An error that occurs during the execution of a discounts allocator function mutation. +""" +type DiscountsAllocatorFunctionUserError implements DisplayableError @componentName(name: "pricing") { + """ + The error code. + """ + code: DiscountsAllocatorFunctionUserErrorCode + + """ + 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 `DiscountsAllocatorFunctionUserError`. +""" +enum DiscountsAllocatorFunctionUserErrorCode @componentName(name: "platform") { + """ + The discounts allocator function cannot be found. + """ + FUNCTION_NOT_FOUND + + """ + The shop is not eligible for discounts allocator functions. + """ + INELIGIBLE_SHOP + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The function provided was not a discounts allocator function. + """ + INVALID_FUNCTION_TYPE +} + +""" +Represents an error in the input of a mutation. +""" +interface DisplayableError @componentName(name: "platform") { + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Return type for `disputeEvidenceUpdate` mutation. +""" +type DisputeEvidenceUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + The input value is invalid. + """ + INVALID + + """ + Individual file size is too large. + """ + TOO_LARGE +} + +""" +The possible statuses of a dispute. +""" +enum DisputeStatus @componentName(name: "shopify_payments") { + ACCEPTED + + """ + Status previously used by Stripe to indicate that a dispute led to a refund. + """ + CHARGE_REFUNDED @deprecated(reason: "CHARGE_REFUNDED is no longer supported.") + LOST + NEEDS_RESPONSE + + """ + A dispute that was prevented from becoming a formal chargeback. + """ + PREVENTED + UNDER_REVIEW + WON +} + +""" +The possible types for a dispute. +""" +enum DisputeType @componentName(name: "shopify_payments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "domains") { + """ + 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! +} + +""" +An auto-generated type for paginating through multiple Domains. +""" +type DomainConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [DomainEdge!]! + + """ + A list of nodes that are contained in DomainEdge. 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: [Domain!]! + + """ + 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 Domain and a cursor during pagination. +""" +type DomainEdge @componentName(name: "domains") { + """ + 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 DomainEdge. + """ + node: Domain! +} + +""" +The country and language settings assigned to a domain. +""" +type DomainLocalization @componentName(name: "domains") { + """ + 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! +} + +""" +Return type for `domainVerificationTagInject` mutation. +""" +type DomainVerificationTagInjectPayload @componentName(name: "platform") { + """ + The operation performed on Meta tag. + """ + operation: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DomainVerificationTagInjectUserError!]! +} + +""" +An error that occurs during the execution of `DomainVerificationTagInject`. +""" +type DomainVerificationTagInjectUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: DomainVerificationTagInjectUserErrorCode + + """ + 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 `DomainVerificationTagInjectUserError`. +""" +enum DomainVerificationTagInjectUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The verification code is invalid. + """ + INVALID_VERIFICATION_CODE +} + +""" +Return type for `domainVerificationTagRemove` mutation. +""" +type DomainVerificationTagRemovePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DomainVerificationTagRemoveUserError!]! +} + +""" +An error that occurs during the execution of `DomainVerificationTagRemove`. +""" +type DomainVerificationTagRemoveUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: DomainVerificationTagRemoveUserErrorCode + + """ + 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 `DomainVerificationTagRemoveUserError`. +""" +enum DomainVerificationTagRemoveUserErrorCode @componentName(name: "platform") { + """ + Domain Verification Code doesn't exist. + """ + CODE_NOT_FOUND + + """ + The input value is invalid. + """ + INVALID +} + +""" +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 @requiredAccess(scope: "`read_draft_orders` access scope or `read_quick_sale` access scope.") @componentName(name: "draft_orders") @protectedObject(subject: "customer") { + """ + 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! + + """ + The amount due later. + When there are payment terms, this is the total price minus the deposit amount (if any). + When there are no payment terms, this is 0. + """ + amountDueLaterSet: MoneyBag! + + """ + The amount due now. + When there are payment terms this is the value of the deposit (0 by default). + When there are no payment terms, this is the total price. + """ + amountDueNowSet: MoneyBag! + + """ + 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! + + """ + Whether to bypass cart validations on this draft order. + """ + bypassCartValidations: 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! + + """ + The portion required to be paid at checkout. + """ + deposit: DepositConfiguration + + """ + All discount codes applied. + """ + discountCodes: [String!]! + + """ + The email address of the customer, which is used to send notifications. + """ + email: String @protectedField(subject: "customer", content: "email") + + """ + The list of events associated with the draft order. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The country codes of the extensions. + """ + countryCodes: [CountryCode!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The purpose of the extensions. + """ + purposes: [LocalizationExtensionPurpose!] + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The country codes of the extensions. + """ + countryCodes: [CountryCode!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The purpose of the extensions. + """ + purposes: [LocalizedFieldPurpose!] + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 @protectedField(subject: "customer", content: "phone") + + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + 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 @componentName(name: "draft_orders") { + """ + 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 @componentName(name: "draft_orders") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + 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 @componentName(name: "draft_orders") { + """ + 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 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!] + + """ + 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 selected country code that determines the pricing of the draft order. + """ + marketRegionCountryCode: CountryCode + + """ + The purchasing entity for the draft order. + """ + purchasingEntity: PurchasingEntityInput + + """ + The mailing address to where the order will be shipped. + """ + shippingAddress: MailingAddressInput +} + +""" +Return type for `draftOrderBulkAddTags` mutation. +""" +type DraftOrderBulkAddTagsPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The created draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderCreateMerchantCheckout` mutation. +""" +type DraftOrderCreateMerchantCheckoutPayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `draftOrderCreate` mutation. +""" +type DraftOrderCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "draft_orders") { + """ + The ID of the draft order to delete. + """ + id: ID! @gidTypes(types: ["DraftOrder"]) +} + +""" +Return type for `draftOrderDelete` mutation. +""" +type DraftOrderDeletePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + 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 +} + +""" +Return type for `draftOrderDuplicate` mutation. +""" +type DraftOrderDuplicatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "draft_orders") { + """ + 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! +} + +""" +A generic warning for draft order operations when the specific warning type is unavailable. +""" +type DraftOrderGenericWarning implements DraftOrderWarning @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +The input fields used to create or update a draft order. +""" +input DraftOrderInput @componentName(name: "draft_orders") { + """ + 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 discount codes are allowed during checkout of this draft order. + """ + allowDiscountCodesInCheckout: Boolean + + """ + 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 mailing address associated with the payment method. + """ + billingAddress: MailingAddressInput + + """ + The extra information added to the draft order on behalf of the customer. + """ + customAttributes: [AttributeInput!] + + """ + 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.") @gidTypes(types: ["Customer"]) + + """ + The input fields configuring the deposit requirement. + """ + deposit: DepositInput + + """ + 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!] + + """ + 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 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 selected country code that determines the pricing of the draft order. + """ + marketRegionCountryCode: CountryCode @deprecated(reason: "This field is now incompatible with Markets.\n") + + """ + The list of metafields attached to the draft order. An existing metafield can not be used when creating a draft order. + """ + metafields: [MetafieldInput!] + + """ + The text of an optional note that a shop owner can attach to the draft order. + """ + note: String + + """ + The fields used to create payment terms. + """ + paymentTerms: PaymentTermsInput + + """ + The customer's phone number. + """ + phone: String + + """ + The purchase order number. + """ + poNumber: String + + """ + The payment currency of the customer for this draft order. + """ + presentmentCurrencyCode: CurrencyCode + + """ + The purchasing entity for the draft order. + """ + purchasingEntity: PurchasingEntityInput + + """ + The time after which inventory reservation will expire. + """ + reserveInventoryUntil: DateTime + + """ + The unique token identifying the draft order. + """ + sessionToken: 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 + + """ + The source of the checkout. + To use this field for sales attribution, you must register the channels that your app is managing. + You can register the channels that your app is managing by completing + [this Google Form](https://docs.google.com/forms/d/e/1FAIpQLScmVTZRQNjOJ7RD738mL1lGeFjqKVe_FM2tO9xsm21QEo5Ozg/viewform?usp=sf_link). + After you've submitted your request, you need to wait for your request to be processed by Shopify. + You can find a list of your channels in the Partner Dashboard, in your app's Marketplace extension. + You need to specify the handle as the `source_name` value in your request. + The handle is the channel that the order was placed from. + """ + sourceName: String + + """ + 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 + + """ + Fingerprint to guarantee bundles are handled correctly. + """ + transformerFingerprint: String + + """ + How to handle line items that don't correspond to merchandise in the shop. Defaults to "ERROR". + """ + unavailableMerchandiseStrategy: DraftOrderInputDraftOrderUnavailableMerchandiseStrategy = ERROR + + """ + 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 +} + +""" +Whether to treat unavailable merchandise as an error or a warning when creating, updating, or calculating a +draft order. +""" +enum DraftOrderInputDraftOrderUnavailableMerchandiseStrategy @componentName(name: "draft_orders") { + """ + Merchandise that cannot be added to the draft order should cause an error, and the draft will not be + calculated, created, or updated. + """ + ERROR + + """ + Merchandise that cannot be added to the draft order should add a warning to the draft, and the draft order + may still be calculated, created, or updated. + + If this results in an invalid draft with no line items, an error will still be generated, and the draft will + not be calculated, created, or updated. + """ + WARN +} + +""" +Return type for `draftOrderInvoicePreview` mutation. +""" +type DraftOrderInvoicePreviewPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope or `read_quick_sale` access scope.") @componentName(name: "draft_orders") @protectedObject(subject: "customer") { + """ + 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( + """ + Crops the image according to the specified region. + """ + crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") + + """ + Image height in pixels between 1 and 2048. + """ + maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") + + """ + Image width in pixels between 1 and 2048. + """ + maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 source of the line item's merchandise information. + """ + merchandiseSource: DraftOrderLineItemMerchandiseSourceType! + + """ + 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 ID of the variant associated with the line item. Will still be returned even if the variant has been + deleted since the draft was created or last updated. + """ + variantId: ID + + """ + 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 @componentName(name: "draft_orders") { + """ + 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 + + """ + The ID of the product variant corresponding to the component. + """ + variantId: ID @gidTypes(types: ["ProductVariant"]) +} + +""" +An auto-generated type for paginating through multiple DraftOrderLineItems. +""" +type DraftOrderLineItemConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "draft_orders") { + """ + 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 @componentName(name: "draft_orders") { + """ + The custom discount to be applied. + """ + appliedDiscount: DraftOrderAppliedDiscountInput + + """ + 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!] + + """ + A generic custom attribute using a key value pair. + """ + customAttributes: [AttributeInput!] + + """ + 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 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 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 + + """ + 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 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 ID of the product variant corresponding to the line item. + Must be null for custom line items, otherwise required. + """ + variantId: ID @gidTypes(types: ["ProductVariant"]) + + """ + The weight unit and value inputs for custom line items only. + This field is ignored when `variantId` is provided. + """ + weight: WeightInput +} + +""" +The possible sources for a line item's merchandise. +""" +enum DraftOrderLineItemMerchandiseSourceType @componentName(name: "draft_orders") { + """ + Indicates the line item represents custom merchandise. + """ + CUSTOM + + """ + Indicates the line item represents a ProductVariant that has been deleted since the draft order was created + or last updated. The line item must be updated to use a new variant or defined as custom before the draft + order can be completed. + """ + DELETED_PRODUCT_VARIANT + + """ + Indicates the line item represents a ProductVariant. + """ + PRODUCT_VARIANT +} + +""" +A warning indicating that the market region country code is not supported with Markets. +""" +type DraftOrderMarketRegionCountryCodeNotSupportedWarning implements DraftOrderWarning @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") = CalculatedDraftOrderLineItem | DraftOrderLineItem | ShippingLine + +""" +Return type for `draftOrderPrepareForBuyerCheckout` mutation. +""" +type DraftOrderPrepareForBuyerCheckoutPayload @componentName(name: "platform") { + """ + The prepared draft order. + """ + draftOrder: DraftOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A warning indicating that a price override was removed from a draft order line item. +""" +type DraftOrderPriceOverrideRemovedWarning implements DraftOrderWarning @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +A shipping rate is an additional cost added to the cost of the products that were ordered. +""" +type DraftOrderShippingRate @requiredAccess(scope: "Any of `draft_orders`, `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "draft_orders") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "draft_orders") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + Handle of draft order tag. + """ + handle: String! + + """ + ID of draft order tag. + """ + id: ID! + + """ + Title of draft order tag. + """ + title: String! +} + +""" +A warning indicating that a requested product variant could not be added to the draft order. +""" +type DraftOrderUnavailableMerchandiseWarning implements DraftOrderWarning @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + The error code. + """ + errorCode: String! + + """ + The input field that the warning applies to. + """ + field: String! + + """ + The warning message. + """ + message: String! +} + +""" +Return type for `draftOrderUpdate` mutation. +""" +type DraftOrderUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Specifies any bcc recipients for the email. + """ + bcc: [String!] + + """ + Specifies the email body. + """ + body: String + + """ + Specifies a custom message to include in the email. + """ + customMessage: String + + """ + Specifies the email sender. + """ + from: String + + """ + Specifies the email subject. + """ + subject: String + + """ + Specifies the email recipient. + """ + to: String +} + +""" +The email sender configuration for a shop. This allows Shopify to send emails +that are properly authenticated for a given domain. +""" +type EmailSenderConfiguration @requiredAccess(scope: "`read_email_sender_configuration` access scope.") @componentName(name: "shop_identity") { + """ + The list of DNS records that merchants need to configure for the current sender domain. + """ + senderDomainDnsRecords: [EmailSenderConfigurationDnsRecord!]! +} + +""" +Represents a DNS record that needs to be configured for Shopify to send emails from a domain. +""" +type EmailSenderConfigurationDnsRecord @requiredAccess(scope: "`read_email_sender_configuration` access scope.") @componentName(name: "shop_identity") { + """ + The hostname of the DNS record. + """ + name: String! + + """ + The type of the DNS record. + """ + type: String! + + """ + The value of the DNS record. + """ + value: String! +} + +""" +The shop's entitlements. +""" +type EntitlementsType @componentName(name: "billing") { + """ + The shop's B2B entitlements. + """ + b2b: B2BType! + + """ + Represents the markets for the shop. + """ + markets: MarketsType! +} + +""" +Catches validation problems when you're setting up environment variables for +your Hydrogen storefronts. When something goes wrong with your variable +configuration, these errors tell you exactly what needs fixing so you can get +your storefront running smoothly. + +For example, when setting an invalid environment variable name or value that +conflicts with system requirements, this error type captures the specific field +and validation message to guide resolution. + +Use `EnvironmentVariablesUserError` to: +- Handle environment variable validation failures +- Display specific error messages to developers +- Identify which fields need correction +- Provide clear feedback during storefront configuration + +Each error includes the problematic field name and a descriptive message +explaining the validation requirement that wasn't met. + +Learn more about [Hydrogen storefront configuration](https://shopify.dev/docs/custom-storefronts/hydrogen). +""" +type EnvironmentVariablesUserError implements DisplayableError @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") { + """ + The error code. + """ + code: EnvironmentVariablesUserErrorCode + + """ + 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 `EnvironmentVariablesUserError`. +""" +enum EnvironmentVariablesUserErrorCode @componentName(name: "platform") { + """ + A read-only environment variable can't be modified. + """ + CANT_MODIFY_READ_ONLY_ENVIRONMENT_VARIABLE + + """ + You can't reveal secret variables. + """ + CANT_REVEAL_SECRET_VARIABLES + + """ + You can't associate an environment to multiple environment variable values for the same key. + """ + DUPLICATE_ENVIRONMENT_VARIABLE_KEY_FOR_ENVIRONMENT + + """ + An environment variable with the same key already exists. + """ + DUPLICATE_ENVIRONMENT_VARIABLE_KEY_ON_CREATE + + """ + An environment variable with the provided key-value already exists. + """ + DUPLICATE_ENVIRONMENT_VARIABLE_KEY_VALUE + + """ + The environments provided weren't found. + """ + ENVIRONMENTS_NOT_FOUND + + """ + The environment provided wasn't found. + """ + ENVIRONMENT_NOT_FOUND + + """ + You've reached the maximum number of variables for one of your environments. + """ + MAXIMUM_ENVIRONMENT_VARIABLES_PER_ENVIRONMENT + + """ + Your storefront isn't connected to a GitHub repository. + """ + STOREFRONT_DISCONNECTED + + """ + The storefront was not found. + """ + STOREFRONT_NOT_FOUND + + """ + An environment variable is not assigned to any environment. + """ + UNASSIGNED_ENVIRONMENT_VARIABLE_VALUE + + """ + The input updates environment variables with different keys. + """ + USER_INPUT_MUST_UPDATE_VARIABLES_WITH_THE_SAME_KEY +} + +""" +An error that occurs during the execution of a server pixel mutation. +""" +type ErrorsServerPixelUserError implements DisplayableError @requiredAccess(scope: "`read_pixels` access scope. Also: The app must have the read_server_pixels access scope.") @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "platform") { + """ + A server pixel already exists for this app and shop. Only one server pixel can exist for any app and shop combination. + """ + ALREADY_EXISTS + + """ + Server Pixel must be configured with a valid AWS Event Bridge or GCP pub/sub endpoint address to be connected. + """ + NEEDS_CONFIGURATION_TO_CONNECT + + """ + A server pixel doesn't exist for this app and shop. + """ + NOT_FOUND + + """ + 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 +} + +""" +An error that occurs during the execution of a web pixel mutation. +""" +type ErrorsWebPixelUserError implements DisplayableError @requiredAccess(scope: "`read_pixels` access scope.") @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + The provided settings is not a valid JSON. + """ + INVALID_CONFIGURATION_JSON + + """ + The provided runtime context is invalid. + """ + INVALID_RUNTIME_CONTEXT + + """ + The provided settings does not match the expected settings definition on the app. + """ + INVALID_SETTINGS + + """ + The settings definition of the web pixel extension is in an invalid state on the app. + """ + INVALID_SETTINGS_DEFINITION + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + No extension found. + """ + NO_EXTENSION + + """ + The input value is already taken. + """ + TAKEN + + """ + An error occurred and the web pixel couldnt be deleted. + """ + UNABLE_TO_DELETE @deprecated(reason: "`UNABLE_TO_DELETE` is deprecated. Use `UNEXPECTED_ERROR` instead.") + + """ + An unexpected error occurred. + """ + UNEXPECTED_ERROR +} + +""" +Events chronicle resource activities such as the creation of an article, the fulfillment of an order, or the +addition of a product. +""" +interface Event @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "apps") { + """ + The ARN of the EventBridge partner event source. + """ + arn: ARN + + """ + 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 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!] + + """ + 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!] + + """ + A human-readable name for the webhook subscription. + """ + name: String +} + +""" +Return type for `eventBridgeWebhookSubscriptionUpdate` mutation. +""" +type EventBridgeWebhookSubscriptionUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + A Article resource generated the event. + """ + ARTICLE + + """ + A Blog resource generated the event. + """ + BLOG + + """ + A Collection resource generated the event. + """ + COLLECTION + + """ + A Comment resource generated the event. + """ + COMMENT + + """ + A Company resource generated the event. + """ + COMPANY + + """ + A CompanyLocation resource generated the event. + """ + COMPANY_LOCATION + + """ + A Customer resource generated the event. + """ + CUSTOMER + + """ + 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 DraftOrder resource generated the event. + """ + DRAFT_ORDER + + """ + A InventoryTransfer resource generated the event. + """ + INVENTORY_TRANSFER + + """ + A Order resource generated the event. + """ + ORDER + + """ + A Page resource generated the event. + """ + PAGE + + """ + A PriceRule resource generated the event. + """ + PRICE_RULE + + """ + A Product resource generated the event. + """ + PRODUCT + + """ + A ProductVariant resource generated the event. + """ + PRODUCT_VARIANT + + """ + 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 @requiredAccess(scope: "`read_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + The discount to be applied to the exchange line item. + """ + appliedDiscount: ExchangeLineItemAppliedDiscountInput + + """ + The gift card codes associated with the physical gift cards. + """ + giftCardCodes: [String!] + + """ + The quantity of the item to be added. + """ + quantity: Int! + + """ + The ID of the product variant to be added to the order as part of an exchange. + """ + variantId: ID @gidTypes(types: ["ProductVariant"]) +} + +""" +The input fields for removing an exchange line item from a return. +""" +input ExchangeLineItemRemoveFromReturnInput @componentName(name: "returns") { + """ + The ID of the exchange line item to remove. + """ + exchangeLineItemId: ID! @gidTypes(types: ["ExchangeLineItem"]) + + """ + 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 @requiredAccess(scope: "`read_orders` access scope. Also: You must have permissions for `orders` and `better_exchanges`.") @componentName(name: "returns") @privatelyDocumented { + """ + 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 @requiredAccess(scope: "`read_orders` access scope. Also: You must have permissions for `orders` and `better_exchanges`.") @componentName(name: "returns") @privatelyDocumented { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope. Also: You must have permissions for `orders` and `better_exchanges`.") @componentName(name: "returns") @privatelyDocumented { + """ + 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 @requiredAccess(scope: "`read_orders` access scope. Also: You must have permissions for `orders` and `better_exchanges`.") @componentName(name: "returns") @privatelyDocumented { + """ + 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + 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! + + """ + Status resulting from the latest update operation. See fileErrors for details. + """ + updateStatus: FileStatus + + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope and (`read_orders` access scope or `read_marketplace_orders` access scope).") @componentName(name: "returns") { + """ + The unique ID for the Fee. + """ + id: ID! +} + +""" +A sale associated with a fee. +""" +type FeeSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + 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 + + """ + Status resulting from the latest update operation. See fileErrors for details. + """ + updateStatus: FileStatus + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + An externally hosted video. + """ + EXTERNAL_VIDEO + + """ + A Shopify-hosted generic file. + """ + FILE + + """ + A Shopify-hosted image. + """ + IMAGE + + """ + A Shopify-hosted 3D model. + """ + MODEL_3D + + """ + A Shopify-hosted video file. It's recommended to use this type for all video files. + """ + VIDEO +} + +""" +The input fields that are required to create a file object. +""" +input FileCreateInput @componentName(name: "merchandising") { + """ + The alt text description of the file for screen readers and accessibility. + """ + alt: String + + """ + The file content type. If omitted, then Shopify will attempt to determine the content type during file processing. + """ + contentType: FileContentType + + """ + How to handle if filename is already in use. + """ + duplicateResolutionMode: FileCreateInputDuplicateResolutionMode = APPEND_UUID + + """ + 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 + + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_files` access scope, `read_themes` access scope or `read_images` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + File could not be created because a file with the same name already exists. + """ + DUPLICATE_FILENAME_ERROR + + """ + 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 created because the external video has an invalid aspect ratio. + """ + EXTERNAL_VIDEO_INVALID_ASPECT_RATIO + + """ + 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 cumulative file storage limit would be exceeded. + """ + FILE_STORAGE_LIMIT_EXCEEDED + + """ + 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 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 could not be created because the image has an invalid aspect ratio. + """ + INVALID_IMAGE_ASPECT_RATIO + + """ + File could not be created because the image size is too large. + """ + INVALID_IMAGE_FILE_SIZE + + """ + File could not be created because the image's resolution exceeds the max limit. + """ + INVALID_IMAGE_RESOLUTION + + """ + File could not be processed because the signed URL was invalid. + """ + INVALID_SIGNED_URL + + """ + File timed out because it is currently being modified by another operation. + """ + MEDIA_TIMEOUT_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 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_PROCESSING_FAILURE + + """ + 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 + + """ + Model failed validation. + """ + MODEL3D_VALIDATION_ERROR + + """ + File could not be reverted to previous version. + """ + REVERT_MEDIA_VERSION_FAILURE + + """ + File error has occurred for an unknown reason. + """ + UNKNOWN + + """ + File could not be created because the image is an unsupported file type. + """ + UNSUPPORTED_IMAGE_FILE_TYPE + + """ + 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 maximum duration requirement. + """ + VIDEO_MAX_DURATION_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 maximum width requirement. + """ + VIDEO_MAX_WIDTH_ERROR + + """ + File could not be created because the metadata could not be read. + """ + VIDEO_METADATA_READ_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 minimum height requirement. + """ + VIDEO_MIN_HEIGHT_ERROR + + """ + File could not be created because it does not meet the minimum width requirement. + """ + VIDEO_MIN_WIDTH_ERROR + + """ + Video failed validation. + """ + VIDEO_VALIDATION_ERROR +} + +""" +The input fields required to create or update a file object. +""" +input FileSetInput @componentName(name: "merchandising") { + """ + The alt text description of the file for screen readers and accessibility. + """ + alt: String + + """ + The file content type. If omitted, then Shopify will attempt to determine the content type during file processing. + """ + contentType: FileContentType + + """ + How to handle if filename is already in use. + """ + duplicateResolutionMode: FileCreateInputDuplicateResolutionMode = APPEND_UUID + + """ + 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 ID of an existing file. + """ + id: ID @gidTypes(types: ["MediaImage", "Video", "ExternalVideo", "Model3d"]) + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + File processing has failed. + """ + FAILED + + """ + File is being processed. + """ + PROCESSING + + """ + File is ready to be displayed. + """ + READY + + """ + File has been uploaded but hasn't been processed. + """ + UPLOADED +} + +""" +The input fields that are required to update a file object. +""" +input FileUpdateInput @componentName(name: "merchandising") { + """ + The alt text description of the file for screen readers and accessibility. + """ + alt: String + + """ + The name of the file including its extension. + """ + filename: String + + """ + The ID of the file to be updated. + """ + id: ID @gidTypes(types: ["MediaImage", "Video", "ExternalVideo", "Model3d", "GenericFile", "Directory"]) + + """ + 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 IDs of the references to add to the file. Currently only accepts product IDs. + """ + referencesToAdd: [ID!] @gidTypes(types: ["Product"]) + + """ + The IDs of the references to remove from the file. Currently only accepts product IDs. + """ + referencesToRemove: [ID!] @gidTypes(types: ["Product"]) +} + +""" +Return type for `fileUpdate` mutation. +""" +type FileUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The alt value exceeds the maximum limit of 512 characters. + """ + ALT_VALUE_LIMIT_EXCEEDED + + """ + The search term must not be blank. + """ + BLANK_SEARCH + + """ + The provided filename already exists. + """ + FILENAME_ALREADY_EXISTS + + """ + File does not exist. + """ + FILE_DOES_NOT_EXIST + + """ + File has a pending operation. + """ + FILE_LOCKED + + """ + The input value is invalid. + """ + INVALID + + """ + Duplicate resolution mode is not supported for this file type. + """ + INVALID_DUPLICATE_MODE_FOR_TYPE + + """ + Invalid duplicate resolution mode provided. + """ + INVALID_DUPLICATE_RESOLUTION_MODE + + """ + File cannot be updated in a failed state. + """ + INVALID_FAILED_MEDIA_STATE + + """ + The provided filename is invalid. + """ + INVALID_FILENAME + + """ + Invalid filename extension. + """ + INVALID_FILENAME_EXTENSION + + """ + Invalid image source url value provided. + """ + INVALID_IMAGE_SOURCE_URL + + """ + Search query isn't supported. + """ + INVALID_QUERY + + """ + Media cannot be modified. It is currently being modified by another operation. + """ + MEDIA_CANNOT_BE_MODIFIED + + """ + Cannot create file with custom filename which does not match original source extension. + """ + MISMATCHED_FILENAME_AND_ORIGINAL_SOURCE + + """ + At least one argument is required. + """ + MISSING_ARGUMENTS + + """ + Duplicate resolution mode REPLACE cannot be used without specifying filename. + """ + MISSING_FILENAME_FOR_DUPLICATE_MODE_REPLACE + + """ + Exceeded the limit of non-image media per shop. + """ + NON_IMAGE_MEDIA_PER_SHOP_LIMIT_EXCEEDED + + """ + The file is not in the READY state. + """ + NON_READY_STATE + + """ + Exceeded the limit of media per product. + """ + PRODUCT_MEDIA_LIMIT_EXCEEDED + + """ + One or more associated products are suspended. + """ + PRODUCT_SUSPENDED + + """ + The target resource does not exist. + """ + REFERENCE_TARGET_DOES_NOT_EXIST + + """ + Specify one argument: search, IDs, or deleteAll. + """ + TOO_MANY_ARGUMENTS + + """ + Cannot add more than 10000 references to a file. + """ + TOO_MANY_FILE_REFERENCE + + """ + 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 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 for referencing. + """ + UNSUPPORTED_FILE_REFERENCE + + """ + Filename update is only supported on Image and GenericFile. + """ + UNSUPPORTED_MEDIA_TYPE_FOR_FILENAME_UPDATE +} + +""" +An error that happens during the execution of a Files API query or mutation. +""" +type FilesUserError implements DisplayableError @requiredAccess(scope: "`read_files` access scope, `read_themes` access scope or `read_images` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_financial_kyc_information` access scope or `read_users` access scope.") @componentName(name: "banking") { + """ + Current shop staff's access within the app. + """ + access: [BankingFinanceAppAccess!]! +} + +""" +Shopify Payments account information shared with embedded finance applications. +""" +type FinanceKycInformation @requiredAccess(scope: "`read_financial_kyc_information` access scope. Also: The user must have app permission for finance apps.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "`read_financial_kyc_information` access scope. Also: The user must have app permission for finance apps.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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! +} + +""" +Return type for `flowGenerateSignature` mutation. +""" +type FlowGenerateSignaturePayload @componentName(name: "platform") @privatelyDocumented { + """ + 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!]! +} + +""" +Possible schema value used to validate the payload. +""" +enum FlowGenerateSignaturePayloadSchema @componentName(name: "apps") @privatelyDocumented { + """ + For when an action is executed. Default value if none is provided. + """ + ACTION + + """ + For when Flow requests a step preview. + """ + PREVIEW + + """ + For when Flow requests validation. + """ + VALIDATION +} + +""" +Return type for `flowTriggerReceive` mutation. +""" +type FlowTriggerReceivePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope, `read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): FulfillmentLineItemConnection! + + """ + A paginated list of fulfillment orders for the fulfillment. + """ + fulfillmentOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_fulfillment_constraint_rules` access scope.") @componentName(name: "order_routing") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! +} + +""" +Return type for `fulfillmentConstraintRuleCreate` mutation. +""" +type FulfillmentConstraintRuleCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Shop must be on a Shopify Plus plan to activate functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + 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 + + """ + No Shopify Function found for provided function_id. + """ + FUNCTION_NOT_FOUND + + """ + Function is pending deletion and cannot have new rules created against it. + """ + FUNCTION_PENDING_DELETION + + """ + Failed to create fulfillment constraint rule due to invalid input. + """ + INPUT_INVALID + + """ + Maximum number of fulfillment constraint rules reached. Limit is 10. + """ + MAXIMUM_FULFILLMENT_CONSTRAINT_RULES_REACHED + + """ + 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 +} + +""" +Return type for `fulfillmentConstraintRuleDelete` mutation. +""" +type FulfillmentConstraintRuleDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Could not find fulfillment constraint rule for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +Return type for `fulfillmentConstraintRuleUpdate` mutation. +""" +type FulfillmentConstraintRuleUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Could not find fulfillment constraint rule for provided id. + """ + NOT_FOUND + + """ + Unauthorized app scope. + """ + UNAUTHORIZED_APP_SCOPE +} + +""" +Return type for `fulfillmentCreate` mutation. +""" +type FulfillmentCreatePayload @componentName(name: "platform") { + """ + The created fulfillment. + """ + fulfillment: Fulfillment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `fulfillmentCreateV2` mutation. +""" +type FulfillmentCreateV2Payload @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + Displayed as **Attempted delivery**. + """ + ATTEMPTED_DELIVERY + + """ + Displayed as **Buyer action required**. + """ + BUYER_ACTION_REQUIRED + + """ + Displayed as **Canceled**. + """ + CANCELED + + """ + Displayed as **Picked up by carrier**. + """ + CARRIER_PICKED_UP + + """ + Displayed as **Confirmed**. + """ + CONFIRMED + + """ + Displayed as **Delayed**. + """ + DELAYED + + """ + Displayed as **Delivered**. + """ + DELIVERED + + """ + Displayed as **Failure**. + """ + FAILURE + + """ + Displayed as **Fulfilled**. + """ + FULFILLED + + """ + 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 **Picked up**. + """ + PICKED_UP + + """ + Displayed as **Ready for pickup**. + """ + READY_FOR_PICKUP + + """ + Displayed as **Ready for pickup**. + """ + READY_FOR_RECIPIENT_PICKUP + + """ + Displayed as **Returning to sender**. + """ + RETURNING_TO_SENDER + + """ + Displayed as **Submitted**. + """ + SUBMITTED +} + +""" +An auto-generated type which holds one Fulfillment and a cursor during pagination. +""" +type FulfillmentEdge @componentName(name: "fulfillments") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { + """ + The street address where this fulfillment event occurred. + """ + address1: String @protectedField(subject: "customer", content: "address") + + """ + The city where this fulfillment event occurred. + """ + city: String @protectedField(subject: "customer", content: "address") + + """ + 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 @protectedField(subject: "customer", content: "address") + + """ + The longitude where this fulfillment event occurred. + """ + longitude: Float @protectedField(subject: "customer", content: "address") + + """ + 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 @protectedField(subject: "customer", content: "address") +} + +""" +An auto-generated type for paginating through multiple FulfillmentEvents. +""" +type FulfillmentEventConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "fulfillments") { + """ + 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 ID for the fulfillment that's associated with this fulfillment event. + """ + fulfillmentId: ID! @gidTypes(types: ["Fulfillment"]) + + """ + The time at which this fulfillment event happened. + """ + happenedAt: DateTime + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + A delivery was attempted. + """ + ATTEMPTED_DELIVERY + + """ + The fulfillment requires action from the buyer before it can be delivered. + """ + BUYER_ACTION_REQUIRED + + """ + The fulfillment has been picked up by the carrier. + """ + CARRIER_PICKED_UP + + """ + The fulfillment is confirmed. This is the default value when no other information is available. + """ + CONFIRMED + + """ + The fulfillment is delayed. + """ + DELAYED + + """ + The fulfillment was successfully delivered. + """ + DELIVERED + + """ + The fulfillment request failed. + """ + FAILURE + + """ + The fulfillment is in transit. + """ + IN_TRANSIT + + """ + A purchased shipping label has been printed. + """ + LABEL_PRINTED + + """ + A shipping label has been purchased. + """ + LABEL_PURCHASED + + """ + The fulfillment is out for delivery. + """ + OUT_FOR_DELIVERY + + """ + The fulfillment was successfully picked up. + """ + PICKED_UP + + """ + The fulfillment is ready to be picked up. + """ + READY_FOR_PICKUP + + """ + The fulfillment is ready for the recipient to pick up. + """ + READY_FOR_RECIPIENT_PICKUP + + """ + The fulfillment is being returned to the sender. + """ + RETURNING_TO_SENDER +} + +""" +A fulfillment hold currently applied on a fulfillment order. +""" +type FulfillmentHold implements Node @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @requiredAccess(scope: "`read_apps` access scope.") + + """ + 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 + + """ + An optional warning message displayed when attempting to release the fulfillment hold. + """ + releaseWarning: String +} + +""" +The reason for a fulfillment hold. +""" +enum FulfillmentHoldReason @componentName(name: "fulfillments") { + """ + The fulfillment hold is applied because payment is pending. + """ + AWAITING_PAYMENT + + """ + The fulfillment hold is applied because of return items not yet received during an exchange. + """ + AWAITING_RETURN_ITEMS + + """ + 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 a post purchase upsell offer. + """ + ONLINE_STORE_POST_PURCHASE_CROSS_SELL + + """ + The fulfillment hold is applied for another reason. + """ + OTHER + + """ + The fulfillment hold is applied because of an unknown delivery date. + """ + UNKNOWN_DELIVERY_DATE +} + +""" +The input fields used to create a fulfillment from fulfillment orders. +""" +input FulfillmentInput @componentName(name: "fulfillments") { + """ + 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!]! + + """ + 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 + + """ + Address information about the location from which the order was fulfilled. + """ + originAddress: FulfillmentOriginAddressInput + + """ + The fulfillment's tracking information, including a tracking URL, a tracking number, + and the company associated with the fulfillment. + """ + trackingInfo: FulfillmentTrackingInput +} + +""" +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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): FulfillmentOrderConnection! + + """ + A list of fulfillments for the fulfillment order. + """ + fulfillments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): FulfillmentOrderLineItemConnection! + + """ + A list of locations that the fulfillment order can potentially move to. + """ + locationsForMove( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter to a list of Fulfillment Order Line Items. + """ + lineItemIds: [ID!] = [] @gidTypes(types: ["FulfillmentOrderLineItem"]) + + """ + Specific Location ids to check for the movability for a fulfillment order. + """ + locationIds: [ID!] @gidTypes(types: ["Location"]) + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | active | string | + | address1 | string | + | address2 | string | + | city | string | + | country | string | + | created_at | time | + | geolocated | boolean | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | legacy | boolean | + | location_id | id | + | name | string | + | pickup_in_store | string | | - `enabled`
- `disabled` | + | province | string | + | zip | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The kind of request the merchant sent. + """ + kind: FulfillmentOrderMerchantRequestKind + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 total weight of all line items in the fulfillment order that aren't yet fulfilled. + """ + remainingLineItemsWeight: Weight + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + Cancels a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderCancel`. + """ + CANCEL_FULFILLMENT_ORDER + + """ + Creates a fulfillment for selected line items in the fulfillment order. The + corresponding mutation for this action is `fulfillmentCreateV2`. + """ + CREATE_FULFILLMENT + + """ + Opens an external URL to initiate the fulfillment process outside Shopify. + This action should be paired with + `FulfillmentOrderSupportedAction.externalUrl`. + """ + EXTERNAL + + """ + Applies a fulfillment hold on the fulfillment order. The corresponding mutation for this action is `fulfillmentOrderHold`. + """ + HOLD + + """ + Marks the fulfillment order as open. The corresponding mutation for this action is `fulfillmentOrderOpen`. + """ + MARK_AS_OPEN + + """ + Merges a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMerge`. + """ + MERGE + + """ + Moves a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMove`. + """ + MOVE + + """ + Releases the fulfillment hold on the fulfillment order. The corresponding + mutation for this action is `fulfillmentOrderReleaseHold`. + """ + RELEASE_HOLD + + """ + Report the progress of the fulfillment order, marking as in progress if it's not already in progress. + """ + REPORT_PROGRESS + + """ + Sends a cancellation request to the fulfillment service of a fulfillment + order. The corresponding mutation for this action is + `fulfillmentOrderSubmitCancellationRequest`. + """ + REQUEST_CANCELLATION + + """ + 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 + + """ + Splits a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderSplit`. + """ + SPLIT +} + +""" +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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "fulfillments") { + """ + Fulfillment orders for which the merchant has requested cancellation of + the previously accepted fulfillment request. + """ + CANCELLATION_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 has requested fulfillment. + """ + FULFILLMENT_REQUESTED + + """ + Fulfillment orders for which the merchant hasn't yet requested fulfillment. + """ + FULFILLMENT_UNSUBMITTED +} + +""" +Represents an error that occurs while cancelling a fulfillment order. +""" +type FulfillmentOrderCancelError implements DisplayableError @componentName(name: "fulfillments") { + """ + The error code. + """ + code: FulfillmentOrderCancelErrorCode + + """ + 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 `FulfillmentOrderCancelError`. +""" +enum FulfillmentOrderCancelErrorCode @componentName(name: "platform") { + """ + Cannot cancel fulfillment order with reported progress. Mark as unfulfilled first. + """ + FULFILLMENT_ORDER_HAS_MANUALLY_REPORTED_PROGRESS +} + +""" +Return type for `fulfillmentOrderCancel` mutation. +""" +type FulfillmentOrderCancelPayload @componentName(name: "platform") { + """ + 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: [FulfillmentOrderCancelError!]! +} + +""" +Return type for `fulfillmentOrderClose` mutation. +""" +type FulfillmentOrderClosePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { + """ + The first line of the address of the destination. + """ + address1: String @protectedField(subject: "customer", content: "address") + + """ + The second line of the address of the destination. + """ + address2: String @protectedField(subject: "customer", content: "address") + + """ + The city of the destination. + """ + city: String @protectedField(subject: "customer", content: "address") + + """ + 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 @protectedField(subject: "customer", content: "email") + + """ + The first name of the customer at the destination. + """ + firstName: String @protectedField(subject: "customer", content: "name") + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last name of the customer at the destination. + """ + lastName: String @protectedField(subject: "customer", content: "name") + + """ + The location designated for the pick-up of the fulfillment order. + """ + location: Location + + """ + The phone number of the customer at the destination. + """ + phone: String @protectedField(subject: "customer", content: "phone") + + """ + The province of the destination. + """ + province: String + + """ + The ZIP code of the destination. + """ + zip: String @protectedField(subject: "customer", content: "address") +} + +""" +An auto-generated type which holds one FulfillmentOrder and a cursor during pagination. +""" +type FulfillmentOrderEdge @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "fulfillments") { + """ + A configurable ID used to track the automation system releasing these holds. + """ + externalId: 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!] = [] + + """ + 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 = "" + + """ + Whether the merchant receives a notification about the fulfillment hold. The default value is `false`. + """ + notifyMerchant: Boolean = false + + """ + The reason for the fulfillment hold. + """ + reason: FulfillmentHoldReason! + + """ + Additional information about the fulfillment hold reason. + """ + reasonNotes: String +} + +""" +Return type for `fulfillmentOrderHold` mutation. +""" +type FulfillmentOrderHoldPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The fulfillment order line items are not unique. + """ + DUPLICATED_FULFILLMENT_ORDER_LINE_ITEMS + + """ + 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 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 fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The fulfillment order is not in a splittable state. + """ + FULFILLMENT_ORDER_NOT_SPLITTABLE + + """ + The fulfillment order line item quantity must be greater than 0. + """ + GREATER_THAN_ZERO + + """ + The fulfillment order line item quantity is invalid. + """ + INVALID_LINE_ITEM_QUANTITY + + """ + The input value is already taken. + """ + TAKEN +} + +""" +The international duties relevant to a fulfillment order. +""" +type FulfillmentOrderInternationalDuties @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 shipping line associated with this line item. + """ + shippingLine: ShippingLine + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "fulfillments") { + """ + The ID of the fulfillment order line item. + """ + id: ID! @gidTypes(types: ["FulfillmentOrderLineItem"]) + + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "fulfillments") { + """ + The ID of the fulfillment order. + """ + fulfillmentOrderId: ID! @gidTypes(types: ["FulfillmentOrder"]) + + """ + 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 @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Invalid fulfillment order ID provided. + """ + FULFILLMENT_ORDER_INVALID + + """ + The fulfillment order does not have any line items that can be prepared. + """ + NO_LINE_ITEMS_TO_PREPARE_FOR_FULFILLMENT_ORDER + + """ + Unable to prepare quantity. + """ + UNABLE_TO_PREPARE_QUANTITY +} + +""" +A location that a fulfillment order can potentially move to. +""" +type FulfillmentOrderLocationForMove @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + Fulfillment order line items that can be moved from their current location to the given location. + """ + availableLineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "fulfillments") { + """ + The merchant requests cancellation of an `IN_PROGRESS` fulfillment order. + """ + CANCELLATION_REQUEST + + """ + The merchant requests fulfillment for an `OPEN` fulfillment order. + """ + FULFILLMENT_REQUEST +} + +""" +The input fields for merging fulfillment orders. +""" +input FulfillmentOrderMergeInput @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "fulfillments") { + """ + The ID of the fulfillment order to be merged. + """ + fulfillmentOrderId: ID! @gidTypes(types: ["FulfillmentOrder"]) + + """ + The fulfillment order line items to be merged. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] +} + +""" +Return type for `fulfillmentOrderMerge` mutation. +""" +type FulfillmentOrderMergePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 +} + +""" +Represents a user error that occurs while moving a fulfillment order. +""" +type FulfillmentOrderMoveFulfillmentOrderMoveUserError implements DisplayableError @componentName(name: "fulfillments") { + """ + The error code. + """ + code: FulfillmentOrderMoveFulfillmentOrderMoveUserErrorCode + + """ + 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 `FulfillmentOrderMoveFulfillmentOrderMoveUserError`. +""" +enum FulfillmentOrderMoveFulfillmentOrderMoveUserErrorCode @componentName(name: "platform") { + """ + Cannot move a fulfillment order that has progress reported. + """ + CANNOT_MOVE_FULFILLMENT_ORDER_WITH_REPORTED_PROGRESS + + """ + Cannot move a fulfillment order to the location it's already assigned to. + """ + CANNOT_MOVE_TO_CURRENT_ORIGIN_LOCATION +} + +""" +Return type for `fulfillmentOrderMove` mutation. +""" +type FulfillmentOrderMovePayload @componentName(name: "platform") { + """ + 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: [FulfillmentOrderMoveFulfillmentOrderMoveUserError!]! +} + +""" +Return type for `fulfillmentOrderOpen` mutation. +""" +type FulfillmentOrderOpenPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + The fulfillment order was rejected because of an incorrect address. + """ + INCORRECT_ADDRESS + + """ + The fulfillment order was rejected because product information is incorrect to be able to ship. + """ + INCORRECT_PRODUCT_INFO + + """ + The fulfillment order was rejected because of an ineligible product. + """ + INELIGIBLE_PRODUCT + + """ + The fulfillment order was rejected because international address shipping hasn't been enabled. + """ + INTERNATIONAL_SHIPPING_UNAVAILABLE + + """ + The fulfillment order was rejected because of invalid customer contact information. + """ + INVALID_CONTACT_INFORMATION + + """ + The fulfillment order was rejected because of an invalid SKU. + """ + INVALID_SKU + + """ + The fulfillment order was rejected because inventory is out of stock. + """ + INVENTORY_OUT_OF_STOCK + + """ + The fulfillment order was rejected because the merchant is blocked or suspended. + """ + MERCHANT_BLOCKED_OR_SUSPENDED + + """ + The fulfillment order was rejected because customs information was missing for international shipping. + """ + MISSING_CUSTOMS_INFO + + """ + The fulfillment order was rejected because the order is too large. + """ + ORDER_TOO_LARGE + + """ + The fulfillment order was rejected for another reason. + """ + OTHER + + """ + The fulfillment order was rejected because the package preference was not set. + """ + PACKAGE_PREFERENCE_NOT_SET + + """ + The fulfillment order was rejected because the payment method was declined. + """ + PAYMENT_DECLINED + + """ + The fulfillment order was rejected because of an undeliverable destination. + """ + UNDELIVERABLE_DESTINATION +} + +""" +Return type for `fulfillmentOrderReleaseHold` mutation. +""" +type FulfillmentOrderReleaseHoldPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The fulfillment order wasn't found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The app doesn't have access to release the fulfillment hold. + """ + INVALID_ACCESS +} + +""" +The input fields for the progress report for the fulfillment order. +""" +input FulfillmentOrderReportProgressInput @componentName(name: "fulfillments") { + """ + Additional information for the progress report. + """ + reasonNotes: String +} + +""" +Return type for `fulfillmentOrderReportProgress` mutation. +""" +type FulfillmentOrderReportProgressPayload @componentName(name: "platform") { + """ + The fulfillment order on which a mark as in progress update has been specified. + """ + fulfillmentOrder: FulfillmentOrder + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [FulfillmentOrderReportProgressUserError!]! +} + +""" +An error that occurs during the execution of `FulfillmentOrderReportProgress`. +""" +type FulfillmentOrderReportProgressUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: FulfillmentOrderReportProgressUserErrorCode + + """ + 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 `FulfillmentOrderReportProgressUserError`. +""" +enum FulfillmentOrderReportProgressUserErrorCode @componentName(name: "platform") { + """ + The fulfillment order contains picked items. + """ + FULFILLMENT_ORDER_CONTAINS_PICKED_ITEMS + + """ + Progress cannot be reported for a fulfillment order with this delivery method. + """ + FULFILLMENT_ORDER_INVALID_DELIVERY_METHOD + + """ + The fulfillment order is not assigned to the requesting fulfillment service. + """ + FULFILLMENT_ORDER_INVALID_FULFILLMENT_SERVICE_OWNERSHIP + + """ + The fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + The fulfillment order status is invalid. + """ + FULFILLMENT_ORDER_STATUS_INVALID + + """ + The action is not supported for the fulfillment order. + """ + FULFILLMENT_ORDER_UNSUPPORTED_ACTION + + """ + Marketplace apps are not eligible to report progress on fulfillment orders. + """ + MARKETPLACE_APP_NOT_ELIGIBLE +} + +""" +The request status of a fulfillment order. +""" +enum FulfillmentOrderRequestStatus @componentName(name: "fulfillments") { + """ + The fulfillment service accepted the merchant's fulfillment request. + """ + ACCEPTED + + """ + 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 merchant requested a cancellation of the fulfillment request for this fulfillment order. + """ + CANCELLATION_REQUESTED + + """ + The fulfillment service closed the fulfillment order without completing it. + """ + CLOSED + + """ + The fulfillment service rejected the merchant's fulfillment request. + """ + REJECTED + + """ + The merchant requested fulfillment for this fulfillment order. + """ + SUBMITTED + + """ + 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 +} + +""" +Return type for `fulfillmentOrderReschedule` mutation. +""" +type FulfillmentOrderReschedulePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND +} + +""" +The set of valid sort keys for the FulfillmentOrder query. +""" +enum FulfillmentOrderSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + The ID of the fulfillment order to be split. + """ + fulfillmentOrderId: ID! @gidTypes(types: ["FulfillmentOrder"]) + + """ + The fulfillment order line items to be split out. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!]! +} + +""" +Return type for `fulfillmentOrderSplit` mutation. +""" +type FulfillmentOrderSplitPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + The fulfillment order has been cancelled by the merchant. + """ + CANCELLED + + """ + The fulfillment order has been completed and closed. + """ + CLOSED + + """ + The fulfillment order cannot be completed as requested. + """ + INCOMPLETE + + """ + The fulfillment order is being processed. + """ + IN_PROGRESS + + """ + The fulfillment order is on hold. The fulfillment process can't be initiated + until the hold on the fulfillment order is released. + """ + ON_HOLD + + """ + The fulfillment order is ready for fulfillment. + """ + OPEN + + """ + The fulfillment order is deferred and will be ready for fulfillment after the date and time specified in `fulfill_at`. + """ + SCHEDULED +} + +""" +Return type for `fulfillmentOrderSubmitCancellationRequest` mutation. +""" +type FulfillmentOrderSubmitCancellationRequestPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Cannot move a fulfillment order that has progress reported. + """ + CANNOT_MOVE_FULFILLMENT_ORDER_WITH_REPORTED_PROGRESS + + """ + Cannot reassign location for fulfillment orders. + """ + CANNOT_REASSIGN_LOCATION_FOR_FULFILLMENT_ORDERS + + """ + The delivery method type is not supported. + """ + DELIVERY_METHOD_TYPE_NOT_SUPPORTED + + """ + Fulfillment orders must belong to the same location. + """ + FULFILLMENT_ORDERS_MUST_BELONG_TO_SAME_LOCATION + + """ + 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 + + """ + Fulfillment order could not be found. + """ + FULFILLMENT_ORDER_NOT_FOUND + + """ + No fulfillment order IDs were provided. + """ + NO_FULFILLMENT_ORDER_IDS + + """ + This feature is only supported for multi-location shops. + """ + SINGLE_LOCATION_SHOP_NOT_SUPPORTED +} + +""" +Return type for `fulfillmentOrdersSetFulfillmentDeadline` mutation. +""" +type FulfillmentOrdersSetFulfillmentDeadlinePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { + """ + The street address of the fulfillment location. + """ + address1: String @protectedField(subject: "customer", content: "address") + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String @protectedField(subject: "customer", content: "address") + + """ + The city in which the fulfillment location is located. + """ + city: String @protectedField(subject: "customer", content: "address") + + """ + 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 @protectedField(subject: "customer", content: "address") +} + +""" +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 @componentName(name: "fulfillments") { + """ + 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 of the fulfillment location. + """ + countryCode: String! + + """ + The province of the fulfillment location. + """ + provinceCode: String + + """ + The zip code of the fulfillment location. + """ + zip: 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 @requiredAccess(scope: "Apps will need one of the following: `fulfillments`, `products` or `custom_fulfillment_services` (in case of custom fulfillment service). Fulfillment service apps can also access their own fulfillment service records if they have `assigned_fulfillment_orders` access scope. Users with access to the app will have access to their fulfillment services.") @componentName(name: "fulfillments") { + """ + 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 + + """ + 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 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + The fulfillment was canceled. + """ + CANCELLED + + """ + There was an error with the fulfillment request. + """ + ERROR + + """ + The fulfillment request failed. + """ + FAILURE + + """ + 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.") + + """ + 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 fulfillment was completed successfully. + """ + SUCCESS +} + +""" +Represents the tracking information for a fulfillment. +""" +type FulfillmentTrackingInfo @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope, `read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { + """ + 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 + * 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "fulfillments") { + """ + 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 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 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 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 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 @componentName(name: "fulfillments") { + """ + 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!]! + + """ + 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 + + """ + Address information about the location from which the order was fulfilled. + """ + originAddress: FulfillmentOriginAddressInput + + """ + The fulfillment's tracking information, including a tracking URL, a tracking number, + and the company associated with the fulfillment. + """ + trackingInfo: FulfillmentTrackingInput +} + +""" +Trace information for a single country-language product feed sync triggered by [`channelFullSync`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelFullSync). +""" +type FullSyncTraceInfo @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") @componentName(name: "channels") { + """ + The country of the product feed that was triggered. + """ + country: CountryCode! + + """ + The language of the product feed that was triggered. + """ + language: LanguageCode! + + """ + The operation ID of a successfully initiated product full sync operation. This + field is set to nil when the full sync operation isn't successfully initiated. + """ + operationId: ID +} + +""" +The App Bridge information for a Shopify Function. +""" +type FunctionsAppBridge @componentName(name: "apps") { + """ + 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 @componentName(name: "apps") { + """ + 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + 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 + + """ + Status resulting from the latest update operation. See fileErrors for details. + """ + updateStatus: FileStatus + + """ + 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 @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") @protectedObject(subject: "customer") { + """ + The gift card's remaining balance. + """ + balance: MoneyV2! + + """ + The date and time at which the gift card was created. + """ + createdAt: DateTime! + + """ + The strategy used to convert the gift card's balance when it's redeemed in a currency other than the one it was issued in. + """ + crossCurrencyRedemptionStrategy: GiftCardCrossCurrencyRedemptionStrategy! + + """ + 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! + + """ + Whether the gift card is redeemable in any active market currency. + """ + isRedeemable: Boolean! + + """ + The final four characters of the gift card code. + """ + lastCharacters: String! + + """ + The line item from an order that initiated the creation of this gift card. + This value is `null` if the gift card was issued manually. + """ + lineItem: LineItem + + """ + 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 + + """ + Whether the customer and recipient will be notified when the gift card is issued. + """ + notify: Boolean! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") { + """ + The default expiration configuration of gift cards on the shop. This field is + null if the shop hasn't set a default expiration for gift cards. + """ + expirationConfiguration: GiftCardExpirationConfiguration + + """ + 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! +} + +""" +The supported units for gift card expiration. +""" +enum GiftCardConfigurationExpirationUnit @componentName(name: "stored_value_instruments") { + """ + Gift cards expire in days. + """ + DAYS + + """ + Gift cards expire in months. + """ + MONTHS + + """ + Gift cards expire in years. + """ + YEARS +} + +""" +An auto-generated type for paginating through multiple GiftCards. +""" +type GiftCardConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "stored_value_instruments") { + """ + 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 strategy used to convert the gift card's balance when it's redeemed in a + currency other than the one it was issued in. When not provided, defaults to + `MARKET_FX` for gift cards issued in the shop's currency, and `NONE` for gift + cards issued in a different currency. + """ + crossCurrencyRedemptionStrategy: GiftCardCrossCurrencyRedemptionStrategy + + """ + The ID of the customer who will receive the gift card. Requires `write_customers` access_scope. + """ + customerId: ID @gidTypes(types: ["Customer"]) + + """ + The date at which the gift card will expire. If not provided, then the gift card will never expire. + """ + expiresOn: Date + + """ + The initial amount of the gift card. + """ + initialAmount: MoneyInput + + """ + The initial value of the gift card. + """ + initialValue: Decimal @deprecated(reason: "Use `initialAmount` instead.") + + """ + The note associated with the gift card, which isn't visible to the customer. + """ + note: String + + """ + Whether to enable sending of notifications to the customer and recipient. + Defaults to `true`. + Setting this to `false` will prevent all notifications to the customer or recipient, unless the property is + changed on a subsequent update. + """ + notify: Boolean = true + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "stored_value_instruments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_gift_card_transactions` access scope.") @componentName(name: "stored_value_instruments") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + A note about the transaction. + """ + note: String + + """ + The date and time when the transaction was processed. + """ + processedAt: DateTime! +} + +""" +The strategy used to convert the gift card's balance when it is redeemed in a currency other than the one it was issued in. +""" +enum GiftCardCrossCurrencyRedemptionStrategy @componentName(name: "stored_value_instruments") { + """ + The gift card is redeemed using the automatic or manual exchange rate + configured in the market's currency setting when converting from shop + currency. Only applicable for gift cards issued in the shop currency. + """ + MARKET_FX + + """ + The gift card can only be redeemed in the currency it was issued in. It cannot be used for purchases in other currencies. + """ + NONE + + """ + The gift card is redeemed using standard spot exchange rates between the redemption currency and the gift card currency. + """ + SPOT_FX +} + +""" +Return type for `giftCardDeactivate` mutation. +""" +type GiftCardDeactivatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The gift card could not be found. + """ + GIFT_CARD_NOT_FOUND +} + +""" +The input fields for a gift card debit transaction. +""" +input GiftCardDebitInput @componentName(name: "stored_value_instruments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_gift_card_transactions` access scope.") @componentName(name: "stored_value_instruments") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 @componentName(name: "stored_value_instruments") { + """ + 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 @componentName(name: "platform") { + """ + The customer could not be found. + """ + CUSTOMER_NOT_FOUND + + """ + The gift card's value exceeds the allowed limits. + """ + GIFT_CARD_LIMIT_EXCEEDED + + """ + The input value should be greater than the minimum allowed value. + """ + GREATER_THAN + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + The maximum initial value in the shop's local currency of a gift card was exceeded. + """ + MAX_INITIAL_VALUE_EXCEEDED + + """ + The maximum initial value in USD of a gift card was exceeded. + """ + MAX_INITIAL_VALUE_EXCEEDED_IN_USD + + """ + Missing a required argument. + """ + MISSING_ARGUMENT + + """ + The recipient could not be found. + """ + RECIPIENT_NOT_FOUND + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT +} + +""" +Represents the default expiration configuration of gift cards on the shop. +""" +type GiftCardExpirationConfiguration @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") { + """ + The unit for the default gift card expiration. + """ + expirationUnit: GiftCardConfigurationExpirationUnit! + + """ + The value for the default gift card expiration. + """ + expirationValue: Int! +} + +""" +The input fields for creating or updating a gift card product with the +[`giftCardProductSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet) +mutation. + +For list fields like +[`variants`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-input.fields.variants), +the mutation creates new entries, updates existing ones, and deletes any entries not included +in the input. All other fields update only when explicitly provided, leaving omitted fields +unchanged. +""" +input GiftCardProductSetInput @componentName(name: "merchandising") { + """ + The IDs of collections that this product will be a member of. + """ + collections: [ID!] @gidTypes(types: ["Collection"]) + + """ + Whether gift cards fulfilled from this product are redeemable in any payment currency supported by the store. + + > Note + > This value can't be changed after the product is created. + """ + crossCurrencyRedeemable: Boolean + + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + The files to associate with the product. + + Complexity cost: 1.9 per file. + """ + files: [FileSetInput!] + + """ + 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 + + """ + 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 issuance currency for gift cards fulfilled from this product. + + > Note + > This value can't be changed after the product is created. + """ + issuanceCurrency: CurrencyCode + + """ + The metafields to associate with this product. + + Complexity cost: 0.4 per metafield. + """ + metafields: [MetafieldInput!] + + """ + List of custom product options and option values (maximum of 3 per product). + """ + productOptions: [OptionSetInput!] + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: 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 + + """ + The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The status of the product. + """ + status: ProductStatus + + """ + 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 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 + + """ + A list of variants associated with the gift card product. + + Complexity cost: 0.2 per variant. + """ + variants: [GiftCardProductVariantSetInput!] + + """ + The name of the product's vendor. + """ + vendor: String +} + +""" +Return type for `giftCardProductSet` mutation. +""" +type GiftCardProductSetPayload @componentName(name: "platform") { + """ + The gift card 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: [GiftCardProductSetUserError!]! +} + +""" +Defines errors for GiftCardProductSet mutation. +""" +type GiftCardProductSetUserError implements DisplayableError @componentName(name: "merchandising") { + """ + The error code. + """ + code: GiftCardProductSetUserErrorCode + + """ + 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 `GiftCardProductSetUserError`. +""" +enum GiftCardProductSetUserErrorCode @componentName(name: "platform") { + """ + An option cannot have both metafield linked and nonlinked option values. + """ + CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + Duplicated metafield value for linked option. + """ + DUPLICATED_METAFIELD_VALUE + + """ + Duplicated option name. + """ + DUPLICATED_OPTION_NAME + + """ + Duplicated option value. + """ + DUPLICATED_OPTION_VALUE + + """ + Duplicated value. + """ + DUPLICATED_VALUE + + """ + Cannot link multiple options to the same metafield. + """ + DUPLICATE_LINKED_OPTION + + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + 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 + + """ + Handle already in use. Please provide a new handle. + """ + HANDLE_NOT_UNIQUE + + """ + The id field is not allowed if identifier is provided. + """ + ID_NOT_ALLOWED + + """ + The identifier value does not match the value of the corresponding field in the input. + """ + INPUT_MISMATCH + + """ + Input is not valid. + """ + INVALID_INPUT + + """ + Metafield is not valid. + """ + INVALID_METAFIELD + + """ + Invalid metafield value for linked option. + """ + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """ + Product is not valid. + """ + INVALID_PRODUCT + + """ + Product variant is not valid. + """ + INVALID_VARIANT + + """ + Error processing request in the background job. + """ + JOB_ERROR + + """ + No valid metafield definition found for linked option. + """ + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """ + Linked options are currently not supported for this shop. + """ + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """ + The input argument `metafields` (if present) must contain the `customId` value. + """ + METAFIELD_MISMATCH + + """ + The input field corresponding to the identifier is required. + """ + MISSING_FIELD_REQUIRED + + """ + Resource matching the identifier was not found. + """ + NOT_FOUND + + """ + Options over limit. + """ + OPTIONS_OVER_LIMIT + + """ + Option does not exist. + """ + OPTION_DOES_NOT_EXIST + + """ + Each option must have at least one option value specified. + """ + OPTION_VALUES_MISSING + + """ + Option values over limit. + """ + OPTION_VALUES_OVER_LIMIT + + """ + Option value does not exist. + """ + OPTION_VALUE_DOES_NOT_EXIST + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + The specified product is not a gift card. The giftCardProductSet mutation can only be used with gift card products. + """ + PRODUCT_MUST_BE_GIFT_CARD + + """ + Must specify product options when updating variants. + """ + PRODUCT_OPTIONS_INPUT_MISSING + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Product variant does not exist. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST + + """ + Must specify variants when updating options. + """ + VARIANTS_INPUT_MISSING + + """ + Number of product variants exceeds shop limit. + """ + VARIANTS_OVER_LIMIT +} + +""" +The gift card configuration settings for a +[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), +including the +[`issuanceCurrency`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardProductSettings#field-GiftCardProductSettings.fields.issuanceCurrency) +and whether the gift card can be redeemed across currencies via +[`crossCurrencyRedeemable`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardProductSettings#field-GiftCardProductSettings.fields.crossCurrencyRedeemable). +Configure these settings when creating a gift card product with the +[`giftCardProductSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet) +mutation. +""" +type GiftCardProductSettings @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + Whether the gift card can be redeemed in currencies other than the issuance currency. + """ + crossCurrencyRedeemable: Boolean! + + """ + The currency in which the gift card fulfilled by this product is issued. + """ + issuanceCurrency: CurrencyCode +} + +""" +The input fields for specifying a gift card product variant to create or update with the +[`giftCardProductSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet) +mutation. + +Include an +[`id`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/GiftCardProductSetVariantInput#field-GiftCardProductSetVariantInput.fields.id) +to update an existing variant, or omit it to create a new one. Gift card variant defaults are +applied automatically, meaning variants are set to non-taxable, don't require shipping, and their inventory is untracked. +""" +input GiftCardProductVariantSetInput @componentName(name: "merchandising") { + """ + The value of the barcode associated with the product. + """ + barcode: String + + """ + 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 + + """ + Specifies the product variant to update or create a new variant if absent. + """ + id: ID @gidTypes(types: ["ProductVariant"]) + + """ + Additional customizable information about the product variant. + + Complexity cost: 0.4 per variant metafield. + """ + metafields: [MetafieldInput!] + + """ + The custom properties that a shop owner uses to define product variants. + """ + optionValues: [VariantOptionValueInput!]! + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int + + """ + The price of the variant. + """ + price: Money + + """ + Indicates whether the product variant is created as published or unpublished. + This option is only available for new product variants. + """ + published: Boolean + + """ + The SKU for the variant. Case-sensitive string. + """ + sku: String +} + +""" +Represents a recipient who will receive the issued gift card. +""" +type GiftCardRecipient @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") @protectedObject(subject: "customer") { + """ + The message sent with the gift card. + """ + message: String + + """ + The preferred name of the recipient who will receive the gift card. + """ + preferredName: String @protectedField(subject: "customer", content: "name") + + """ + 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 @componentName(name: "stored_value_instruments") { + """ + The ID of the customer who will be the recipient of the gift card. Requires `write_customers` access_scope. + """ + id: ID! @gidTypes(types: ["Customer"]) + + """ + The personalized message intended for the recipient. + """ + message: String + + """ + The preferred name of the recipient. + """ + preferredName: 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The customer could not be found. + """ + CUSTOMER_NOT_FOUND + + """ + The gift card could not be found. + """ + GIFT_CARD_NOT_FOUND + + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `giftCardSendNotificationToRecipient` mutation. +""" +type GiftCardSendNotificationToRecipientPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The gift card could not be found. + """ + GIFT_CARD_NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + The recipient could not be found. + """ + RECIPIENT_NOT_FOUND +} + +""" +The set of valid sort keys for the GiftCard query. +""" +enum GiftCardSortKeys @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_gift_card_transactions` access scope.") @componentName(name: "stored_value_instruments") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "stored_value_instruments") { + """ + 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 @requiredAccess(scope: "`read_gift_card_transactions` access scope.") @componentName(name: "stored_value_instruments") { + """ + 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 @componentName(name: "platform") { + """ + The gift card's value exceeds the allowed limits. + """ + GIFT_CARD_LIMIT_EXCEEDED + + """ + The gift card could not be found. + """ + GIFT_CARD_NOT_FOUND + + """ + The gift card does not have sufficient funds to satisfy the request. + """ + INSUFFICIENT_FUNDS + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + The currency provided does not match the currency of the gift card. + """ + MISMATCHING_CURRENCY + + """ + A positive amount must be used. + """ + NEGATIVE_OR_ZERO_AMOUNT +} + +""" +The input fields to update a gift card. +""" +input GiftCardUpdateInput @componentName(name: "stored_value_instruments") { + """ + The strategy used to convert the gift card's balance when it's redeemed in a currency other than the one it was issued in. + """ + crossCurrencyRedemptionStrategy: GiftCardCrossCurrencyRedemptionStrategy + + """ + 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 @gidTypes(types: ["Customer"]) + + """ + The date at which the gift card will expire. If set to `null`, 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 + + """ + Whether to enable sending of notifications to the customer or recipient of the gift card. + """ + notify: Boolean + + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") { + """ + 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 @componentName(name: "platform") { + """ + The data stored in the resource, represented as a digest. + """ + compareDigest: String! +} + +""" +Represents an object that has a list of events. +""" +interface HasEvents @componentName(name: "timeline") { + """ + The paginated list of events associated with the host subject. + """ + events( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): EventConnection! +} + +""" +Localization extensions associated with the specified resource. For example, the tax id for government invoice. +""" +interface HasLocalizationExtensions @componentName(name: "platform") { + """ + List of localization extensions for the resource. + """ + localizationExtensions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The country codes of the extensions. + """ + countryCodes: [CountryCode!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The purpose of the extensions. + """ + purposes: [LocalizationExtensionPurpose!] + + """ + 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 @componentName(name: "platform") { + """ + List of localized fields for the resource. + """ + localizedFields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The country codes of the extensions. + """ + countryCodes: [CountryCode!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The purpose of the extensions. + """ + purposes: [LocalizedFieldPurpose!] + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): LocalizedFieldConnection! +} + +""" +Resources that metafield definitions can be applied to. +""" +interface HasMetafieldDefinitions @componentName(name: "content") { + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 @componentName(name: "content") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! +} + +""" +The input fields to identify a metafield on an owner resource by namespace and key. +""" +input HasMetafieldsIdentifier @componentName(name: "content") { + """ + The key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String +} + +""" +The input fields that identify metafield definitions. +""" +input HasMetafieldsMetafieldIdentifierInput @componentName(name: "content") { + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! + + """ + 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 +} + +""" +Published translations associated with the resource. +""" +interface HasPublishedTranslations @componentName(name: "markets") { + """ + 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 @gidTypes(types: ["Market"]) + ): [Translation!]! +} + +""" +Represents information about the store credit accounts associated to the specified owner. +""" +interface HasStoreCreditAccounts @requiredAccess(scope: "`read_store_credit_accounts` access scope.") @componentName(name: "stored_value_instruments") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | currency_code | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): StoreCreditAccountConnection! +} + +""" +Return type for `httpServerPixelUpdate` mutation. +""" +type HttpServerPixelUpdatePayload @componentName(name: "platform") @privatelyDocumented { + """ + The server pixel as configured by the mutation. + """ + serverPixel: ServerPixel + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsServerPixelUserError!]! +} + +""" +Represents a Hydrogen storefront. +""" +type HydrogenStorefront @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { + """ + The date and time when the Hydrogen storefront was created. + """ + createdAt: DateTime! + + """ + The current deployment for the Hydrogen storefront. + """ + currentProductionDeployment: HydrogenStorefrontDeployment + + """ + The variables associated with the preview Hydrogen storefront environment. + """ + environmentVariables( + """ + The name of the environment branch to query. + """ + branchName: String + + """ + The handle of the environment to query. + """ + handle: String + ): [HydrogenStorefrontEnvironmentVariable!]! + + """ + All environments for the storefront. + """ + environments: [HydrogenStorefrontEnvironment!]! + + """ + The handle of the Hydrogen storefront. + """ + handle: String + + """ + The ID of the Hydrogen storefront. + """ + id: ID! + + """ + The token that allows the custom storefront to be deployed to Oxygen. + """ + oxygenDeploymentToken: String + + """ + The production URL for a Hydrogen storefront. + """ + productionUrl: URL + + """ + The name of the Hydrogen storefront. + """ + title: String! + + """ + The date and time when the Hydrogen storefront was last updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `hydrogenStorefrontCreate` mutation. +""" +type HydrogenStorefrontCreatePayload @componentName(name: "platform") { + """ + The Hydrogen storefront that was just created. + """ + hydrogenStorefront: HydrogenStorefront + + """ + ID for job that connects the Hydrogen storefront to Oxygen. + """ + jobId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [HydrogenStorefrontCreateUserError!]! +} + +""" +An error that occurs during the execution of `HydrogenStorefrontCreate`. +""" +type HydrogenStorefrontCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: HydrogenStorefrontCreateUserErrorCode + + """ + 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 `HydrogenStorefrontCreateUserError`. +""" +enum HydrogenStorefrontCreateUserErrorCode @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + The Hydrogen storefront app isn't installed. + """ + CUSTOM_STOREFRONTS_NOT_INSTALLED + + """ + The Hydrogen storefront failed to be created. + """ + FAILED_TO_CREATE + + """ + Your plan doesn't include Hydrogen storefronts. + """ + HYDROGEN_NOT_SUPPORTED_ON_PLAN + + """ + The input value is invalid. + """ + INVALID + + """ + The job couldn't be processed. Please try again later. + """ + JOB_NOT_ENQUEUED + + """ + The title for the storefront is already taken. + """ + TITLE_ALREADY_EXISTS + + """ + The title for the storefront is too long. + """ + TITLE_TOO_LONG +} + +""" +The input fields use to replace application urls on a Customer OAuth Application. +""" +input HydrogenStorefrontCustomerApplicationUrlsReplaceInput @componentName(name: "channels") { + """ + Add and remove urls from the list of allowed JavaScript url origins. + """ + javascriptOrigin: HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput + + """ + Add and remove urls from the list of allowed urls that can be redirected to post-logout. + """ + logoutUris: HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput + + """ + Add and remove urls from the list of allowed callback urls. + """ + redirectUri: HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput +} + +""" +Return type for `hydrogenStorefrontCustomerApplicationUrlsReplace` mutation. +""" +type HydrogenStorefrontCustomerApplicationUrlsReplacePayload @componentName(name: "platform") { + """ + List of allowed javaScript url origins. + """ + javascriptOrigin: [String!] + + """ + List of allowed urls that can be redirected to post-logout. + """ + logoutUris: [String!] + + """ + List of allowed callback urls. + """ + redirectUri: [String!] + + """ + Whether the customer application was updated successfully. + """ + success: Boolean + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [HydrogenStorefrontCustomerUserError!]! +} + +""" +The input fields used to replace Customer Account application urls. +""" +input HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput @componentName(name: "channels") { + """ + Url to add. + """ + add: [String!] + + """ + Regular expression pattern for Urls to remove. + """ + removeRegex: String +} + +""" +Catches validation errors when setting up customer authentication for your +Hydrogen storefront, so you can quickly fix configuration issues and get +customers logging in smoothly. + +For example, when setting invalid redirect URLs or JavaScript origins that don't +meet security requirements, this error type captures the specific validation +failure with clear guidance for resolution. + +Use `HydrogenStorefrontCustomerUserError` to: +- Handle customer account configuration errors +- Display specific validation messages for authentication setup +- Identify problematic URL or origin configurations +- Guide developers through Customer Account API requirements + +Each error includes the field that failed validation and a descriptive message +explaining the specific requirement, making it easier to troubleshoot customer +authentication setup. + +Learn more about [Customer Account API configuration](https://shopify.dev/docs/storefronts/headless/building-with-the-customer-account-api/getting-started). +""" +type HydrogenStorefrontCustomerUserError implements DisplayableError @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") { + """ + The error code. + """ + code: HydrogenStorefrontCustomerUserErrorCode + + """ + 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 `HydrogenStorefrontCustomerUserError`. +""" +enum HydrogenStorefrontCustomerUserErrorCode @componentName(name: "platform") { + """ + Customer Account API application not found. + """ + CUSTOMER_ACCOUNT_API_APPLICATION_NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + The Regex is invalid. + """ + REGEX_INVALID +} + +""" +Tracks each version of your Hydrogen storefront as it gets deployed, giving you +a complete history of what's live and what's been released. Every time you push +updates to your storefront, this creates a new deployment record that captures +the commit information and timestamps. + +For example, when pushing updates to a Hydrogen storefront, each deployment +represents a distinct version with its own commit SHA, commit message, and +deployment timestamp, allowing teams to track release history. + +Use `HydrogenStorefrontDeployment` to: +- Track deployment history and version information +- Access deployment metadata and timestamps +- View commit information for each deployment + +Deployments maintain immutable records of each release, providing audit trails for storefront changes. + +Learn more about [Hydrogen deployment workflows](https://shopify.dev/docs/storefronts/headless/hydrogen/deployments). +""" +type HydrogenStorefrontDeployment @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { + """ + The latest commit message for the deployment. + """ + commitMessage: String + + """ + The latest commit SHA for the deployment. + """ + commitSha: String + + """ + The date and time when the deployment was created. + """ + createdAt: DateTime! + + """ + The ID of the Hydrogen storefront deployment. + """ + id: ID! + + """ + The date and time when the deployment was created. + """ + updatedAt: DateTime! +} + +""" +Defines an environment context for a Hydrogen storefront, such as development, +staging, or production. Each environment maintains its own configuration and variables. + +For example, a storefront might have separate environments for testing new +features in development and serving customers in production, each with distinct +configuration values. + +Environments provide isolated contexts for storefront operations and configuration management. + +Learn more about [Hydrogen environments](https://shopify.dev/docs/custom-storefronts/hydrogen). +""" +type HydrogenStorefrontEnvironment @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { + """ + The branch associated with the custom storefront environment. + """ + branch: String + + """ + The date and time when the environment was created. + """ + createdAt: DateTime! + + """ + The handle of the custom storefront environment. + """ + handle: String + + """ + The ID of the custom storefront environment. + """ + id: ID! + + """ + The name of the custom storefront environment. + """ + name: String! + + """ + The type of hydrogen storefront environment. + """ + type: CustomStorefrontEnvironmentType! + + """ + The date and time when the environment was last updated. + """ + updatedAt: DateTime! + + """ + The URL of the custom storefront environment. + """ + url: URL +} + +""" +Configuration variables that customize how your Hydrogen storefront behaves +across different environments, letting you store key-value pairs for +configuration settings. + +For example, environment variables might store configuration values that differ +between development and production environments. + +Variables enable flexible storefront configuration without code changes across different deployment contexts. + +Learn more about [Hydrogen configuration](https://shopify.dev/docs/custom-storefronts/hydrogen). +""" +type HydrogenStorefrontEnvironmentVariable @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { + """ + The ID of the environment variable. + """ + id: ID! + + """ + Whether the environment variable is secret. + """ + isSecret: Boolean! + + """ + The key of the environment variable. + """ + key: String! + + """ + Whether the environment variable is read-only. + """ + readOnly: Boolean! + + """ + The value of the environment variable. + """ + value: String! +} + +""" +Return type for `hydrogenStorefrontEnvironmentVariableBulkReplace` mutation. +""" +type HydrogenStorefrontEnvironmentVariableBulkReplacePayload @componentName(name: "platform") { + """ + The created environment variables. + """ + environmentVariables: [HydrogenStorefrontEnvironmentVariable!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [EnvironmentVariablesUserError!]! +} + +""" +The input fields for environment variables. +""" +input HydrogenStorefrontEnvironmentVariableInput @componentName(name: "channels") { + """ + Whether the variable value is hidden from the user. + """ + isSecret: Boolean = false + + """ + The key for your environment variable. + """ + key: String! + + """ + The value of the environment variable. + """ + value: String! +} + +""" +Tracks long-running background operations for your Hydrogen storefront so you +can monitor progress without waiting around. When you kick off time-intensive +tasks that would normally timeout, the system creates a job that you can check +on periodically. + +For example, when performing operations that take time to complete, the system +creates a job that you can poll to track progress and completion status. + +Use the `HydrogenStorefrontJob` object to: +- Monitor operation progress +- Track the status of background tasks +- Handle asynchronous storefront management operations + +Jobs provide a reliable way to manage operations that may take several minutes +to complete, allowing your CLI tools to provide progress feedback without +maintaining long-lived connections. + +Learn more about [Hydrogen operations](https://shopify.dev/docs/custom-storefronts/hydrogen). +""" +type HydrogenStorefrontJob @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { + """ + Indicates whether the job is done. + """ + done: Boolean! + + """ + The errors for the job. + """ + errors: [CliHydrogenStorefrontJobError!]! + + """ + The ID of the job. + """ + id: ID! + + """ + The results for the job. + """ + results: [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 + +""" +Details of a staff member's associated Shopify Identity. +""" +type IdentityAccount @requiredAccess(scope: "`read_users` access scope.") @componentName(name: "user_management") { + """ + The account settings page URL for the staff member. + """ + url: URL +} + +""" +Represents a customer's identity provider subject identifier. +""" +type IdentityProviderSubject implements Node @requiredAccess(scope: "The user must have access to manage identity providers.") @componentName(name: "access_and_auth") { + """ + The date and time when the provider subject was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID for the provider subject. + """ + id: ID! + + """ + The merchant-configured name of the third-party identity provider. + """ + providerName: String + + """ + The unique subject identifier assigned to the customer by the authentication provider. + """ + subject: String! + + """ + The date and time when the provider subject was last updated. + """ + updatedAt: DateTime! +} + +""" +Represents an image resource. +""" +type Image implements HasMetafields & HasPublishedTranslations @componentName(name: "platform") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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( + """ + Crops the image according to the specified region. + """ + crop: CropRegion + + """ + Image height in pixels between 1 and 5760. + """ + maxHeight: Int + + """ + Image width in pixels between 1 and 5760. + """ + maxWidth: Int + + """ + Best effort conversion of image into content type (SVG -> PNG, Anything -> JPG, Anything -> WEBP are supported). + """ + preferredContentType: ImageContentType + + """ + Image size multiplier for high-resolution retina displays. Must be between 1 and 3. + """ + scale: Int = 1 + ): 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 @gidTypes(types: ["Market"]) + ): [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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + A BMP image. + """ + BMP + + """ + A JPG image. + """ + JPG + + """ + A PNG image. + """ + PNG + + """ + A WEBP image. + """ + WEBP +} + +""" +An auto-generated type which holds one Image and a cursor during pagination. +""" +type ImageEdge @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + A word or phrase to share the nature or contents of an image. + """ + altText: String + + """ + A globally-unique ID. + """ + id: ID @gidTypes(types: ["CollectionImage", "ProductImage"]) + + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + Defines an arbitrary cropping region. + """ + cropRegion: CropRegionInput + + """ + Image height in pixels between 1 and 5760. + """ + maxHeight: Int + + """ + Image width in pixels between 1 and 5760. + """ + maxWidth: Int + + """ + 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 + + """ + Image size multiplier for high-resolution retina displays. Must be within 1..3. + """ + scale: Int = 1 +} + +""" +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 @componentName(name: "platform") { + """ + The parameter name. + """ + name: String! + + """ + The parameter value. + """ + value: String! +} + +""" +Answers the question if prices include duties and / or taxes. +""" +enum InclusiveDutiesPricingStrategy @componentName(name: "taxes") { + """ + 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 @componentName(name: "taxes") { + """ + 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 @componentName(name: "fulfillments") { + """ + The ID of the rejected line item. + """ + fulfillmentOrderLineItemId: ID! @gidTypes(types: ["FulfillmentOrderLineItem"]) + + """ + The rejection message of the line item. + """ + message: String +} + +""" +A string representing a choice of DDP or DDU configuration. +""" +enum IncotermConfiguration @componentName(name: "taxes") { + """ + Duties paid at delivery. + """ + DAP + + """ + Duties paid at checkout. + """ + DDP + + """ + Duties paid at delivery. + """ + DDU + + """ + This region is not supported. + """ + UNSUPPORTED +} + +""" +Represents whether the duties and international taxes are paid at the time of purchase or to be paid upon delivery. +""" +type IncotermInformation @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope or `read_draft_orders` access scope.") @componentName(name: "taxes") { + """ + The incoterm representing when duties and international taxes will be payed. + """ + incoterm: IncotermConfiguration + + """ + The reason why the incoterm was used for the order. + """ + reason: IncotermReason +} + +""" +A string representing the reason for an incoterm configuration on an order. +""" +enum IncotermReason @componentName(name: "taxes") { + """ + The incoterm was selected by the buyer during checkout. + """ + BUYER_CONFIGURED + + """ + The incoterm followed its default value of DDP, no configuration was specified. + """ + DEFAULT_DUTIES_AND_TAXES + + """ + Duties and import taxes are included in the product price. + """ + DUTY_AND_TAX_INCLUSIVE_PRICING + + """ + Duties are included in the product price. + """ + DUTY_INCLUSIVE_PRICING + + """ + The incoterm was determined by the duty and tax calculation fallback. + """ + DUTY_TAX_CALCULATION_FALLBACK + + """ + An error occured while attempting to calculate duties and taxes. + """ + ERROR_OCCURED + + """ + The incoterm was configured by Flow. + """ + FLOW_CONFIGURED + + """ + The incoterm was determined by the Low Value Goods Tax fallback. + """ + LOW_VALUE_GOODS_TAXES_APPLY + + """ + The incoterm is the result of a merchant configuration. + """ + PRE_CONFIGURED + + """ + The incoterm was determined by the Tax Calculation fallback. + """ + TAX_CALCULATION_FALLBACK + + """ + The destination country is unsupported. + """ + UNSUPPORTED @deprecated(reason: "Use UNSUPPORTED_REGION instead") + + """ + The destination country is unsupported. + """ + UNSUPPORTED_REGION +} + +""" +Return type for `inventoryActivate` mutation. +""" +type InventoryActivatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "inventory") { + """ + The quantity changes of items at locations to be made. + """ + changes: [InventoryChangeInput!]! + + """ + The quantity [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + to be adjusted. + """ + name: String! + + """ + 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 +} + +""" +Return type for `inventoryAdjustQuantities` mutation. +""" +type InventoryAdjustQuantitiesPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The quantities couldn't be adjusted. Try again. + """ + ADJUST_QUANTITIES_FAILED + + """ + The changeFromQuantity argument no longer matches the persisted quantity. + """ + CHANGE_FROM_QUANTITY_STALE + + """ + 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 + + """ + 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 higher than 2,000,000,000. + """ + INVALID_QUANTITY_TOO_HIGH + + """ + The quantity can't be lower than -2,000,000,000. + """ + INVALID_QUANTITY_TOO_LOW + + """ + The specified reason is invalid. + """ + INVALID_REASON + + """ + The specified reference document is invalid. + """ + INVALID_REFERENCE_DOCUMENT + + """ + The inventory item is not stocked at the location. + """ + ITEM_NOT_STOCKED_AT_LOCATION + + """ + 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 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 service is temporarily unavailable. Try again later. + """ + SERVICE_UNAVAILABLE +} + +""" +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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { + """ + 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!] @gidTypes(types: ["InventoryItem"]) + + """ + The IDs of the locations to filter changes by. + """ + locationIds: [ID!] @gidTypes(types: ["Location"]) + + """ + The [names](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + of 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 +} + +""" +An auto-generated type for paginating through multiple InventoryAdjustmentGroups. +""" +type InventoryAdjustmentGroupConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [InventoryAdjustmentGroupEdge!]! + + """ + A list of nodes that are contained in InventoryAdjustmentGroupEdge. 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: [InventoryAdjustmentGroup!]! + + """ + 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 InventoryAdjustmentGroup and a cursor during pagination. +""" +type InventoryAdjustmentGroupEdge @componentName(name: "inventory") { + """ + 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 InventoryAdjustmentGroupEdge. + """ + node: InventoryAdjustmentGroup! +} + +""" +The input fields required to adjust the available quantity of a product variant at a location. +""" +input InventoryAdjustmentInput @componentName(name: "merchandising") { + """ + 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. This field is + mandatory- you must explicitly pass in a value (even if it's `null`), or else + you will get an error. + """ + changeFromQuantity: Int + + """ + The ID of the location where the available quantity should be adjusted. + """ + locationId: ID! @gidTypes(types: ["Location"]) +} + +""" +The input fields to specify whether the inventory item should be activated or not at the specified location. +""" +input InventoryBulkToggleActivationInput @componentName(name: "inventory") { + """ + 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! + + """ + The ID of the location to modify the inventory item's stocked status. + """ + locationId: ID! @gidTypes(types: ["Location"]) +} + +""" +Return type for `inventoryBulkToggleActivation` mutation. +""" +type InventoryBulkToggleActivationPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + 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 committed quantities. + """ + COMMITTED_INVENTORY_AT_LOCATION + + """ + Failed to stock this inventory item at this location. + """ + FAILED_TO_STOCK_AT_LOCATION + + """ + Failed to unstock this inventory item from this location. + """ + FAILED_TO_UNSTOCK_FROM_LOCATION + + """ + An error occurred while setting the activation status. + """ + GENERIC_ERROR + + """ + Cannot unstock this inventory item from this location because it has incoming quantities. + """ + INCOMING_INVENTORY_AT_LOCATION + + """ + The inventory item was not found. + """ + INVENTORY_ITEM_NOT_FOUND + + """ + 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 + + """ + The location was not found. + """ + LOCATION_NOT_FOUND + + """ + Cannot stock this inventory item at this location because the variant is missing a SKU. + """ + MISSING_SKU + + """ + Cannot unstock this inventory item from this location because it has unavailable quantities. + """ + RESERVED_INVENTORY_AT_LOCATION +} + +""" +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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { + """ + 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 @componentName(name: "inventory") { + """ + 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 match the value you provide, then the mutation fails + with a `CHANGE_FROM_QUANTITY_STALE` error. This prevents unintended overwrites + when the request is based on stale inventory data. + + To skip the CAS check, pass `null`. Use this only when your system is the + source of truth for this inventory and you don’t need to protect against + concurrent updates. + This field is mandatory: you must explicitly pass in a value, even if that + value is `null`, or the mutation returns an error. + + 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 amount by which the inventory quantity will be changed. + """ + delta: Int! + + """ + Specifies the inventory item to which the change will be applied. + """ + inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) + + """ + 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 + + """ + Specifies the location at which the change will be applied. + """ + locationId: ID! @gidTypes(types: ["Location"]) +} + +""" +Return type for `inventoryDeactivate` mutation. +""" +type InventoryDeactivatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_inventory` access scope or `read_products` access scope.") @componentName(name: "inventory") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @requiredAccess(scope: "`read_inventory` access scope.") + + """ + 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 @requiredAccess(scope: "`read_inventory` access scope.") + + """ + The inventory item's quantities at the specified location. + """ + inventoryLevel( + """ + Whether to return the inventory level if it is inactive. + """ + includeInactive: Boolean = false + + """ + ID of the location for which the inventory level is requested. + """ + locationId: ID! @gidTypes(types: ["Location"]) + ): InventoryLevel @requiredAccess(scope: "`read_inventory` access scope.") + + """ + A list of the inventory item's quantities for each location that the inventory item can be stocked at. + """ + inventoryLevels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Whether to include inactive inventory levels. + """ + includeInactive: Boolean = false + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_group_id | id | + | inventory_item_id | id | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): InventoryLevelConnection! @requiredAccess(scope: "`read_inventory` access scope.") + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + ): ProductVariantConnection +} + +""" +An auto-generated type for paginating through multiple InventoryItems. +""" +type InventoryItemConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "inventory") { + """ + 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 @componentName(name: "inventory") { + """ + Unit cost associated with the inventory item, the currency is the shop's default currency. + """ + cost: Decimal + + """ + 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 + + """ + List of country-specific harmonized system codes. + """ + countryHarmonizedSystemCodes: [CountryHarmonizedSystemCodeInput!] + + """ + The harmonized system code of the inventory item. This must be a number between 6 and 13 digits. + """ + harmonizedSystemCode: String + + """ + The measurements of an inventory item. + """ + measurement: InventoryItemMeasurementInput + + """ + 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 + + """ + 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 + + """ + The SKU (stock keeping unit) of the inventory item. + """ + sku: String + + """ + Whether the inventory item is tracked. + """ + tracked: 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 @requiredAccess(scope: "`read_inventory` access scope or `read_products` access scope.") @componentName(name: "inventory") { + """ + A globally-unique ID. + """ + id: ID! + + """ + The weight of the inventory item. + """ + weight: Weight +} + +""" +The input fields for an inventory item measurement. +""" +input InventoryItemMeasurementInput @componentName(name: "inventory") { + """ + Shipping package associated with inventory item. + """ + shippingPackageId: ID @gidTypes(types: ["ShippingPackageV2"]) + + """ + The weight of the inventory item. + """ + weight: WeightInput +} + +""" +Return type for `inventoryItemUpdate` mutation. +""" +type InventoryItemUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { + """ + The quantity of inventory items that are available at the inventory level's associated location. + """ + available: Int! @deprecated(reason: "Use the `quantities` field instead and specify available for names. Example: `quantities(names:[\"available\"]){name quantity}`.\n") + + """ + 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! + + """ + The quantity of inventory items that are going to the inventory level's associated location. + """ + incoming: Int! @deprecated(reason: "Use the `quantities` field instead and specify incoming for names. Example: `quantities(names:[\"incoming\"]){name quantity}`.\n") + + """ + Whether the inventory level is active. + """ + isActive: Boolean! + + """ + 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 + [names](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) + of the requested inventory quantities. + """ + names: [String!]! + ): [InventoryQuantity!]! + + """ + Scheduled changes for the requested quantity names. + """ + scheduledChanges( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | expected_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | quantity_names | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "inventory") { + """ + 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 @componentName(name: "inventory") { + """ + The available quantity of an inventory item at a location. + """ + availableQuantity: Int! + + """ + The ID of a location associated with the inventory level. + """ + locationId: ID! @gidTypes(types: ["Location"]) +} + +""" +The input fields required to move inventory quantities. +""" +input InventoryMoveQuantitiesInput @componentName(name: "inventory") { + """ + The quantity changes of items at locations to be made. + """ + changes: [InventoryMoveQuantityChange!]! + + """ + 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! +} + +""" +Return type for `inventoryMoveQuantities` mutation. +""" +type InventoryMoveQuantitiesPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The changeFromQuantity argument no longer matches the persisted quantity. + """ + CHANGE_FROM_QUANTITY_STALE + + """ + The quantities can't be moved between different locations. + """ + DIFFERENT_LOCATIONS + + """ + 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 + + """ + 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 inventory item is not stocked at the location. + """ + ITEM_NOT_STOCKED_AT_LOCATION + + """ + Only a maximum of 2 ledger document URIs across all changes is allowed. + """ + MAXIMUM_LEDGER_DOCUMENT_URIS + + """ + The quantities couldn't be moved. Try again. + """ + MOVE_QUANTITIES_FAILED + + """ + 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 quantity names for each change can't be the same. + """ + SAME_QUANTITY_NAME + + """ + The service is temporarily unavailable. Try again later. + """ + SERVICE_UNAVAILABLE +} + +""" +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 @componentName(name: "inventory") { + """ + Details about where the move will be made from. + """ + from: InventoryMoveQuantityTerminalInput! + + """ + Specifies the inventory item to which the change will be applied. + """ + inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) + + """ + The amount by which the inventory quantity will be changed. + """ + quantity: Int! + + """ + 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 @componentName(name: "inventory") { + """ + 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`. Use this only when your system is the + source of truth for this inventory and you don’t need to protect against + concurrent updates. + This field is mandatory: you must explicitly pass in a value, even if that + value is `null`, or the mutation returns an error. + + 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 + + """ + 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 + + """ + Specifies the location at which the change will be applied. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + The quantity + [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) to be + moved. + """ + name: String! +} + +""" +General inventory properties for the shop. +""" +type InventoryProperties @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { + """ + 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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { + """ + 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 @componentName(name: "inventory") { + """ + 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`. Use this only when your system is the + source of truth for this inventory and you don’t need to protect against + concurrent updates. + This field is mandatory: you must explicitly pass in a value, even if that + value is `null`, or the mutation returns an error. + + 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 quantity will be set. + """ + inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) + + """ + Specifies the location at which the quantity will be set. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + The quantity to which the inventory quantity will be set. + """ + quantity: Int! +} + +""" +Details about an individual quantity name. +""" +type InventoryQuantityName @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { + """ + 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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "inventory") { + """ + 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 required to set inventory on hand quantities. +""" +input InventorySetOnHandQuantitiesInput @componentName(name: "inventory") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The changeFromQuantity argument no longer matches the persisted quantity. + """ + CHANGE_FROM_QUANTITY_STALE + + """ + The compareQuantity value does not match persisted value. + """ + COMPARE_QUANTITY_STALE + + """ + 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 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 total quantity can't be higher than 1,000,000,000. + """ + INVALID_QUANTITY_TOO_HIGH + + """ + The specified reason is invalid. + """ + INVALID_REASON + + """ + The specified reference document is invalid. + """ + INVALID_REFERENCE_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 + + """ + The service is temporarily unavailable. Try again later. + """ + SERVICE_UNAVAILABLE + + """ + The on-hand quantities couldn't be set. Try again. + """ + SET_ON_HAND_QUANTITIES_FAILED +} + +""" +The input fields required to set inventory quantities. +""" +input InventorySetQuantitiesInput @componentName(name: "inventory") { + """ + The name of quantities to be changed. The only accepted values are: `available` or `on_hand`. + """ + name: String! + + """ + The values to which each quantities will be set. + """ + quantities: [InventoryQuantityInput!]! + + """ + 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 +} + +""" +Return type for `inventorySetQuantities` mutation. +""" +type InventorySetQuantitiesPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The changeFromQuantity value does not match persisted value. + """ + CHANGE_FROM_QUANTITY_STALE + + """ + 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 + + """ + 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 specified inventory item could not be found. + """ + INVALID_INVENTORY_ITEM + + """ + The specified location could not be found. + """ + INVALID_LOCATION + + """ + The quantity name must be either 'available' or 'on_hand'. + """ + INVALID_NAME + + """ + The quantity can't be negative. + """ + INVALID_QUANTITY_NEGATIVE + + """ + 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 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 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 combination of inventoryItemId and locationId must be unique. + """ + NO_DUPLICATE_INVENTORY_ITEM_ID_GROUP_ID_PAIR +} + +""" +The input fields for the quantity to be set for an inventory item at a location. +""" +input InventorySetQuantityInput @componentName(name: "inventory") { + """ + The current quantity to be compared against the persisted quantity. This field + is mandatory- you must explicitly pass in a value (even if it's `null`), or + else you will get an error. 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 quantity will be set. + """ + inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) + + """ + Specifies the location at which the quantity will be set. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + The quantity to which the inventory quantity will be set. + """ + quantity: Int! +} + +""" +Represents an inventory shipment. +""" +type InventoryShipment implements Node @requiredAccess(scope: "`read_inventory_shipments` access scope.") @componentName(name: "inventory") { + """ + A unique barcode for the shipment. + """ + barcode: String + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): InventoryShipmentLineItemConnection + + """ + The number of line items associated with the inventory shipment. Limited to a maximum of 10000 by default. + """ + lineItemsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Failed to activate inventory at location. + """ + ACTIVATION_FAILED + + """ + A single item can't be listed twice. + """ + DUPLICATE_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 quantity is invalid. + """ + INVALID_QUANTITY + + """ + 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 item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM +} + +""" +An auto-generated type for paginating through multiple InventoryShipments. +""" +type InventoryShipmentConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + A single item can't be listed twice. + """ + DUPLICATE_ITEM + + """ + The shipment input cannot be empty. + """ + EMPTY_SHIPMENT_INPUT + + """ + 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 + + """ + One or more items are not valid. + """ + INVALID_ITEM + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + The shipment input is invalid. + """ + INVALID_SHIPMENT_INPUT + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The URL is invalid. + """ + INVALID_URL + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The list of line items is empty. + """ + ITEMS_EMPTY + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM +} + +""" +The input fields to add a shipment. +""" +input InventoryShipmentCreateInput @componentName(name: "inventory") { + """ + A unique barcode for the shipment. + """ + barcode: String + + """ + The date the shipment was created. + """ + dateCreated: DateTime + + """ + The list of line items for the inventory shipment. + """ + lineItems: [InventoryShipmentLineItemInput!]! + + """ + The ID of the inventory movement (transfer or purchase order) this shipment belongs to. + """ + movementId: ID! @gidTypes(types: ["InventoryTransfer", "InventoryPurchaseOrder"]) + + """ + The tracking information for the shipment. + """ + trackingInput: InventoryShipmentTrackingInput +} + +""" +Return type for `inventoryShipmentCreate` mutation. +""" +type InventoryShipmentCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + This barcode is already assigned to another shipment. + """ + BARCODE_DUPLICATE + + """ + Barcode must be 255 characters or less. + """ + BARCODE_TOO_LONG + + """ + Bundled items cannot be used for this operation. + """ + BUNDLED_ITEM + + """ + A single item can't be listed twice. + """ + DUPLICATE_ITEM + + """ + The shipment input cannot be empty. + """ + EMPTY_SHIPMENT_INPUT + + """ + 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 + + """ + One or more items are not valid. + """ + INVALID_ITEM + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + The shipment input is invalid. + """ + INVALID_SHIPMENT_INPUT + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The URL is invalid. + """ + INVALID_URL + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM +} + +""" +Return type for `inventoryShipmentDelete` mutation. +""" +type InventoryShipmentDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Current shipment status does not support this operation. + """ + INVALID_SHIPMENT_STATUS + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND +} + +""" +An auto-generated type which holds one InventoryShipment and a cursor during pagination. +""" +type InventoryShipmentEdge @componentName(name: "inventory") { + """ + 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 @requiredAccess(scope: "`read_inventory_shipments` access scope.") @componentName(name: "inventory") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "inventory") { + """ + 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 @componentName(name: "inventory") { + """ + The inventory item ID for the shipment line item. + """ + inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) + + """ + The quantity for the shipment line item. + """ + quantity: Int! +} + +""" +Return type for `inventoryShipmentMarkInTransit` mutation. +""" +type InventoryShipmentMarkInTransitPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Failed to activate inventory at location. + """ + ACTIVATION_FAILED + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + 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 list of line items is empty. + """ + ITEMS_EMPTY + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM +} + +""" +The input fields to receive an item on an inventory shipment. +""" +input InventoryShipmentReceiveItemInput @componentName(name: "inventory") { + """ + The quantity for the item to be received. + """ + quantity: Int! + + """ + The reason for received item. + """ + reason: InventoryShipmentReceiveLineItemReason! + + """ + The shipment line item ID to be received. + """ + shipmentLineItemId: ID! @gidTypes(types: ["InventoryShipmentLineItem"]) +} + +""" +The reason for receiving a line item on an inventory shipment. +""" +enum InventoryShipmentReceiveLineItemReason @componentName(name: "inventory") { + """ + The line item was accepted. + """ + ACCEPTED + + """ + The line item was rejected. + """ + REJECTED +} + +""" +Return type for `inventoryShipmentReceive` mutation. +""" +type InventoryShipmentReceivePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + 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 item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND +} + +""" +Return type for `inventoryShipmentRemoveItems` mutation. +""" +type InventoryShipmentRemoveItemsPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + Current shipment status does not support this operation. + """ + INVALID_SHIPMENT_STATUS + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND +} + +""" +Return type for `inventoryShipmentSetBarcode` mutation. +""" +type InventoryShipmentSetBarcodePayload @componentName(name: "platform") { + """ + The inventory shipment with the updated barcode. + """ + inventoryShipment: InventoryShipment + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [InventoryShipmentSetBarcodeUserError!]! +} + +""" +An error that occurs during the execution of `InventoryShipmentSetBarcode`. +""" +type InventoryShipmentSetBarcodeUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: InventoryShipmentSetBarcodeUserErrorCode + + """ + 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 `InventoryShipmentSetBarcodeUserError`. +""" +enum InventoryShipmentSetBarcodeUserErrorCode @componentName(name: "platform") { + """ + This barcode is already assigned to another shipment. + """ + BARCODE_DUPLICATE + + """ + Barcode must be 255 characters or less. + """ + BARCODE_TOO_LONG + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND +} + +""" +Return type for `inventoryShipmentSetTracking` mutation. +""" +type InventoryShipmentSetTrackingPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The URL is invalid. + """ + INVALID_URL + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND +} + +""" +The set of valid sort keys for the InventoryShipment query. +""" +enum InventoryShipmentSortKeys @componentName(name: "platform") { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `status` value. + """ + STATUS +} + +""" +The status of an inventory shipment. +""" +enum InventoryShipmentStatus @componentName(name: "inventory") { + """ + The inventory shipment has been created but not yet shipped. + """ + DRAFT + + """ + The inventory shipment is currently in transit. + """ + IN_TRANSIT + + """ + Status not included in the current enumeration set. + """ + OTHER + + """ + The inventory shipment has been partially received at the destination. + """ + PARTIALLY_RECEIVED + + """ + The inventory shipment has been completely received at the destination. + """ + RECEIVED +} + +""" +Represents the tracking information for an inventory shipment. +""" +type InventoryShipmentTracking @requiredAccess(scope: "`read_inventory_shipments` access scope.") @componentName(name: "inventory") { + """ + 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 @componentName(name: "inventory") { + """ + The estimated date and time that the shipment will arrive. + """ + arrivesAt: DateTime + + """ + 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 tracking number for the shipment. + """ + trackingNumber: 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 input fields for a line item on an inventory shipment. +""" +input InventoryShipmentUpdateItemQuantitiesInput @componentName(name: "inventory") { + """ + The quantity for the shipment line item. + """ + quantity: Int! + + """ + The ID for the inventory shipment line item. + """ + shipmentLineItemId: ID! @gidTypes(types: ["InventoryShipmentLineItem"]) +} + +""" +Return type for `inventoryShipmentUpdateItemQuantities` mutation. +""" +type InventoryShipmentUpdateItemQuantitiesPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The quantity is invalid. + """ + INVALID_QUANTITY + + """ + Current shipment status does not support this operation. + """ + INVALID_SHIPMENT_STATUS + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The shipment was not found. + """ + SHIPMENT_NOT_FOUND +} + +""" +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 @requiredAccess(scope: "`read_inventory_transfers` access scope. Also: The user must have permission to view products.") @componentName(name: "inventory") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Filter line items to those matching specific inventory item IDs. + """ + inventoryItemIds: [ID!] @gidTypes(types: ["InventoryItem"]) + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): InventoryTransferLineItemConnection! + + """ + The number of line items associated with the inventory transfer. Limited to a maximum of 10000 by default. + """ + lineItemsCount( + """ + Filter line items to those matching specific inventory item IDs. + """ + inventoryItemIds: [ID!] @gidTypes(types: ["InventoryItem"]) + + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + Shipment already exists for the transfer. + """ + SHIPMENT_EXISTS + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND +} + +""" +An auto-generated type for paginating through multiple InventoryTransfers. +""" +type InventoryTransferConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "inventory") { + """ + The date and time the inventory transfer was created. If left blank, defaults to the current date and time in UTC format. + """ + dateCreated: DateTime + + """ + The destination location for the inventory transfer. + """ + destinationLocationId: ID @gidTypes(types: ["Location"]) + + """ + The list of line items for the inventory transfer. + """ + lineItems: [InventoryTransferLineItemInput!]! = [] + + """ + A note to add to the Inventory Transfer. + """ + note: String + + """ + The origin location for the inventory transfer. + """ + originLocationId: ID @gidTypes(types: ["Location"]) + + """ + The reference name to add to the inventory transfer. + """ + referenceName: String + + """ + The tags to add to the inventory transfer. + """ + tags: [String!] +} + +""" +Return type for `inventoryTransferCreateAsReadyToShip` mutation. +""" +type InventoryTransferCreateAsReadyToShipPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Bundled items cannot be used for this operation. + """ + BUNDLED_ITEM + + """ + A single item can't be listed twice. + """ + DUPLICATE_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 quantity is invalid. + """ + INVALID_QUANTITY + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The list of line items is empty. + """ + ITEMS_EMPTY + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + A location is required for this operation. + """ + LOCATION_REQUIRED + + """ + The tag exceeds the maximum length. + """ + TAG_EXCEEDS_MAX_LENGTH + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The origin location cannot be the same as the destination location. + """ + TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM +} + +""" +The input fields to create an inventory transfer. +""" +input InventoryTransferCreateInput @componentName(name: "inventory") { + """ + The date and time the inventory transfer was created. If left blank, defaults to the current date and time in UTC format. + """ + dateCreated: DateTime + + """ + The destination location for the inventory transfer. + """ + destinationLocationId: ID @gidTypes(types: ["Location"]) + + """ + The list of line items for the inventory transfer. + """ + lineItems: [InventoryTransferLineItemInput!]! = [] + + """ + A note to add to the Inventory Transfer. + """ + note: String + + """ + The origin location for the inventory transfer. + """ + originLocationId: ID @gidTypes(types: ["Location", "Supplier"]) + + """ + The reference name to add to the inventory transfer. + """ + referenceName: String + + """ + The tags to add to the inventory transfer. + """ + tags: [String!] +} + +""" +Return type for `inventoryTransferCreate` mutation. +""" +type InventoryTransferCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Bundled items cannot be used for this operation. + """ + BUNDLED_ITEM + + """ + A single item can't be listed twice. + """ + DUPLICATE_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 quantity is invalid. + """ + INVALID_QUANTITY + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The tag exceeds the maximum length. + """ + TAG_EXCEEDS_MAX_LENGTH + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The origin location cannot be the same as the destination location. + """ + TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM +} + +""" +Return type for `inventoryTransferDelete` mutation. +""" +type InventoryTransferDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + A resource was not in the correct state for the operation to succeed. + """ + INVALID_STATE + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND +} + +""" +Return type for `inventoryTransferDuplicate` mutation. +""" +type InventoryTransferDuplicatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 transfer was not found. + """ + TRANSFER_NOT_FOUND +} + +""" +An auto-generated type which holds one InventoryTransfer and a cursor during pagination. +""" +type InventoryTransferEdge @componentName(name: "inventory") { + """ + 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 @componentName(name: "inventory") { + """ + The date the inventory transfer was created. + """ + dateCreated: Date + + """ + The destination location for the inventory transfer. The destination location can only be + changed for draft transfers. + """ + destinationId: ID @gidTypes(types: ["Location"]) + + """ + A note to add to the Inventory Transfer. + """ + note: String + + """ + The origin location for the inventory transfer. The origin location can only be changed + for draft transfers. + """ + originId: ID @gidTypes(types: ["Location", "Supplier"]) + + """ + The reference name to add to the inventory transfer. + """ + referenceName: String + + """ + The tags to add to the inventory transfer. + """ + tags: [String!] +} + +""" +Return type for `inventoryTransferEdit` mutation. +""" +type InventoryTransferEditPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The tag exceeds the maximum length. + """ + TAG_EXCEEDS_MAX_LENGTH + + """ + The location of a transfer cannot be updated. Only Draft Transfers can mutate their locations. + """ + TRANSFER_LOCATION_IMMUTABLE + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The origin location cannot be the same as the destination location. + """ + TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION +} + +""" +Represents a line item belonging to an inventory transfer. +""" +type InventoryTransferLineItem implements Node @requiredAccess(scope: "`read_inventory_transfers` access scope. Also: The user must have permission to view products.") @componentName(name: "inventory") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "inventory") { + """ + 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 @componentName(name: "inventory") { + """ + The inventory item ID for the transfer line item. + """ + inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) + + """ + The quantity for the transfer line item. + """ + quantity: Int! +} + +""" +Represents an update to a single transfer line item. +""" +type InventoryTransferLineItemUpdate @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + One or more items are not valid. + """ + INVALID_ITEM + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The list of line items is empty. + """ + ITEMS_EMPTY + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + A location is required for this operation. + """ + LOCATION_REQUIRED + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND +} + +""" +The input fields to remove inventory items from a transfer. +""" +input InventoryTransferRemoveItemsInput @componentName(name: "inventory") { + """ + The ID of the inventory transfer where the items will be removed. + """ + id: ID! @gidTypes(types: ["InventoryTransfer"]) + + """ + 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!] @gidTypes(types: ["InventoryTransferLineItem"]) +} + +""" +Return type for `inventoryTransferRemoveItems` mutation. +""" +type InventoryTransferRemoveItemsPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + 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 + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The line item cannot be removed because it appears on a draft shipment with quantity `0`. + """ + ITEM_PRESENT_ON_DRAFT_SHIPMENT_WITH_ZERO_QUANTITY + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND +} + +""" +The input fields to the InventoryTransferSetItems mutation. +""" +input InventoryTransferSetItemsInput @componentName(name: "inventory") { + """ + The ID of the inventory transfer where the items will be set. + """ + id: ID! @gidTypes(types: ["InventoryTransfer"]) + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Bundled items cannot be used for this operation. + """ + BUNDLED_ITEM + + """ + A single item can't be listed twice. + """ + DUPLICATE_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 quantity is invalid. + """ + INVALID_QUANTITY + + """ + Current transfer status does not support this operation. + """ + INVALID_TRANSFER_STATUS + + """ + The item is not stocked at the intended location. + """ + INVENTORY_STATE_NOT_ACTIVE + + """ + The item was not found. + """ + ITEM_NOT_FOUND + + """ + The location selected is not active. + """ + LOCATION_NOT_ACTIVE + + """ + The location selected can't be found. + """ + LOCATION_NOT_FOUND + + """ + The transfer was not found. + """ + TRANSFER_NOT_FOUND + + """ + The item does not track inventory. + """ + UNTRACKED_ITEM +} + +""" +The status of a transfer. +""" +enum InventoryTransferStatus @componentName(name: "inventory") { + """ + The inventory transfer has been canceled. + """ + CANCELED + + """ + The inventory transfer has been created but not yet finalized. + """ + DRAFT + + """ + The inventory transfer is in progress, with a shipment currently underway or received. + """ + IN_PROGRESS + + """ + Status not included in the current enumeration set. + """ + OTHER + + """ + The inventory transfer has been created, but not yet shipped. + """ + READY_TO_SHIP + + """ + The inventory transfer has been completely received at the destination. + """ + TRANSFERRED +} + +""" +The financial transfer details for a return outcome that results in an invoice. +""" +type InvoiceReturnOutcome @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + Church Slavic. + """ + CU + + """ + 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. + """ + PT + + """ + 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 + + """ + Volapük. + """ + VO + + """ + Wolof. + """ + WO + + """ + Xhosa. + """ + XH + + """ + Yiddish. + """ + YI + + """ + Yoruba. + """ + YO + + """ + Chinese. + """ + ZH + + """ + Chinese (Simplified). + """ + ZH_CN + + """ + Chinese (Traditional). + """ + ZH_TW + + """ + Zulu. + """ + ZU +} + +""" +The input fields for customer information in lead capture. +""" +input LeadCaptureCustomerInput @componentName(name: "marketplaces") @privatelyDocumented { + """ + The email address of the captured lead. + """ + email: String! +} + +""" +The input fields for discount information in lead capture. +""" +input LeadCaptureDiscountInput @componentName(name: "marketplaces") @privatelyDocumented { + """ + The code to use the discount. Must be unique to the shop. + """ + code: String! + + """ + The items in the order that qualify for the discount, their quantities, and the total value of the discount. + """ + customerGets: DiscountCustomerGetsInput! + + """ + 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 discount's name that displays to merchants in the Shopify admin and to customers. + """ + title: String! +} + +""" +Return type for `leadCaptureForDiscount` mutation. +""" +type LeadCaptureForDiscountPayload @componentName(name: "platform") @privatelyDocumented { + """ + The discount created. + """ + discountNode: DiscountNode + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [DiscountUserError!]! +} + +""" +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 @componentName(name: "platform") { + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! +} + +""" +Units of measurement for length. +""" +enum LengthUnit @componentName(name: "platform") { + """ + 100 centimeters equals 1 meter. + """ + CENTIMETERS + + """ + Imperial system unit of length. + """ + FEET + + """ + 12 inches equals 1 foot. + """ + INCHES + + """ + Metric system unit of length. + """ + METERS + + """ + 1000 millimeters equals 1 meter. + """ + MILLIMETERS + + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "shop_identity") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { + """ + 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( + """ + Crops the image according to the specified region. + """ + crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") + + """ + Image height in pixels between 1 and 2048. + """ + maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") + + """ + Image width in pixels between 1 and 2048. + """ + maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 total price of the line item in shop and presentment currencies, + after all discounts are applied and excluding refunded and removed quantities. + This value doesn't include taxes. + """ + priceAfterAllDiscountsBeforeTaxesSet: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + The weight of a line item unit. + """ + weight: Weight +} + +""" +An auto-generated type for paginating through multiple LineItems. +""" +type LineItemConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "online_store") { + """ + 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 @gidTypes(types: ["Market"]) + ): [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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The key of the metafield this option is linked to. + """ + key: String! + + """ + The namespace of the metafield this option is linked to. + """ + namespace: String! + + """ + Values associated with the option. + """ + values: [String!] +} + +""" +The input fields for linking a combined listing option to a metafield. +""" +input LinkedMetafieldInput @componentName(name: "merchandising") { + """ + The key of the linked metafield. + """ + key: String! + + """ + The namespace of the linked metafield. + """ + namespace: 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 @componentName(name: "merchandising") { + """ + The key of the metafield this option is linked to. + """ + key: String! + + """ + The namespace of the metafield this option is linked to. + """ + namespace: String! +} + +""" +Local payment methods payment details related to a transaction. +""" +type LocalPaymentMethodsPaymentDetails implements BasePaymentDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "markets") { + """ + A file reference. + """ + FILE_REFERENCE + + """ + An HTML. + """ + HTML + + """ + An inline rich text. + """ + INLINE_RICH_TEXT + + """ + A JSON. + """ + JSON + + """ + A JSON string. + """ + JSON_STRING + + """ + A link. + """ + LINK + + """ + A list of file references. + """ + LIST_FILE_REFERENCE + + """ + 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 URI. + """ + URI + + """ + A URL. + """ + URL +} + +""" +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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "apps") { + """ + The key for the localization extension. + """ + key: LocalizationExtensionKey! + + """ + The localization extension value. + """ + value: String! +} + +""" +The key of a localization extension. +""" +enum LocalizationExtensionKey @componentName(name: "platform") { + """ + Extension key 'shipping_credential_br' for country BR. + """ + SHIPPING_CREDENTIAL_BR + + """ + Extension key 'shipping_credential_cl' for country CL. + """ + SHIPPING_CREDENTIAL_CL + + """ + Extension key 'shipping_credential_cn' for country CN. + """ + SHIPPING_CREDENTIAL_CN + + """ + Extension key 'shipping_credential_co' for country CO. + """ + SHIPPING_CREDENTIAL_CO + + """ + Extension key 'shipping_credential_cr' for country CR. + """ + SHIPPING_CREDENTIAL_CR + + """ + Extension key 'shipping_credential_ec' for country EC. + """ + SHIPPING_CREDENTIAL_EC + + """ + Extension key 'shipping_credential_es' for country ES. + """ + SHIPPING_CREDENTIAL_ES + + """ + Extension key 'shipping_credential_gt' for country GT. + """ + SHIPPING_CREDENTIAL_GT + + """ + Extension key 'shipping_credential_id' for country ID. + """ + SHIPPING_CREDENTIAL_ID + + """ + Extension key 'shipping_credential_kr' for country KR. + """ + SHIPPING_CREDENTIAL_KR + + """ + Extension key 'shipping_credential_mx' for country MX. + """ + SHIPPING_CREDENTIAL_MX + + """ + Extension key 'shipping_credential_my' for country MY. + """ + SHIPPING_CREDENTIAL_MY + + """ + Extension key 'shipping_credential_pe' for country PE. + """ + SHIPPING_CREDENTIAL_PE + + """ + Extension key 'shipping_credential_pt' for country PT. + """ + SHIPPING_CREDENTIAL_PT + + """ + Extension key 'shipping_credential_py' for country PY. + """ + SHIPPING_CREDENTIAL_PY + + """ + Extension key 'shipping_credential_tr' for country TR. + """ + SHIPPING_CREDENTIAL_TR + + """ + Extension key 'shipping_credential_tw' for country TW. + """ + SHIPPING_CREDENTIAL_TW + + """ + Extension key 'shipping_credential_type_co' for country CO. + """ + SHIPPING_CREDENTIAL_TYPE_CO + + """ + Extension key 'tax_credential_br' for country BR. + """ + TAX_CREDENTIAL_BR + + """ + Extension key 'tax_credential_cl' for country CL. + """ + TAX_CREDENTIAL_CL + + """ + Extension key 'tax_credential_co' for country CO. + """ + TAX_CREDENTIAL_CO + + """ + Extension key 'tax_credential_cr' for country CR. + """ + TAX_CREDENTIAL_CR + + """ + Extension key 'tax_credential_ec' for country EC. + """ + TAX_CREDENTIAL_EC + + """ + Extension key 'tax_credential_es' for country ES. + """ + TAX_CREDENTIAL_ES + + """ + Extension key 'tax_credential_gt' for country GT. + """ + TAX_CREDENTIAL_GT + + """ + Extension key 'tax_credential_id' for country ID. + """ + TAX_CREDENTIAL_ID + + """ + Extension key 'tax_credential_it' for country IT. + """ + TAX_CREDENTIAL_IT + + """ + Extension key 'tax_credential_mx' for country MX. + """ + TAX_CREDENTIAL_MX + + """ + Extension key 'tax_credential_my' for country MY. + """ + TAX_CREDENTIAL_MY + + """ + Extension key 'tax_credential_pe' for country PE. + """ + TAX_CREDENTIAL_PE + + """ + Extension key 'tax_credential_pt' for country PT. + """ + TAX_CREDENTIAL_PT + + """ + Extension key 'tax_credential_py' for country PY. + """ + TAX_CREDENTIAL_PY + + """ + Extension key 'tax_credential_tr' for country TR. + """ + TAX_CREDENTIAL_TR + + """ + Extension key 'tax_credential_type_co' for country CO. + """ + TAX_CREDENTIAL_TYPE_CO + + """ + 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_email_it' for country IT. + """ + TAX_EMAIL_IT +} + +""" +The purpose of a localization extension. +""" +enum LocalizationExtensionPurpose @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "apps") { + """ + The key for the localized field. + """ + key: LocalizedFieldKey! + + """ + The localized field value. + """ + value: String! +} + +""" +The key of a localized field. +""" +enum LocalizedFieldKey @componentName(name: "platform") { + """ + Localized field key 'shipping_credential_br' for country Brazil. + """ + SHIPPING_CREDENTIAL_BR + + """ + 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 'shipping_credential_co' for country Colombia. + """ + SHIPPING_CREDENTIAL_CO + + """ + Localized field key 'shipping_credential_cr' for country Costa Rica. + """ + SHIPPING_CREDENTIAL_CR + + """ + Localized field key 'shipping_credential_ec' for country Ecuador. + """ + SHIPPING_CREDENTIAL_EC + + """ + Localized field key 'shipping_credential_es' for country Spain. + """ + SHIPPING_CREDENTIAL_ES + + """ + Localized field key 'shipping_credential_gt' for country Guatemala. + """ + SHIPPING_CREDENTIAL_GT + + """ + Localized field key 'shipping_credential_id' for country Indonesia. + """ + SHIPPING_CREDENTIAL_ID + + """ + Localized field key 'shipping_credential_kr' for country South Korea. + """ + SHIPPING_CREDENTIAL_KR + + """ + Localized field key 'shipping_credential_mx' for country Mexico. + """ + SHIPPING_CREDENTIAL_MX + + """ + Localized field key 'shipping_credential_my' for country Malaysia. + """ + SHIPPING_CREDENTIAL_MY + + """ + Localized field key 'shipping_credential_pe' for country Peru. + """ + SHIPPING_CREDENTIAL_PE + + """ + Localized field key 'shipping_credential_pt' for country Portugal. + """ + SHIPPING_CREDENTIAL_PT + + """ + Localized field key 'shipping_credential_py' for country Paraguay. + """ + SHIPPING_CREDENTIAL_PY + + """ + Localized field key 'shipping_credential_tr' for country Turkey. + """ + SHIPPING_CREDENTIAL_TR + + """ + Localized field key 'shipping_credential_tw' for country Taiwan. + """ + SHIPPING_CREDENTIAL_TW + + """ + Localized field key 'shipping_credential_type_co' for country Colombia. + """ + SHIPPING_CREDENTIAL_TYPE_CO + + """ + Localized field key 'tax_credential_br' for country Brazil. + """ + TAX_CREDENTIAL_BR + + """ + Localized field key 'tax_credential_cl' for country Chile. + """ + TAX_CREDENTIAL_CL + + """ + Localized field key 'tax_credential_co' for country Colombia. + """ + TAX_CREDENTIAL_CO + + """ + Localized field key 'tax_credential_cr' for country Costa Rica. + """ + TAX_CREDENTIAL_CR + + """ + Localized field key 'tax_credential_ec' for country Ecuador. + """ + TAX_CREDENTIAL_EC + + """ + Localized field key 'tax_credential_es' for country Spain. + """ + TAX_CREDENTIAL_ES + + """ + Localized field key 'tax_credential_gt' for country Guatemala. + """ + TAX_CREDENTIAL_GT + + """ + Localized field key 'tax_credential_id' for country Indonesia. + """ + TAX_CREDENTIAL_ID + + """ + Localized field key 'tax_credential_it' for country Italy. + """ + TAX_CREDENTIAL_IT + + """ + Localized field key 'tax_credential_mx' for country Mexico. + """ + TAX_CREDENTIAL_MX + + """ + Localized field key 'tax_credential_my' for country Malaysia. + """ + TAX_CREDENTIAL_MY + + """ + Localized field key 'tax_credential_pe' for country Peru. + """ + TAX_CREDENTIAL_PE + + """ + Localized field key 'tax_credential_pt' for country Portugal. + """ + TAX_CREDENTIAL_PT + + """ + Localized field key 'tax_credential_py' for country Paraguay. + """ + TAX_CREDENTIAL_PY + + """ + Localized field key 'tax_credential_tr' for country Turkey. + """ + TAX_CREDENTIAL_TR + + """ + Localized field key 'tax_credential_type_co' for country Colombia. + """ + TAX_CREDENTIAL_TYPE_CO + + """ + 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_email_it' for country Italy. + """ + TAX_EMAIL_IT +} + +""" +The purpose of a localized field. +""" +enum LocalizedFieldPurpose @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_locations` access scope, `read_inventory` access scope or `read_markets_home` access scope.") @componentName(name: "shop_identity") { + """ + 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! @requiredAccess(scope: "`read_locations` access scope.") + + """ + The address of this location. + """ + address: LocationAddress! @requiredAccess(scope: "`read_locations` access scope.") + + """ + Whether the location address has been verified. + """ + addressVerified: Boolean! @requiredAccess(scope: "`read_locations` access scope.") + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) that the location was added to a shop. + """ + createdAt: DateTime! @requiredAccess(scope: "`read_locations` access scope.") + + """ + 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! @requiredAccess(scope: "`read_locations` access scope.") + + """ + 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 @requiredAccess(scope: "`read_locations` access scope.") + + """ + Whether this location can be deleted. + """ + deletable: Boolean! @requiredAccess(scope: "`read_locations` access scope.") + + """ + Name of the service provider that fulfills from this location. + """ + fulfillmentService: FulfillmentService @requiredAccess(scope: "`read_locations` access scope.") + + """ + Whether this location can fulfill online orders. + """ + fulfillsOnlineOrders: Boolean! @requiredAccess(scope: "`read_locations` access scope.") + + """ + Whether this location has active inventory. + """ + hasActiveInventory: Boolean! @requiredAccess(scope: "`read_locations` access scope.") + + """ + Whether this location has orders that need to be fulfilled. + """ + hasUnfulfilledOrders: Boolean! @requiredAccess(scope: "`read_locations` access scope.") + + """ + A globally-unique ID. + """ + id: ID! @requiredAccess(scope: "`read_locations` access scope, `read_inventory` access scope or `read_markets_home` access scope.") + + """ + The quantities of an inventory item at this location. + """ + inventoryLevel( + """ + Whether to return the inventory level if it is inactive. + """ + includeInactive: Boolean = false + + """ + The ID of the inventory item to obtain the inventory level for. + """ + inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) + ): InventoryLevel @requiredAccess(scope: "`read_locations` access scope.") + + """ + A list of the quantities of the inventory items that can be stocked at this location. + """ + inventoryLevels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Whether to include inactive inventory levels. + """ + includeInactive: Boolean = false + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_group_id | id | + | inventory_item_id | id | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): InventoryLevelConnection! @requiredAccess(scope: "`read_locations` access scope.") + + """ + 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! @requiredAccess(scope: "`read_locations` access scope.") + + """ + Whether this location is a fulfillment service. + """ + isFulfillmentService: Boolean! @requiredAccess(scope: "`read_locations` access scope.") + + """ + 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") @requiredAccess(scope: "`read_locations` access scope.") + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + Local pickup settings for the location. + """ + localPickupSettingsV2: DeliveryLocalPickupSettings @requiredAccess(scope: "`read_locations` access scope.") + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + The name of the location. + """ + name: String! @requiredAccess(scope: "`read_locations` access scope or `read_markets_home` access scope.") + + """ + Legacy field indicating this location was designated for shipping. All locations with valid addresses can now ship. + """ + shipsInventory: Boolean! @requiredAccess(scope: "`read_locations` access scope.") + + """ + List of suggested addresses for this location (empty if none). + """ + suggestedAddresses: [LocationSuggestedAddress!]! @requiredAccess(scope: "`read_locations` access scope.") + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the location was last updated. + """ + updatedAt: DateTime! @requiredAccess(scope: "`read_locations` access scope.") +} + +""" +Return type for `locationActivate` mutation. +""" +type LocationActivatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_locations` access scope.") @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + An error occurred while activating the location. + """ + GENERIC_ERROR + + """ + There is already an active location with this name. + """ + HAS_NON_UNIQUE_NAME + + """ + This location currently cannot be activated as inventory, pending orders or + transfers are being relocated from this location. + """ + HAS_ONGOING_RELOCATION + + """ + 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 + + """ + Shop has reached its location limit. + """ + LOCATION_LIMIT + + """ + Location not found. + """ + LOCATION_NOT_FOUND +} + +""" +The input fields to use to specify the address while adding a location. +""" +input LocationAddAddressInput @componentName(name: "shop_identity") { + """ + 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 two-letter code of country for the address. + """ + countryCode: CountryCode! + + """ + The phone number of the location. + """ + phone: String + + """ + 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 ZIP code or postal code of the address. + """ + zip: String +} + +""" +The input fields to use to add a location. +""" +input LocationAddInput @componentName(name: "shop_identity") { + """ + 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!] + + """ + The name of the location. + """ + name: String! +} + +""" +Return type for `locationAdd` mutation. +""" +type LocationAddPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_locations` access scope.") @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """ + The input value is blank. + """ + BLANK + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + An error occurred while adding the location. + """ + GENERIC_ERROR + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + The type is invalid. + """ + INVALID_TYPE + + """ + The ZIP code is not a valid US ZIP code. + """ + INVALID_US_ZIPCODE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + 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 + + """ + Unstructured reserved namespace. + """ + UNSTRUCTURED_RESERVED_NAMESPACE +} + +""" +Represents the address of a location. +""" +type LocationAddress @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_locations` access scope.") @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + At least one location must fulfill online orders. + """ + CANNOT_DISABLE_ONLINE_ORDER_FULFILLMENT + + """ + 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 + + """ + Failed to relocate active inventories to the destination location. + """ + FAILED_TO_RELOCATE_ACTIVE_INVENTORIES + + """ + Failed to relocate incoming movements to the destination location. + """ + FAILED_TO_RELOCATE_INCOMING_MOVEMENTS + + """ + Failed to relocate open purchase orders to the destination location. + """ + FAILED_TO_RELOCATE_OPEN_PURCHASE_ORDERS + + """ + Location could not be deactivated without specifying where to relocate inventory at the location. + """ + HAS_ACTIVE_INVENTORY_ERROR + + """ + Location needs to be removed from Shopify POS for Retail subscription in Point of Sale channel. + """ + HAS_ACTIVE_RETAIL_SUBSCRIPTIONS + + """ + 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 purchase orders. + """ + HAS_OPEN_PURCHASE_ORDERS_ERROR + + """ + 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 + + """ + 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 +} + +""" +Return type for `locationDelete` mutation. +""" +type LocationDeletePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_locations` access scope.") @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + An error occurred while deleting the location. + """ + GENERIC_ERROR + + """ + The location cannot be deleted while it has any active Retail subscriptions in the Point of Sale channel. + """ + LOCATION_HAS_ACTIVE_RETAIL_SUBSCRIPTION + + """ + 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 is active. + """ + LOCATION_IS_ACTIVE + + """ + Location not found. + """ + LOCATION_NOT_FOUND +} + +""" +An auto-generated type which holds one Location and a cursor during pagination. +""" +type LocationEdge @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "shop_identity") { + """ + 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 two-letter code of country for the address. + """ + countryCode: CountryCode + + """ + The phone number of the location. + """ + phone: String + + """ + 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 ZIP code or postal code of the location. + """ + zip: String +} + +""" +The input fields to use to edit a location. +""" +input LocationEditInput @componentName(name: "shop_identity") { + """ + 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!] + + """ + The name of the location. + """ + name: String +} + +""" +Return type for `locationEdit` mutation. +""" +type LocationEditPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_locations` access scope or `read_fulfillments` access scope.") @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """ + The input value is blank. + """ + BLANK + + """ + 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 metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + An error occurred while editing the location. + """ + GENERIC_ERROR + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + The type is invalid. + """ + INVALID_TYPE + + """ + The ZIP code is not a valid US ZIP code. + """ + INVALID_US_ZIPCODE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + 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 long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Unstructured reserved namespace. + """ + UNSTRUCTURED_RESERVED_NAMESPACE +} + +""" +The input fields for identifying a location. +""" +input LocationIdentifierInput @oneOf @componentName(name: "shop_identity") { + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the location. + """ + customId: UniqueMetafieldValueInput + + """ + The ID of the location. + """ + id: ID +} + +""" +Return type for `locationLocalPickupDisable` mutation. +""" +type LocationLocalPickupDisablePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "shop_identity") { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The locations that comprise the market. + """ + locations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): LocationConnection! +} + +""" +Signals that indicate whether prices should be locked for draft order. +""" +enum LockDraftOrderPricesForBuyer @componentName(name: "draft_orders") { + """ + Ensure all variant-backed line items have price overrides. Preserves existing + overrides, or creates new ones from a line item's current price. + """ + LOCKALL + + """ + Leave current line item price overrides unchanged. + """ + NOCHANGE + + """ + Remove price overrides from all line items. + """ + UNLOCKALL +} + +""" +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 @componentName(name: "platform") @protectedObject(subject: "customer") { + """ + The first line of the address. Typically the street address or PO Box number. + """ + address1: String @protectedField(subject: "customer", content: "address") + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + address2: String @protectedField(subject: "customer", content: "address") + + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + A formatted version of the address, customized by the provided arguments. + """ + formatted( + """ + Whether to include the customer's company in the formatted address. + """ + withCompany: Boolean = true + + """ + Whether to include the customer's name in the formatted address. + """ + withName: Boolean = false + ): [String!]! @protectedField(subject: "customer", content: "address") + + """ + 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 @protectedField(subject: "customer", content: "name") + + """ + The latitude coordinate of the customer address. + """ + latitude: Float @protectedField(subject: "customer", content: "address") + + """ + The longitude coordinate of the customer address. + """ + longitude: Float @protectedField(subject: "customer", content: "address") + + """ + The full name of the customer, based on firstName and lastName. + """ + name: String @protectedField(subject: "customer", content: "name") + + """ + A unique phone number for the customer. + """ + phone: String @protectedField(subject: "customer", content: "phone") + + """ + 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 is 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 @protectedField(subject: "customer", content: "address") +} + +""" +An auto-generated type for paginating through multiple MailingAddresses. +""" +type MailingAddressConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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.") @gidTypes(types: ["MailingAddress"]) + + """ + 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 @componentName(name: "platform") { + """ + Indicates that the address has been validated and is very likely to contain invalid information. + """ + ERROR + + """ + Indicates that the address has been validated and no issues were found. + """ + NO_ISSUES + + """ + 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 @componentName(name: "payments") { + """ + A credential stored on file for checkout. + """ + CHECKOUT + + """ + A credential stored on file for merchant and customer initiated transactions. + """ + CREDENTIAL_ON_FILE + + """ + 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + 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! @gidTypes(types: ["CheckoutProfile", "WebPresence", "Catalog", "MarketCatalog", "DummyGraphQlType", "CurrencySettings", "JsonTemplate", "ThemeType", "RetailSettings", "RetailScreenLock", "Layout", "RetailCheckoutValidationRule", "RetailBuyerLedReceiptsSettings"]) + ): Boolean! + + """ + The catalogs that belong to the market. + """ + catalogs( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketCatalogConnection! + + """ + The number of catalogs that belong to the market. + """ + catalogsCount: Count + + """ + The channels associated with this market. + """ + channels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection + + """ + The number of channels associated with this market. + """ + channelsCount: Count + + """ + The conditions under which a visitor is in the market. + """ + conditions: MarketConditions + + """ + The market’s currency settings. + """ + currencySettings: MarketCurrencySettings + + """ + The discounts that are available in this market. + """ + discounts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DiscountNodeConnection + + """ + The number of discounts that are assigned to this market. + """ + discountsCount: Count + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + A globally-unique ID. + """ + id: ID! + + """ + The markets associated with the catalog. + """ + markets( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Filters markets by status. + """ + status: MarketStatus = null + + """ + Filters markets by type. + """ + type: MarketType = null + ): MarketConnection! + + """ + The number of markets associated with the catalog. + """ + marketsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | market_condition_types | string | A comma-separated list of condition types. | + | market_type | string | + | name | string | + | status | string | | - `ACTIVE`
- `DRAFT` | + | wildcard_company_location_with_country_code | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Filters markets by status. + """ + status: MarketStatus = null + + """ + Filters markets by type. + """ + type: MarketType = null + ): Count @requiredAccess(scope: "`read_products` access scope.") + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "markets") { + """ + The condition matches all records of a given type. + """ + ALL + + """ + The condition matches specified records of a given type. + """ + SPECIFIED +} + +""" +The condition types for the condition set. +""" +enum MarketConditionType @componentName(name: "markets") { + """ + The condition checks the channel that the visitor is shopping from. + """ + CHANNEL + + """ + The condition checks the company location that the visitor is purchasing for. + """ + COMPANY_LOCATION + + """ + The condition checks the location that the visitor is shopping from. + """ + LOCATION + + """ + The condition checks the visitor's region. + """ + REGION +} + +""" +The conditions that determine whether a visitor is in a market. +""" +type MarketConditions @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + The channel conditions that determine whether a visitor is in the market. + """ + channelsCondition: ChannelsCondition + + """ + 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 channel market condition. +""" +input MarketConditionsChannelsInput @componentName(name: "markets") { + """ + A list of channel IDs to include in the market condition. + """ + channelIds: [ID!] @gidTypes(types: ["Channel"]) +} + +""" +The input fields required to create or update a company location market condition. +""" +input MarketConditionsCompanyLocationsInput @oneOf @componentName(name: "markets") { + """ + A type of market condition (e.g. ALL) to apply. + """ + applicationLevel: MarketConditionApplicationType + + """ + A list of company location IDs to include in the market condition. + """ + companyLocationIds: [ID!] @gidTypes(types: ["CompanyLocation"]) +} + +""" +The input fields required to create or update the market conditions. +""" +input MarketConditionsInput @componentName(name: "markets") { + """ + The channels to include in the market conditions. + """ + channelsCondition: MarketConditionsChannelsInput + + """ + 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 @componentName(name: "markets") { + """ + A type of market condition (e.g. ALL) to apply. + """ + applicationLevel: MarketConditionApplicationType + + """ + A list of location IDs to include in the market condition. + """ + locationIds: [ID!] @gidTypes(types: ["Location"]) +} + +""" +The input fields to specify a region condition. +""" +input MarketConditionsRegionInput @componentName(name: "markets") { + """ + A country code to which this condition should apply. + """ + countryCode: CountryCode! + + """ + A province or state. + """ + province: String +} + +""" +The input fields required to create or update a region market condition. +""" +input MarketConditionsRegionsInput @oneOf @componentName(name: "markets") { + """ + A type of market condition (e.g. ALL) to apply. + """ + applicationLevel: MarketConditionApplicationType + + """ + A list of market region IDs to include in the market condition. + """ + regionIds: [ID!] @gidTypes(types: ["Region"]) + + """ + A list of market regions to include in the market condition. + """ + regions: [MarketConditionsRegionInput!] +} + +""" +The input fields required to update a market condition. +""" +input MarketConditionsUpdateInput @componentName(name: "markets") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "markets") { + """ + Catalog IDs to include in the market. + """ + catalogs: [ID!] @gidTypes(types: ["Catalog"]) + + """ + The conditions that apply to the market. + """ + conditions: MarketConditionsInput + + """ + Currency settings for the market. + """ + currencySettings: MarketCurrencySettingsUpdateInput + + """ + Discounts that are eligible for this market. + """ + discounts: [ID!] @gidTypes(types: ["DiscountCodeNode", "DiscountAutomaticNode"]) + + """ + 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.") + + """ + 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 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 name of the market. Not shown to customers. + """ + name: String! + + """ + The strategy used to determine how prices are displayed to the customer. + """ + priceInclusions: MarketPriceInclusionsInput + + """ + 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 status of the market. + """ + status: MarketStatus + + """ + Web presence IDs to include in the market. + """ + webPresences: [ID!] @gidTypes(types: ["WebPresence"]) +} + +""" +Return type for `marketCreate` mutation. +""" +type MarketCreatePayload @componentName(name: "platform") { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +A market's currency settings. +""" +type MarketCurrencySettings @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + 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 @componentName(name: "markets") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "markets") { + """ + 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 @componentName(name: "platform") { + """ + The currency settings of the given market cannot be changed because the market manager has exclusive control of pricing. + """ + MANAGED_MARKET + + """ + The specified market wasn't found. + """ + MARKET_NOT_FOUND + + """ + 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 primary market must use the shop currency. + """ + PRIMARY_MARKET_USES_SHOP_CURRENCY + + """ + This action is restricted if unified markets is enabled. + """ + UNIFIED_MARKETS_ENABLED + + """ + The specified currency is not supported. + """ + UNSUPPORTED_CURRENCY +} + +""" +Return type for `marketDelete` mutation. +""" +type MarketDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "markets") { + """ + 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 @componentName(name: "markets") { + """ + 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 @requiredAccess(scope: "`read_translations` access scope.") @componentName(name: "markets") { + """ + The market localizable content. + """ + marketLocalizableContent: [MarketLocalizableContent!]! + + """ + Market localizations for the market localizable content. + """ + marketLocalizations( + """ + Filters market localizations by market ID. + """ + marketId: ID! @gidTypes(types: ["Market"]) + ): [MarketLocalization!]! + + """ + The GID of the resource. + """ + resourceId: ID! +} + +""" +An auto-generated type for paginating through multiple MarketLocalizableResources. +""" +type MarketLocalizableResourceConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "markets") { + """ + 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 @componentName(name: "markets") { + """ + 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 @componentName(name: "markets") { + """ + 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 @componentName(name: "markets") { + """ + A reference to the value being localized on the resource that this market localization belongs to. + """ + key: String! + + """ + The ID of the market that the localization is specific to. + """ + marketId: ID! @gidTypes(types: ["Market"]) + + """ + A hash digest representation of the content being localized. + """ + marketLocalizableContentDigest: String! + + """ + The value of the market localization. + """ + value: String! +} + +""" +Return type for `marketLocalizationsRegister` mutation. +""" +type MarketLocalizationsRegisterPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "taxes") { + """ + 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 incoterm configuration of the market. + """ + incotermConfiguration: IncotermConfiguration! +} + +""" +The input fields used to create a price inclusion. +""" +input MarketPriceInclusionsInput @componentName(name: "markets") { + """ + The inclusive duties pricing strategy for the market. + """ + dutiesPricingStrategy: InclusiveDutiesPricingStrategy + + """ + The incoterm configuration for the market. + """ + incotermConfiguration: IncotermConfiguration + + """ + The inclusive tax pricing strategy for the market. + """ + taxPricingStrategy: InclusiveTaxPricingStrategy +} + +""" +A geographic region which comprises a market. +""" +interface MarketRegion @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the region. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple MarketRegions. +""" +type MarketRegionConnection @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + 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 @componentName(name: "markets") { + """ + A country code for the region. + """ + countryCode: CountryCode! +} + +""" +Return type for `marketRegionDelete` mutation. +""" +type MarketRegionDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "markets") { + """ + 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! +} + +""" +A province of a country which comprises a market. +""" +type MarketRegionProvince implements MarketRegion & Node @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + The province or state code. + """ + code: String! + + """ + The country the province belongs to. + """ + country: MarketRegionProvinceCountry! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the region. + """ + name: String! +} + +""" +A country that a province belongs to. +""" +type MarketRegionProvinceCountry @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + The ISO code identifying the country. + """ + code: CountryCode! + + """ + The name of the country. + """ + name: String! +} + +""" +Return type for `marketRegionsCreate` mutation. +""" +type MarketRegionsCreatePayload @componentName(name: "platform") { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketRegionsDelete` mutation. +""" +type MarketRegionsDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "markets") { + """ + The market is active. + """ + ACTIVE + + """ + The market is in draft. + """ + DRAFT +} + +""" +The market types. +""" +enum MarketType @componentName(name: "markets") { + """ + The market applies to the visitor based on the channel. + """ + CHANNEL + + """ + The market applies to the visitor based on the company location. + """ + COMPANY_LOCATION + + """ + The market applies to the visitor based on the location. + """ + LOCATION + + """ + The market does not apply to any visitor. + """ + NONE + + """ + The market applies to the visitor based on region. + """ + REGION +} + +""" +The input fields used to update a market. +""" +input MarketUpdateInput @componentName(name: "markets") { + """ + Catalog IDs to include in the market. + """ + catalogsToAdd: [ID!] @gidTypes(types: ["Catalog"]) + + """ + Catalog IDs to remove from the market. + """ + catalogsToDelete: [ID!] @gidTypes(types: ["Catalog"]) + + """ + The conditions to update. + """ + conditions: MarketConditionsUpdateInput + + """ + Currency settings for the market. + """ + currencySettings: MarketCurrencySettingsUpdateInput + + """ + The discounts to add to the market. + """ + discountsToAdd: [ID!] @gidTypes(types: ["DiscountCodeNode", "DiscountAutomaticNode"]) + + """ + The discounts to remove from the market. + """ + discountsToDelete: [ID!] @gidTypes(types: ["DiscountCodeNode", "DiscountAutomaticNode"]) + + """ + 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.") + + """ + A unique identifier for the market. For example `"ca"`. + """ + handle: String + + """ + 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 name of the market. Not shown to customers. + """ + name: String + + """ + The strategy used to determine how prices are displayed to the customer. + """ + priceInclusions: MarketPriceInclusionsInput + + """ + Remove any currency settings that are defined for the market. + """ + removeCurrencySettings: Boolean + + """ + The price inclusions to remove from the market. + """ + removePriceInclusions: Boolean + + """ + The status of the market. + """ + status: MarketStatus + + """ + The web presences to add to the market. + """ + webPresencesToAdd: [ID!] @gidTypes(types: ["WebPresence"]) + + """ + The web presences to remove from the market. + """ + webPresencesToDelete: [ID!] @gidTypes(types: ["WebPresence"]) +} + +""" +Return type for `marketUpdate` mutation. +""" +type MarketUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + 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 @componentName(name: "platform") { + """ + The maximum number of active B2B catalogs allowed by your plan has been reached. + """ + B2B_CATALOG_LIMIT_REACHED + + """ + B2B markets must be merchant managed. + """ + B2B_MARKET_MUST_BE_MERCHANT_MANAGED + + """ + The input value is blank. + """ + BLANK + + """ + Can't activate this market because the B2B catalog limit has been reached. + """ + CANNOT_ACTIVATE_MARKET_B2B_CATALOG_LIMIT_REACHED + + """ + Can't add all provinces for a country to a market. + """ + CANNOT_ADD_ALL_PROVINCES_FOR_A_COUNTRY_TO_A_MARKET + + """ + Country conditions cannot be added to a market with province conditions. + """ + CANNOT_ADD_COUNTRY_CONDITION_TO_PROVINCE_MARKET @deprecated(reason: "No longer used") + + """ + Can't add customer account domain to a market. + """ + CANNOT_ADD_CUSTOMER_DOMAIN + + """ + 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 add the web presence to the primary market. + """ + CANNOT_ADD_WEB_PRESENCE_TO_PRIMARY_MARKET @deprecated(reason: "No longer used") + + """ + Can't delete the only region in a market. + """ + CANNOT_DELETE_ONLY_REGION + + """ + Can't delete the primary market. + """ + CANNOT_DELETE_PRIMARY_MARKET + + """ + Can't delete the primary market's web presence. + """ + CANNOT_DELETE_PRIMARY_MARKET_WEB_PRESENCE @deprecated(reason: "No longer used") + + """ + Can't delete the last province-driven market. + """ + CANNOT_DELETE_PROVINCE_MARKET + + """ + Can't disable the primary market. + """ + CANNOT_DISABLE_PRIMARY_MARKET + + """ + Can't have both subfolder and domain web presences. + """ + CANNOT_HAVE_BOTH_SUBFOLDER_AND_DOMAIN_WEB_PRESENCES + + """ + Can't have multiple subfolder web presences per market. + """ + CANNOT_HAVE_MULTIPLE_SUBFOLDERS_PER_MARKET + + """ + Can't pass both `subfolderSuffix` and `domainId`. + """ + CANNOT_HAVE_SUBFOLDER_AND_DOMAIN + + """ + Can't set default locale to null. + """ + CANNOT_SET_DEFAULT_LOCALE_TO_NULL + + """ + Catalogs with volume pricing or quantity rules are not supported for the specified condition types. + """ + CATALOGS_WITH_VOLUME_PRICING_OR_QUANTITY_RULES_NOT_SUPPORTED + + """ + Catalog condition types must be the same for all conditions on a catalog. + """ + CATALOG_CONDITION_TYPES_MUST_BE_THE_SAME + + """ + 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 + + """ + A channel driver must have a channel specification. + """ + CHANNEL_DRIVER_MUST_HAVE_CHANNEL_SPECIFICATION + + """ + A channel market must have a single channel driver. + """ + CHANNEL_MARKET_MUST_HAVE_SINGLE_CHANNEL_DRIVER + + """ + The selected channel is not valid for a channel market. + """ + CHANNEL_NOT_VALID_FOR_CHANNEL_MARKET + + """ + One or more condition IDs were not found. + """ + CONDITIONS_NOT_FOUND + + """ + Contains regions that cannot be managed. + """ + CONTAINS_REGIONS_THAT_CANNOT_BE_MANAGED + + """ + One or more customizations were not found. + """ + CUSTOMIZATIONS_NOT_FOUND + + """ + The language isn't enabled on the store. + """ + DISABLED_LANGUAGE + + """ + One or more discounts exceed the maximum number of markets allowed. + """ + DISCOUNT_EXCEEDS_MARKET_LIMIT + + """ + The shop does not have discounts enabled for B2B markets. + """ + DISCOUNT_NOT_COMPATIBLE_WITH_B2B_MARKET + + """ + One or more discounts do not have market eligibility. + """ + DISCOUNT_NOT_MARKET_CONTEXTUAL + + """ + Domain was not found. + """ + DOMAIN_NOT_FOUND + + """ + Duplicates found in languages. + """ + DUPLICATE_LANGUAGES + + """ + Duplicate region market. + """ + DUPLICATE_REGION_MARKET + + """ + Duplicate unique market. + """ + DUPLICATE_UNIQUE_MARKET + + """ + Exceeds max multi-context markets. + """ + EXCEEDS_MAX_MULTI_CONTEXT_MARKETS + + """ + An error occurred. See the message for details. + """ + GENERIC_ERROR + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + 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 input value is invalid. + """ + INVALID + + """ + Channel ids are invalid. + """ + INVALID_CHANNEL_IDS + + """ + A country condition and a province condition belonging to the same country cannot be added to the same market. + """ + INVALID_COUNTRY_AND_PROVINCE_CONDITIONS + + """ + A country driver and a province driver belonging to the same country cannot be added to the same market. + """ + INVALID_COUNTRY_AND_PROVINCE_DRIVERS @deprecated(reason: "Use INVALID_COUNTRY_AND_PROVINCE_CONDITIONS instead") + + """ + Can't add selected customizations to a market with a province condition. + """ + INVALID_CUSTOMIZATION_FOR_PROVINCE_CONDITION + + """ + The province format is invalid. + """ + INVALID_PROVINCE_FORMAT + + """ + Can't add selected responders to a province driven market. + """ + INVALID_RESPONDER_FOR_PROVINCE_DRIVEN_MARKET @deprecated(reason: "No longer used") + + """ + Invalid combination of status and enabled. + """ + INVALID_STATUS_AND_ENABLED_COMBINATION + + """ + 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 + + """ + The currency settings of the given market cannot be changed because the market manager has exclusive control of pricing. + """ + MANAGED_MARKET + + """ + Catalogs created by Managed Markets cannot be added to a market. + """ + MANAGED_MARKETS_CATALOG_NOT_ALLOWED + + """ + A direct connection catalog can't be attached to a market. + """ + MARKET_CANT_HAVE_DIRECT_CONNECTION_CATALOG + + """ + 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 market wasn't found. + """ + MARKET_NOT_FOUND + + """ + Can't add another web presence to the market. + """ + MARKET_REACHED_WEB_PRESENCE_LIMIT + + """ + The country code is missing. + """ + MISSING_COUNTRY_CODE + + """ + The province code is missing. + """ + MISSING_PROVINCE_CODE + + """ + All retail locations in a market must be in the same country. + """ + MIXED_COUNTRY_LOCATIONS_NOT_ALLOWED + + """ + The shop's payment gateway does not support enabling more than one currency. + """ + MULTIPLE_CURRENCIES_NOT_SUPPORTED + + """ + Can’t delete, disable, or change the type of the last region market. + """ + MUST_HAVE_AT_LEAST_ONE_ACTIVE_REGION_MARKET + + """ + Your shop is not entitled to activate markets of this type. + """ + NOT_ENTITLED_TO_ACTIVATE_MARKET + + """ + 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") + + """ + POS location markets must be merchant managed. + """ + POS_LOCATION_MARKET_MUST_BE_MERCHANT_MANAGED + + """ + 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") + + """ + The province doesn't exist. + """ + PROVINCE_DOES_NOT_EXIST + + """ + The selected province does not belong to the selected country. + """ + PROVINCE_MUST_BELONG_TO_COUNTRY + + """ + The market region wasn't found. + """ + REGION_NOT_FOUND + + """ + The selected region is not supported for the selected channel. + """ + REGION_NOT_SUPPORTED_FOR_CHANNEL + + """ + Cannot add region-specific language. + """ + REGION_SPECIFIC_LANGUAGE + + """ + One of `subfolderSuffix` or `domainId` is required. + """ + REQUIRES_DOMAIN_OR_SUBFOLDER + + """ + Exactly one input option is required. + """ + REQUIRES_EXACTLY_ONE_OPTION @deprecated(reason: "No longer used") + + """ + Retail location currency must be local. + """ + RETAIL_LOCATION_CURRENCY_MUST_BE_LOCAL + + """ + The shop must have a web presence that uses the primary domain. + """ + SHOP_MUST_HAVE_PRIMARY_DOMAIN_WEB_PRESENCE + + """ + Can't have more than 50 markets. + """ + SHOP_REACHED_MARKETS_LIMIT @deprecated(reason: "No longer used") + + """ + Specified conditions cannot be empty. + """ + SPECIFIED_CONDITIONS_CANNOT_BE_EMPTY + + """ + With an ID list in input, SPECIFIED is not needed. + """ + SPECIFIED_NOT_VALID_FOR_INPUT + + """ + The subfolder suffix is invalid, please provide a different value. + """ + SUBFOLDER_SUFFIX_CANNOT_BE_SCRIPT_CODE + + """ + The subfolder suffix must be at least 2 letters. + """ + SUBFOLDER_SUFFIX_MUST_BE_AT_LEAST_2_LETTERS + + """ + The subfolder suffix must contain only letters. + """ + SUBFOLDER_SUFFIX_MUST_CONTAIN_ONLY_LETTERS @deprecated(reason: "No longer used") + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + 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") + + """ + Managing this catalog is not supported by your plan. + """ + UNPERMITTED_ENTITLEMENTS_MARKET_CATALOGS + + """ + The language isn't published to the store. + """ + UNPUBLISHED_LANGUAGE + + """ + Can't add unsupported country or region. + """ + UNSUPPORTED_COUNTRY_REGION + + """ + The specified currency is not supported. + """ + UNSUPPORTED_CURRENCY + + """ + The user doesn't have permission access to create or edit markets. + """ + USER_LACKS_PERMISSION + + """ + Web presences and condition types are not compatible with each other. + """ + WEB_PRESENCE_NOT_COMPATIBLE_WITH_CONDITION_TYPES + + """ + The market web presence wasn't found. + """ + WEB_PRESENCE_NOT_FOUND + + """ + 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") + + """ + Matching ALL or NONE isn't supported for this driver type. + """ + WILDCARD_NOT_SUPPORTED +} + +""" +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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "markets") { + """ + The alternate locales for the market’s web presence. + """ + alternateLocales: [String!] + + """ + The default locale for the market’s web presence. + """ + defaultLocale: String! + + """ + The web presence's domain ID. This field must be `null` if the `subfolderSuffix` isn't `null`. + """ + domainId: ID @gidTypes(types: ["Domain"]) + + """ + 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 @componentName(name: "platform") { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketWebPresenceDelete` mutation. +""" +type MarketWebPresenceDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "markets") { + """ + 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + 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 @componentName(name: "markets") { + """ + The alternate locales for the market’s web presence. + """ + alternateLocales: [String!] + + """ + The default locale for the market’s web presence. + """ + defaultLocale: String + + """ + The web presence's domain ID. This field must be null if `subfolderSuffix` is not null. + """ + domainId: ID @gidTypes(types: ["Domain"]) + + """ + 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 @componentName(name: "platform") { + """ + The market object. + """ + market: Market + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +Return type for `marketingActivitiesDeleteAllExternal` mutation. +""" +type MarketingActivitiesDeleteAllExternalPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_marketing_events` access scope.") @componentName(name: "merchant_marketing") { + """ + The URL of the marketing activity listing page in the marketing section. + """ + activityListUrl: URL + + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyV2 + + """ + The admin url used to edit this activity. + """ + adminEditUrl: URL! + + """ + The app which created this marketing activity. + """ + app: App! + + """ + The errors generated when an app publishes the marketing activity. + """ + appErrors: MarketingActivityExtensionAppErrors + + """ + The step type of a marketing automation activity. + """ + automationStepType: String + + """ + The allocated budget for the marketing activity. + """ + budget: MarketingBudget + + """ + The date and time when the marketing activity was created. + """ + createdAt: DateTime! + + """ + The time at which the most recent error occurred, which is set by the app. + """ + errorOccurredAt: DateTime + + """ + The flow editor URL to which the marketing activity is associated. + """ + flowEditorUrl: URL + + """ + 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 + + """ + The scheduled end time of the marketing activity, which is set by the app. + """ + scheduledToEndAt: DateTime + + """ + The scheduled start time of the marketing activity, which is set by the app. + """ + scheduledToStartAt: DateTime + + """ + 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! + + """ + Whether the marketing activity is tracking opens. + """ + trackingOpens: Boolean! + + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyInput + + """ + The budget for this marketing activity. + """ + budget: MarketingActivityBudgetInput + + """ + 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 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 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 hierarchy level of the activity within a campaign. The hierarchy level can't be updated. + """ + hierarchyLevel: MarketingActivityHierarchyLevel + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """ + The ID for the parent marketing activity, if creating hierarchical activities. + """ + parentActivityId: ID @gidTypes(types: ["MarketingActivity"]) + + """ + The remote ID for the parent marketing activity, if creating hierarchical activities. + """ + parentRemoteId: String + + """ + The domain from which ad clicks are forwarded to the shop. + """ + referringDomain: String + + """ + 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 URL for a preview image that's used for the marketing activity. + """ + remotePreviewImageUrl: URL + + """ + The URL for viewing and/or managing the activity outside of Shopify. + """ + remoteUrl: URL! + + """ + The date and time at which the activity is scheduled to end. + """ + scheduledEnd: DateTime + + """ + The date and time at which the activity is scheduled to start. + """ + scheduledStart: 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 status of the marketing activity. If status isn't set it will default to UNDEFINED. + """ + status: MarketingActivityExternalStatus + + """ + 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 title of the marketing activity. + """ + title: String! + + """ + 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 + + """ + 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 +} + +""" +Return type for `marketingActivityCreateExternal` mutation. +""" +type MarketingActivityCreateExternalPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + The budget for this marketing activity. + """ + budget: MarketingActivityBudgetInput @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + Encoded context containing marketing campaign id. + """ + context: 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! @gidTypes(types: ["MarketingActivityExtension"]) + + """ + 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 current state of the marketing activity. + """ + status: MarketingActivityStatus! + + """ + 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.") + + """ + 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.") +} + +""" +Return type for `marketingActivityCreate` mutation. +""" +type MarketingActivityCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + The app is either not responding or returning unexpected data. + """ + API_ERROR + + """ + The app needs to be installed. + """ + INSTALL_REQUIRED_ERROR + + """ + The shop/user must be onboarded to use the app. + """ + NOT_ONBOARDED_ERROR + + """ + The app has returned an error when invoking the platform. + """ + PLATFORM_ERROR + + """ + The app has returned an error with a critical severity level. + """ + PLATFORM_ERROR_CRITICAL + + """ + The app has returned an error with an info severity level. + """ + PLATFORM_ERROR_INFO + + """ + The app has returned an error with a warning severity level. + """ + PLATFORM_ERROR_WARNING + + """ + The app has returned validation errors. + """ + VALIDATION_ERROR +} + +""" +Represents errors returned from apps when using the marketing activity extension. +""" +type MarketingActivityExtensionAppErrors @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + This marketing activity is currently running. + """ + ACTIVE + + """ + This marketing activity was deleted and it was triggered from outside of Shopify. + """ + DELETED_EXTERNALLY + + """ + This marketing activity has completed running. + """ + INACTIVE + + """ + This marketing activity is currently not running. + """ + PAUSED + + """ + This marketing activity is scheduled to run. + """ + SCHEDULED + + """ + The marketing activity's status is unknown. + """ + UNDEFINED +} + +""" +Hierarchy levels for external marketing activities. +""" +enum MarketingActivityHierarchyLevel @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + This status badge has type attention. + """ + ATTENTION + + """ + This status badge has type critical. + """ + CRITICAL + + """ + This status badge has type default. + """ + DEFAULT + + """ + This status badge has type info. + """ + INFO + + """ + This status badge has type success. + """ + SUCCESS + + """ + This status badge has type warning. + """ + WARNING +} + +""" +The input fields required to update an externally managed marketing activity. +""" +input MarketingActivityUpdateExternalInput @componentName(name: "merchant_marketing") { + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyInput + + """ + The budget for this marketing activity. + """ + budget: MarketingActivityBudgetInput + + """ + 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 date and time at which the activity ended. + """ + end: DateTime + + """ + 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 URL for a preview image that's used for the marketing activity. + """ + remotePreviewImageUrl: URL + + """ + The URL for viewing and/or managing the activity outside of Shopify. + """ + remoteUrl: URL + + """ + The date and time at which the activity is scheduled to end. + """ + scheduledEnd: DateTime + + """ + The date and time at which the activity is scheduled to start. + """ + scheduledStart: DateTime + + """ + The date and time at which the activity started. + """ + start: DateTime + + """ + The status of the marketing activity. + """ + status: MarketingActivityExternalStatus + + """ + 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 title of the marketing activity. + """ + title: String +} + +""" +Return type for `marketingActivityUpdateExternal` mutation. +""" +type MarketingActivityUpdateExternalPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + The cumulative amount spent on the marketing activity. + """ + adSpend: MoneyInput @deprecated(reason: "Use `MarketingEngagementCreate.MarketingEngagementInput.adSpend` GraphQL to send the ad spend.") + + """ + The budget for the marketing activity. + """ + budget: MarketingActivityBudgetInput @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 time at which the most recent error occurred. + """ + errorOccurredAt: DateTime @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + 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.") + + """ + The event context of the marketing activity. The event context is relayed from + the external editor URL. + """ + eventContext: String @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.") + + """ + The ID of the marketing activity. + """ + id: ID! @gidTypes(types: ["MarketingActivity"]) + + """ + 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.") @gidTypes(types: ["Product", "Shop"]) + + """ + The marketing channel of the marketing activity. + """ + marketingChannel: MarketingChannel @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + 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.") @gidTypes(types: ["MarketingRecommendation"]) + + """ + The time at which the activity is scheduled to end. + """ + scheduledToEndAt: DateTime @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + The time at which the activity is scheduled to start. + """ + scheduledToStartAt: DateTime @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + 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 title of the marketing activity. + """ + title: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") + + """ + Whether the marketing activity is tracking the email open rate. + """ + trackingOpens: Boolean @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.") + + """ + Whether the marketing activity uses the external editor. + """ + useExternalEditor: Boolean @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.") +} + +""" +Return type for `marketingActivityUpdate` mutation. +""" +type MarketingActivityUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + The amount spent on the marketing activity. + """ + adSpend: MoneyInput + + """ + The budget for this marketing activity. + """ + budget: MarketingActivityBudgetInput + + """ + 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 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 + + """ + The hierarchy level of the activity within a campaign. The hierarchy level can't be updated. + """ + hierarchyLevel: MarketingActivityHierarchyLevel + + """ + The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. + """ + marketingChannelType: MarketingChannel! + + """ + The remote ID for the parent marketing activity, if creating hierarchical activities. + """ + parentRemoteId: String + + """ + The domain from which ad clicks are forwarded to the shop. + """ + referringDomain: String + + """ + 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 URL for a preview image that's used for the marketing activity. + """ + remotePreviewImageUrl: URL + + """ + The URL for viewing and/or managing the activity outside of Shopify. + """ + remoteUrl: URL! + + """ + The date and time at which the activity is scheduled to end. + """ + scheduledEnd: DateTime + + """ + The date and time at which the activity is scheduled to start. + """ + scheduledStart: 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 status of the marketing activity. + """ + status: MarketingActivityExternalStatus! + + """ + 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 title of the marketing activity. + """ + title: String! + + """ + 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 + + """ + 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 +} + +""" +Return type for `marketingActivityUpsertExternal` mutation. +""" +type MarketingActivityUpsertExternalPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "platform") { + """ + The marketing activity must be an external activity. + """ + ACTIVITY_NOT_EXTERNAL + + """ + 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 from STOREFRONT_APP. + """ + CANNOT_UPDATE_TACTIC_IF_ORIGINALLY_STOREFRONT_APP + + """ + 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 + + """ + All currency codes provided in the input need to match. + """ + CURRENCY_CODE_MISMATCH_INPUT + + """ + 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 job to delete all external activities failed to enqueue. + """ + DELETE_JOB_FAILED_TO_ENQUEUE + + """ + The channel handle value cannot be modified. + """ + IMMUTABLE_CHANNEL_HANDLE + + """ + The hierarchy level cannot be modified. + """ + IMMUTABLE_HIERARCHY_LEVEL + + """ + The parent activity cannot be modified. + """ + IMMUTABLE_PARENT_ID + + """ + The URL parameter value cannot be modified. + """ + IMMUTABLE_URL_PARAMETER + + """ + The UTM parameters cannot be modified. + """ + IMMUTABLE_UTM_PARAMETERS + + """ + The input value is invalid. + """ + INVALID + + """ + 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 + + """ + The remote ID does not correspond to an existing activity. + """ + INVALID_REMOTE_ID + + """ + The currency codes provided need to match the referenced marketing activity's currency code. + """ + MARKETING_ACTIVITY_CURRENCY_CODE_MISMATCH + + """ + 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 URL parameter value already exists. + """ + MARKETING_ACTIVITY_WITH_URL_PARAMETER_VALUE_ALREADY_EXISTS + + """ + A marketing activity with the same UTM campaign, medium, and source already exists. + """ + MARKETING_ACTIVITY_WITH_UTM_CAMPAIGN_ALREADY_EXISTS + + """ + Marketing activity is not valid, the associated marketing event does not exist. + """ + MARKETING_EVENT_DOES_NOT_EXIST + + """ + Non-hierarchical marketing activities must have UTM parameters or a URL parameter value. + """ + NON_HIERARCHIAL_REQUIRES_UTM_URL_PARAMETER + + """ + The input value is already taken. + """ + TAKEN +} + +""" +This type combines budget amount and its marketing budget type. +""" +type MarketingBudget @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + Displayed ads. + """ + DISPLAY + + """ + Email. + """ + EMAIL + + """ + Referral links. + """ + REFERRAL + + """ + Paid search. + """ + SEARCH + + """ + Social media. + """ + SOCIAL +} + +""" +Marketing engagement represents customer activity taken on a marketing activity or a marketing channel. +""" +type MarketingEngagement @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + The total ad spend for the marketing content. Recurring weekly, monthly, or + yearly spend needs to be divided into daily amounts. + """ + adSpend: MoneyInput + + """ + 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 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 = false @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 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: MoneyInput + + """ + 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 `marketingEngagementsDelete` mutation. +""" +type MarketingEngagementsDeletePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_marketing_events` access scope.") @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + 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 + + """ + Search engine optimization. + """ + SEO + + """ + A popup on the online store. + """ + STOREFRONT_APP + + """ + A transactional email. + """ + TRANSACTIONAL +} + +""" +The required configuration of features that a marketplace sets for a store to onboard +onto the marketplace channel. +""" +type MarketplacePaymentsConfiguration @requiredAccess(scope: "`read_marketplace_payments_configurations` access scope.") @componentName(name: "marketplaces") @privatelyDocumented { + """ + The URL that redirects the merchant to set up the required features on their store. + """ + actionUrl: URL! + + """ + The required features for a store to onboard onto the marketplace channel. + """ + requestedFeatures: [MarketplacePaymentsFeature!]! +} + +""" +Return type for `marketplacePaymentsConfigurationUpdate` mutation. +""" +type MarketplacePaymentsConfigurationUpdatePayload @componentName(name: "platform") @privatelyDocumented { + """ + The current payment configuration. + """ + paymentConfiguration: MarketplacePaymentsConfiguration + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketplacePaymentsConfigurationUpdateUserError!]! +} + +""" +An error that occurs during the execution of `MarketplacePaymentsConfigurationUpdate`. +""" +type MarketplacePaymentsConfigurationUpdateUserError implements DisplayableError @componentName(name: "platform") @privatelyDocumented { + """ + The error code. + """ + code: MarketplacePaymentsConfigurationUpdateUserErrorCode + + """ + 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 `MarketplacePaymentsConfigurationUpdateUserError`. +""" +enum MarketplacePaymentsConfigurationUpdateUserErrorCode @componentName(name: "platform") @privatelyDocumented { + """ + No features were requested. + """ + EMPTY_FEATURES + + """ + Invalid feature requested. + """ + INVALID_FEATURE + + """ + A feature was required that the shop isn't eligible for. + """ + NON_ONBOARDABLE_REQUIRED_FEATURE + + """ + The configuration couldn't be saved. + """ + NOT_SAVED +} + +""" +A feature that a Marketplace has requested a merchant have enabled on their shop. +""" +type MarketplacePaymentsFeature @requiredAccess(scope: "`read_marketplace_payments_configurations` access scope.") @componentName(name: "marketplaces") @privatelyDocumented { + """ + Whether the shop can onboard onto the feature. + """ + onboardable: Boolean! + + """ + Whether the feature is ready for Marketplace usage. + """ + ready: Boolean! + + """ + Whether the feature is required for the configuration to be ready. + """ + required: Boolean! + + """ + The subtype of the requested marketplace payments feature. + """ + subtype: MarketplacePaymentsFeatureSubtype! + + """ + The type of the requested marketplace payments feature. + """ + type: MarketplacePaymentsFeatureType! +} + +""" +The input fields for a marketplace payments feature. +""" +input MarketplacePaymentsFeatureInput @componentName(name: "marketplaces") @privatelyDocumented { + """ + Whether the feature is required for the configuration to be ready. + """ + required: Boolean! + + """ + The type of the marketplace payments feature. + """ + type: MarketplacePaymentsFeatureType! +} + +""" +All the possible feature subtypes that can be returned for a feature. +""" +enum MarketplacePaymentsFeatureSubtype @componentName(name: "marketplaces") @privatelyDocumented { + """ + The only subtype for PayPal feature. + """ + PAYPAL @deprecated(reason: "PayPal marketplace payments is no longer supported.") + + """ + The Shopify Payments subtype for Shopify Payments feature. Returned when a merchant can use Shopify Payments. + """ + SHOPIFY_PAYMENTS + + """ + The Shop Pay subtype for Shopify Payments feature. Returned when a merchant can use Shop Pay with a 3rd party gateway. + """ + SHOP_PAY +} + +""" +All the possible features that a marketplace can require a merchant to enable for onboarding. +""" +enum MarketplacePaymentsFeatureType @componentName(name: "marketplaces") @privatelyDocumented { + """ + The PayPal payments app is enabled on a store and the merchant is onboarded with PayPal. + """ + PAYPAL @deprecated(reason: "PayPal marketplace payments is no longer supported.") + + """ + Shopify Payments is enabled on a store. + """ + SHOPIFY_PAYMENTS +} + +""" +The entitlements for B2B markets. +""" +type MarketsB2BEntitlement @componentName(name: "markets") { + """ + The entitlements for B2B market catalogs. + """ + catalogs: MarketsCatalogsEntitlement! + + """ + Whether B2B markets are enabled. + """ + enabled: Boolean! +} + +""" +The entitlements for catalogs. +""" +type MarketsCatalogsEntitlement @componentName(name: "merchandising") { + """ + Whether catalogs are enabled. + """ + enabled: Boolean! + + """ + The maximum number of catalogs allowed. + """ + limit: Int! +} + +""" +The entitlements for region markets. +""" +type MarketsRegionsEntitlement @componentName(name: "markets") { + """ + 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + The resolved catalogs. + """ + catalogs( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketWebPresenceConnection! +} + +""" +The entitlements for retail markets. +""" +type MarketsRetailEntitlement @componentName(name: "markets") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + Whether themes are enabled. + """ + enabled: Boolean! +} + +""" +Markets entitlement information. +""" +type MarketsType @componentName(name: "billing") { + """ + 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope or `read_files` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Media could not be created because a file with the same name already exists. + """ + DUPLICATE_FILENAME_ERROR + + """ + 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 + + """ + 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 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 cumulative file storage limit would be exceeded. + """ + FILE_STORAGE_LIMIT_EXCEEDED + + """ + 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 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 could not be created because the image has an invalid aspect ratio. + """ + INVALID_IMAGE_ASPECT_RATIO + + """ + Media could not be created because the image size is too large. + """ + INVALID_IMAGE_FILE_SIZE + + """ + Media could not be created because the image's resolution exceeds the max limit. + """ + INVALID_IMAGE_RESOLUTION + + """ + Media could not be processed because the signed URL was invalid. + """ + INVALID_SIGNED_URL + + """ + Media timed out because it is currently being modified by another operation. + """ + MEDIA_TIMEOUT_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 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_PROCESSING_FAILURE + + """ + 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 + + """ + Model failed validation. + """ + MODEL3D_VALIDATION_ERROR + + """ + Media could not be reverted to previous version. + """ + REVERT_MEDIA_VERSION_FAILURE + + """ + Media error has occured for unknown reason. + """ + UNKNOWN + + """ + Media could not be created because the image is an unsupported file type. + """ + UNSUPPORTED_IMAGE_FILE_TYPE + + """ + 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 maximum duration requirement. + """ + VIDEO_MAX_DURATION_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 maximum width requirement. + """ + VIDEO_MAX_WIDTH_ERROR + + """ + Media could not be created because the metadata could not be read. + """ + VIDEO_METADATA_READ_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 minimum height requirement. + """ + VIDEO_MIN_HEIGHT_ERROR + + """ + Media could not be created because it does not meet the minimum width requirement. + """ + VIDEO_MIN_WIDTH_ERROR + + """ + Video failed validation. + """ + VIDEO_VALIDATION_ERROR +} + +""" +Host for a Media Resource. +""" +enum MediaHost @componentName(name: "merchandising") { + """ + Host for Vimeo embedded videos. + """ + VIMEO + + """ + Host for YouTube embedded videos. + """ + YOUTUBE +} + +""" +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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! @deprecated(reason: "No longer supported. Use metaobjects instead.") + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 @gidTypes(types: ["Market"]) + ): [Translation!]! + + """ + Status resulting from the latest update operation. See fileErrors for details. + """ + updateStatus: FileStatus + + """ + 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope or `read_images` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Preview image processing has failed. + """ + FAILED + + """ + Preview image is being processed. + """ + PROCESSING + + """ + Preview image is ready to be displayed. + """ + READY + + """ + Preview image is uploaded but not yet processed. + """ + UPLOADED +} + +""" +The possible statuses for a media object. +""" +enum MediaStatus @componentName(name: "merchandising") { + """ + Media processing has failed. + """ + FAILED + + """ + Media is being processed. + """ + PROCESSING + + """ + Media is ready to be displayed. + """ + READY + + """ + Media has been uploaded but not yet processed. + """ + UPLOADED +} + +""" +Represents an error that happens during execution of a Media query or mutation. +""" +type MediaUserError implements DisplayableError @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + Cannot specify source and revert version at the same time. + """ + CANNOT_SPECIFY_SOURCE_AND_VERSION_ID + + """ + The input value is invalid. + """ + INVALID + + """ + Invalid media type. + """ + INVALID_MEDIA_TYPE + + """ + Exceeded the maximum number of 100 variant-media pairs per mutation call. + """ + MAXIMUM_VARIANT_MEDIA_PAIRS_EXCEEDED + + """ + Media cannot be modified. It is currently being modified by another operation. + """ + MEDIA_CANNOT_BE_MODIFIED + + """ + Media does not exist. + """ + MEDIA_DOES_NOT_EXIST + + """ + Media does not exist on the given product. + """ + MEDIA_DOES_NOT_EXIST_ON_PRODUCT + + """ + The specified media is not attached to the specified variant. + """ + MEDIA_IS_NOT_ATTACHED_TO_VARIANT + + """ + Media version does not exist. + """ + MEDIA_VERSION_DOES_NOT_EXIST + + """ + Missing arguments. + """ + MISSING_ARGUMENTS + + """ + Model3d creation throttle was exceeded. + """ + MODEL3D_THROTTLE_EXCEEDED + + """ + Model validation failed. + """ + MODEL3D_VALIDATION_ERROR + + """ + Non-ready media are not supported. + """ + NON_READY_MEDIA + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Exceeded the limit of media per product. + """ + PRODUCT_MEDIA_LIMIT_EXCEEDED + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Product variant already has attached media. + """ + PRODUCT_VARIANT_ALREADY_HAS_MEDIA + + """ + Variant does not exist on the given product. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST_ON_PRODUCT + + """ + Variant specified in more than one pair. + """ + PRODUCT_VARIANT_SPECIFIED_MULTIPLE_TIMES + + """ + Exceeded the limit of media per shop. + """ + SHOP_MEDIA_LIMIT_EXCEEDED + + """ + Only one mediaId is allowed per variant-media input pair. + """ + TOO_MANY_MEDIA_PER_INPUT_PAIR + + """ + Video creation throttle was exceeded. + """ + VIDEO_THROTTLE_EXCEEDED + + """ + Video validation failed. + """ + VIDEO_VALIDATION_ERROR +} + +""" +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 @requiredAccess(scope: "`read_products` access scope or `read_files` access scope.") @componentName(name: "merchandising") { + """ + The code representing the type of warning. + """ + code: MediaWarningCode! + + """ + Translated warning message. + """ + message: String +} + +""" +Warning types for media. +""" +enum MediaWarningCode @componentName(name: "merchandising") { + """ + 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 + + """ + 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 +} + +""" +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 @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { + """ + 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 @gidTypes(types: ["Market"]) + ): [Translation!]! +} + +""" +An auto-generated type for paginating through multiple Menus. +""" +type MenuConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The menu cannot be nested more than 3 level deep. + """ + NESTING_TOO_DEEP + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +Return type for `menuDelete` mutation. +""" +type MenuDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + 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 @componentName(name: "online_store") { + """ + 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 @componentName(name: "online_store") { + """ + List of the menu items nested under this item sorted by position. + """ + items: [MenuItemCreateInput!] + + """ + The menu item's association with an existing resource. + """ + resourceId: ID @gidTypes(types: ["Collection", "Product", "OnlineStorePage", "OnlineStoreBlog", "Article", "Page", "Blog", "Article", "ShopPolicy", "Metaobject", "CustomerAccountPage"]) + + """ + 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 to be used when the item doesn't point to a resource. + """ + url: String +} + +""" +A menu item type. +""" +enum MenuItemType @componentName(name: "online_store") { + """ + The article menu item type. + """ + ARTICLE + + """ + The blog menu item type. + """ + BLOG + + """ + The catalog menu item type. + """ + CATALOG + + """ + The collection menu item type. + """ + COLLECTION + + """ + The collections menu item type. + """ + COLLECTIONS + + """ + The customer_account_page menu item type. + """ + CUSTOMER_ACCOUNT_PAGE + + """ + The frontpage menu item type. + """ + FRONTPAGE + + """ + The http menu item type. + """ + HTTP + + """ + The metaobject menu item type. + """ + METAOBJECT + + """ + The page menu item type. + """ + PAGE + + """ + The product menu item type. + """ + PRODUCT + + """ + The search menu item type. + """ + SEARCH + + """ + The shop_policy menu item type. + """ + SHOP_POLICY +} + +""" +The input fields required to update a valid menu item. +""" +input MenuItemUpdateInput @componentName(name: "online_store") { + """ + A globally-unique ID of the online store navigation menu item. + """ + id: ID @gidTypes(types: ["MenuItem"]) + + """ + List of the menu items nested under this item sorted by position. + """ + items: [MenuItemUpdateInput!] + + """ + The menu item's association with an existing resource. + """ + resourceId: ID @gidTypes(types: ["Collection", "Product", "OnlineStorePage", "OnlineStoreBlog", "Article", "Page", "Blog", "Article", "ShopPolicy", "Metaobject", "CustomerAccountPage"]) + + """ + 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 to be used when the item doesn't point to a resource. + """ + url: String +} + +""" +The set of valid sort keys for the Menu query. +""" +enum MenuSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The menu cannot be nested more than 3 level deep. + """ + NESTING_TOO_DEEP + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +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 @componentName(name: "pricing") { + """ + 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 + [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) + class. + """ + PRODUCT +} + +""" +Merchant signals for apps. +""" +type MerchantAppSignals @requiredAccess(scope: "The app must have access to check merchant signals.") @componentName(name: "merchant_risk") { + """ + Whether Shopify has pre-verified the merchant's business for onboarding to + restricted apps. Returns `false` if the shop isn't marked as eligible. + """ + eligibleForRestrictedApps: Boolean! +} + +""" +Merchant approval for accelerated onboarding to channel integration apps. +""" +type MerchantApprovalSignals @requiredAccess(scope: "`read_merchant_approval_signals` access scope.") @componentName(name: "merchant_risk") { + """ + Check if there is an enabled payment gateway. + """ + canProcessCheckout: Boolean! + + """ + 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! + + """ + A list of scores that represents the shop's ability to deliver on time to a + particular country. The score is a value between 0 and 1. + """ + onTimeDeliveryScores: [OnTimeDeliveryScore!]! + + """ + 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 & HasPublishedTranslations & LegacyInteroperability & Node @componentName(name: "content") @protectedObject(subject: "customer") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + ): MetafieldReferenceConnection + + """ + The size of the metafield value in bytes. + """ + sizeInBytes: 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 @gidTypes(types: ["Market"]) + ): [Translation!]! + + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The access permitted on the Admin API. + """ + admin: MetafieldAdminAccessInput + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetafieldCustomerAccountAccessInput + + """ + The access permitted on the Storefront API. + """ + storefront: MetafieldStorefrontAccessInput +} + +""" +The input fields for the access settings for the metafields under the definition. +""" +input MetafieldAccessUpdateInput @componentName(name: "content") { + """ + The admin access setting to use for the metafields under this definition. + """ + admin: MetafieldAdminAccessInput + + """ + The Customer Account API access setting to use for the metafields under this definition. + """ + customerAccount: MetafieldCustomerAccountAccessInput + + """ + The storefront access setting to use for the metafields under this definition. + """ + storefront: MetafieldStorefrontAccessInput +} + +""" +Metafield access permissions for the Admin API. +""" +enum MetafieldAdminAccess @componentName(name: "content") { + """ + 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 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 +} + +""" +Metafield access permissions for the Admin API. +""" +enum MetafieldAdminAccessInput @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + Indicate whether a metafield definition is configured for filtering. + """ + adminFilterable: MetafieldCapabilityAdminFilterable! + + """ + Indicate whether a metafield definition can be queried in analytics. + """ + analyticsQueryable: MetafieldCapabilityAnalyticsQueryable! + + """ + The capability configuration for automatically copying values from a cart + metafield to the corresponding order metafield when an order is created. + """ + cartToOrderCopyable: MetafieldCapabilityCartToOrderCopyable! + + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The analytics queryable capability of a metafield definition. +""" +type MetafieldCapabilityAnalyticsQueryable @componentName(name: "content") { + """ + Indicates if the definition is eligible to have the capability. + """ + eligible: Boolean! + + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for the analytics queryable capability. +""" +input MetafieldCapabilityAnalyticsQueryableInput @componentName(name: "content") { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +Information about the cart to order copyable capability on a metafield definition. +Only order metafield definitions are eligible to have this capability enabled. + +When enabled, the value from a cart metafield is automatically copied to the corresponding +order metafield when an order is created. The namespace and key must match between the cart and order metafields. +""" +type MetafieldCapabilityCartToOrderCopyable @componentName(name: "sales") { + """ + 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 or disabling the "Cart to order copyable" capability. +This capability is only available for order metafield definitions. + +When enabled, the value from a cart metafield is automatically copied to the corresponding +order metafield when an order is created. The namespace and key must match between the cart and order metafields. +""" +input MetafieldCapabilityCartToOrderCopyableInput @componentName(name: "sales") { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for creating a metafield capability. +""" +input MetafieldCapabilityCreateInput @componentName(name: "content") { + """ + The input for updating the admin filterable capability. + """ + adminFilterable: MetafieldCapabilityAdminFilterableInput + + """ + The input for the analytics queryable capability. + """ + analyticsQueryable: MetafieldCapabilityAnalyticsQueryableInput + + """ + The input for updating the cart to order copyable capability. + """ + cartToOrderCopyable: MetafieldCapabilityCartToOrderCopyableInput + + """ + The input for updating the smart collection condition capability. + """ + smartCollectionCondition: MetafieldCapabilitySmartCollectionConditionInput + + """ + The input for updating the unique values capability. + """ + uniqueValues: MetafieldCapabilityUniqueValuesInput +} + +""" +Information about the smart collection condition capability on a metafield definition. +""" +type MetafieldCapabilitySmartCollectionCondition @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +Information about the unique values capability on a metafield definition. +""" +type MetafieldCapabilityUniqueValues @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for updating a metafield capability. +""" +input MetafieldCapabilityUpdateInput @componentName(name: "content") { + """ + The input for updating the admin filterable capability. + """ + adminFilterable: MetafieldCapabilityAdminFilterableInput + + """ + The input for the analytics queryable capability. + """ + analyticsQueryable: MetafieldCapabilityAnalyticsQueryableInput + + """ + The input for updating the cart to order copyable capability. + """ + cartToOrderCopyable: MetafieldCapabilityCartToOrderCopyableInput + + """ + The input for updating the smart collection condition capability. + """ + smartCollectionCondition: MetafieldCapabilitySmartCollectionConditionInput + + """ + The input for updating the unique values capability. + """ + uniqueValues: MetafieldCapabilityUniqueValuesInput +} + +""" +An auto-generated type for paginating through multiple Metafields. +""" +type MetafieldConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + READ + + """ + Read and write access. + """ + READ_WRITE +} + +""" +Metafield access permissions for the Customer Account API. +""" +enum MetafieldCustomerAccountAccessInput @componentName(name: "content") { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + READ + + """ + Read and write access. + """ + READ_WRITE +} + +""" +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 @componentName(name: "content") { + """ + 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 date and time when the metafield definition was created. + """ + createdAt: DateTime! + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Returns the metafields filtered by the validation status. + """ + validationStatus: MetafieldValidationStatus = ANY + ): 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! + + """ + The date and time when the metafield definition was updated. + """ + updatedAt: DateTime! + + """ + 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 @componentName(name: "content") { + """ + The metafield definition has failed to be enabled for admin filtering. + """ + FAILED + + """ + The metafield definition allows admin filtering by matching metafield values. + """ + FILTERABLE + + """ + The metafield definition's metafields are currently being processed for admin filtering. + """ + IN_PROGRESS + + """ + The metafield definition cannot be used for admin filtering. + """ + NOT_FILTERABLE +} + +""" +An auto-generated type for paginating through multiple MetafieldDefinitions. +""" +type MetafieldDefinitionConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The subtype value of the constraint. + """ + value: String! +} + +""" +An auto-generated type for paginating through multiple MetafieldDefinitionConstraintValues. +""" +type MetafieldDefinitionConstraintValueConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The category of resource subtypes that the definition applies to. + """ + key: String + + """ + The specific constraint subtype values that the definition applies to. + """ + values( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + The error code. + """ + code: MetafieldDefinitionCreateUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The key of the failing validation 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 `MetafieldDefinitionCreateUserError`. +""" +enum MetafieldDefinitionCreateUserErrorCode @componentName(name: "platform") { + """ + Admin access can only be specified for app-owned metafield definitions. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED + + """ + The input value is blank. + """ + BLANK + + """ + A capability is required for the definition type but is disabled. + """ + CAPABILITY_REQUIRED_BUT_DISABLED + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + A duplicate option. + """ + DUPLICATE_OPTION + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is invalid. + """ + INVALID + + """ + The metafield definition capability is invalid. + """ + INVALID_CAPABILITY + + """ + A field contains an invalid character. + """ + INVALID_CHARACTER + + """ + The metafield definition constraints are invalid. + """ + INVALID_CONSTRAINTS + + """ + The input combination is invalid. + """ + INVALID_INPUT_COMBINATION + + """ + An invalid option. + """ + INVALID_OPTION + + """ + The maximum limit of definitions per owner type has exceeded. + """ + LIMIT_EXCEEDED + + """ + 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 pinned limit has been reached for the owner type. + """ + PINNED_LIMIT_REACHED + + """ + The input value needs to be blank. + """ + PRESENT + + """ + This namespace and key combination is reserved for standard definitions. + """ + RESERVED_NAMESPACE_KEY + + """ + 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 input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The definition type is not eligible to be used as collection condition. + """ + TYPE_NOT_ALLOWED_FOR_CONDITIONS + + """ + 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 +} + +""" +Return type for `metafieldDefinitionDelete` mutation. +""" +type MetafieldDefinitionDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + Deleting an id type metafield definition requires deletion of its associated metafields. + """ + ID_TYPE_DELETION_ERROR + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + Action cannot proceed. Definition is currently in use. + """ + METAFIELD_DEFINITION_IN_USE + + """ + Definition not found. + """ + NOT_FOUND + + """ + The input value needs to be blank. + """ + PRESENT + + """ + 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 + + """ + Definition is required by an installed app and cannot be deleted. + """ + STANDARD_METAFIELD_DEFINITION_DEPENDENT_ON_APP +} + +""" +An auto-generated type which holds one MetafieldDefinition and a cursor during pagination. +""" +type MetafieldDefinitionEdge @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The unique identifier for the metafield definition within its namespace. + """ + key: String! + + """ + 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 resource type that the metafield definition is attached to. + """ + ownerType: MetafieldOwnerType! +} + +""" +The input fields required to create a metafield definition. +""" +input MetafieldDefinitionInput @componentName(name: "content") { + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: MetafieldAccessInput + + """ + The capabilities of the metafield definition. + """ + capabilities: MetafieldCapabilityCreateInput + + """ + 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 description for the metafield definition. + """ + description: 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 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 resource type that the metafield definition is attached to. + """ + ownerType: MetafieldOwnerType! + + """ + Whether to [pin](https://help.shopify.com/manual/custom-data/metafields/pinning-metafield-definitions) + the metafield definition. + """ + pin: Boolean = false + + """ + 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! + + """ + Whether the metafield definition can be used as a collection condition. + """ + useAsCollectionCondition: Boolean = false @deprecated(reason: "Use `smartCollectionCondition` instead.") + + """ + 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!] +} + +""" +Return type for `metafieldDefinitionPin` mutation. +""" +type MetafieldDefinitionPinPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The metafield definition is already pinned. + """ + ALREADY_PINNED + + """ + 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 + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The metafield definition was not found. + """ + NOT_FOUND + + """ + The pinned limit has been reached for owner type. + """ + PINNED_LIMIT_REACHED + + """ + The metafield definition does not support pinning. + """ + UNSUPPORTED_PINNING +} + +""" +Possible metafield definition pinned statuses. +""" +enum MetafieldDefinitionPinnedStatus @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The metafield definition was not found. + """ + NOT_FOUND + + """ + The metafield definition isn't pinned. + """ + NOT_PINNED +} + +""" +The input fields required to update a metafield definition. +""" +input MetafieldDefinitionUpdateInput @componentName(name: "content") { + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: MetafieldAccessUpdateInput + + """ + The capabilities of the metafield definition. + """ + capabilities: MetafieldCapabilityUpdateInput + + """ + 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 description for the metafield definition. + """ + description: 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 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 resource type that the metafield definition is attached to. Used to help identify the metafield definition, + but can't be updated itself. + """ + ownerType: MetafieldOwnerType! + + """ + 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.") + + """ + 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!] +} + +""" +Return type for `metafieldDefinitionUpdate` mutation. +""" +type MetafieldDefinitionUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + The error code. + """ + code: MetafieldDefinitionUpdateUserErrorCode + + """ + The index of the array element that's causing the error. + """ + elementIndex: Int + + """ + The key of the failing validation 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 `MetafieldDefinitionUpdateUserError`. +""" +enum MetafieldDefinitionUpdateUserErrorCode @componentName(name: "platform") { + """ + 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 + + """ + The input value is blank. + """ + BLANK + + """ + The metafield definition capability cannot be disabled. + """ + CAPABILITY_CANNOT_BE_DISABLED + + """ + A capability is required for the definition type but is disabled. + """ + CAPABILITY_REQUIRED_BUT_DISABLED + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + A duplicate option. + """ + DUPLICATE_OPTION + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + The metafield definition capability is invalid. + """ + INVALID_CAPABILITY + + """ + The metafield definition constraints are invalid. + """ + INVALID_CONSTRAINTS + + """ + An invalid input. + """ + INVALID_INPUT + + """ + The input combination is invalid. + """ + INVALID_INPUT_COMBINATION + + """ + An invalid option. + """ + INVALID_OPTION + + """ + Action cannot proceed. Definition is currently in use. + """ + METAFIELD_DEFINITION_IN_USE + + """ + You cannot change the metaobject definition pointed to by a metaobject reference metafield definition. + """ + METAOBJECT_DEFINITION_CHANGED + + """ + The metafield definition wasn't found. + """ + NOT_FOUND + + """ + 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 pinned limit has been reached for the owner type. + """ + PINNED_LIMIT_REACHED + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The input value is too long. + """ + TOO_LONG + + """ + The definition type is not eligible to be used as collection condition. + """ + TYPE_NOT_ALLOWED_FOR_CONDITIONS + + """ + The metafield definition does not support pinning. + """ + UNSUPPORTED_PINNING +} + +""" +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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The key of the metafield. + """ + key: String! + + """ + The namespace of the metafield. + """ + namespace: String! + + """ + The unique ID of the resource that the metafield is attached to. + """ + ownerId: ID! @gidTypes(types: ["HasMetafields"]) +} + +""" +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 @componentName(name: "content") { + """ + The unique ID of the metafield. Using `namespace` and `key` is preferred for creating and updating. + """ + id: ID @gidTypes(types: ["Metafield"]) + + """ + 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 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 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 + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String +} + +""" +Possible types of a metafield's owner resource. +""" +enum MetafieldOwnerType @componentName(name: "content") { + """ + The Api Permission metafield owner type. + """ + API_PERMISSION + + """ + The Article metafield owner type. + """ + ARTICLE + + """ + The Blog metafield owner type. + """ + BLOG + + """ + The Cart Transform metafield owner type. + """ + CARTTRANSFORM + + """ + The Collection metafield owner type. + """ + COLLECTION + + """ + The Company metafield owner type. + """ + COMPANY + + """ + The Company Location metafield owner type. + """ + COMPANY_LOCATION + + """ + The Customer metafield owner type. + """ + CUSTOMER + + """ + The Delivery Customization metafield owner type. + """ + DELIVERY_CUSTOMIZATION + + """ + The Delivery Method metafield owner type. + """ + DELIVERY_METHOD + + """ + The Delivery Option Generator metafield owner type. + """ + DELIVERY_OPTION_GENERATOR + + """ + The Discount metafield owner type. + """ + DISCOUNT + + """ + The draft order metafield owner type. + """ + DRAFTORDER + + """ + The Fulfillment Constraint Rule metafield owner type. + """ + FULFILLMENT_CONSTRAINT_RULE + + """ + The GiftCardTransaction metafield owner type. + """ + GIFT_CARD_TRANSACTION + + """ + The Location metafield owner type. + """ + LOCATION + + """ + The Market metafield owner type. + """ + MARKET + + """ + The Media Image metafield owner type. + """ + MEDIA_IMAGE @deprecated(reason: "`MEDIA_IMAGE` is deprecated.") + + """ + The Order metafield owner type. + """ + ORDER + + """ + The Order Routing Location Rule metafield owner type. + """ + ORDER_ROUTING_LOCATION_RULE + + """ + The Page metafield owner type. + """ + PAGE + + """ + The Payment Customization metafield owner type. + """ + PAYMENT_CUSTOMIZATION + + """ + The Product metafield owner type. + """ + PRODUCT + + """ + The Product Variant metafield owner type. + """ + PRODUCTVARIANT + + """ + The Selling Plan metafield owner type. + """ + SELLING_PLAN + + """ + The Shop metafield owner type. + """ + SHOP + + """ + The Validation metafield owner type. + """ + VALIDATION +} + +""" +The resource referenced by the metafield value. +""" +union MetafieldReference @componentName(name: "content") = 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") = 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 @componentName(name: "content") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +Metafield access permissions for the Storefront API. +""" +enum MetafieldStorefrontAccessInput @componentName(name: "content") { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +Possible metafield validation statuses. +""" +enum MetafieldValidationStatus @componentName(name: "content") { + """ + Any validation status (valid or invalid). + """ + ANY + + """ + Invalid (according to definition). + """ + INVALID + + """ + Valid (according to definition). + """ + VALID +} + +""" +Legacy type information for the stored value. +Replaced by `type`. +""" +enum MetafieldValueType @componentName(name: "content") { + """ + A `true` or `false` value. + """ + BOOLEAN + + """ + A number with decimal places. + """ + FLOAT + + """ + A whole number. + """ + INTEGER + + """ + A JSON string. + """ + JSON_STRING + + """ + A text field. + """ + STRING +} + +""" +Return type for `metafieldsDelete` mutation. +""" +type MetafieldsDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + The `compareDigest` value obtained from a previous query. Provide this with + updates to ensure the metafield is modified safely. + """ + compareDigest: 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 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 ID of the resource that the metafield is attached to. + """ + ownerId: ID! @gidTypes(types: ["HasMetafields"]) + + """ + 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 + + """ + The data stored in the metafield. Always stored as a string, regardless of the metafield's type. + """ + value: String! +} + +""" +Return type for `metafieldsSet` mutation. +""" +type MetafieldsSetPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "platform") { + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """ + The input value is blank. + """ + BLANK + + """ + The metafield can't be deleted due to owner. + """ + CANNOT_DELETE_DUE_TO_OWNER + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + 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 + + """ + 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 metafield has been modified since it was loaded. + """ + STALE_OBJECT + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT +} + +""" +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 @requiredAccess(scope: "`read_metaobjects` access scope.") @componentName(name: "content") { + """ + The app used to create the object. + """ + app: App! @deprecated(reason: "Use `createdByApp` instead.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! + + """ + The values of the metaobject. + """ + values: JSON! +} + +""" +Access permissions for the definition's metaobjects. +""" +type MetaobjectAccess @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The access permitted on the Admin API. + """ + admin: MetaobjectAdminAccessInput + + """ + The access permitted on the Customer Account API. + """ + customerAccount: MetaobjectCustomerAccountAccess + + """ + The access permitted on the Storefront API. + """ + storefront: MetaobjectStorefrontAccess +} + +""" +Metaobject access permissions for the Admin API. When the metaobject is app-owned, the owning app always has +full access. +""" +enum MetaobjectAdminAccess @componentName(name: "content") { + """ + 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 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 +} + +""" +Metaobject access permissions for the Admin API. When the metaobject is app-owned, the owning app always has +full access. +""" +enum MetaobjectAdminAccessInput @componentName(name: "content") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + A list of metaobjects IDs to delete. + """ + ids: [ID!] @gidTypes(types: ["Metaobject"]) + + """ + Deletes all metaobjects with the specified `type`. + """ + type: String +} + +""" +Provides the capabilities of a metaobject definition. +""" +type MetaobjectCapabilities @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The renderable capability of a metaobject definition. +""" +type MetaobjectCapabilitiesRenderable @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + Indicates if the capability is enabled. + """ + enabled: Boolean! +} + +""" +The input fields for creating a metaobject capability. +""" +input MetaobjectCapabilityCreateInput @componentName(name: "content") { + """ + The input for enabling the Online Store capability. + """ + onlineStore: MetaobjectCapabilityOnlineStoreInput + + """ + The input for enabling the publishable capability. + """ + publishable: MetaobjectCapabilityPublishableInput + + """ + The input for enabling the renderable capability. + """ + renderable: MetaobjectCapabilityRenderableInput + + """ + The input for enabling the translatable capability. + """ + translatable: MetaobjectCapabilityTranslatableInput +} + +""" +Provides the capabilities of a metaobject. +""" +type MetaobjectCapabilityData @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + Online Store capability input. + """ + onlineStore: MetaobjectCapabilityDataOnlineStoreInput + + """ + Publishable capability input. + """ + publishable: MetaobjectCapabilityDataPublishableInput +} + +""" +The Online Store capability for the parent metaobject. +""" +type MetaobjectCapabilityDataOnlineStore @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The theme template used when viewing the metaobject in a store. + """ + templateSuffix: String +} + +""" +The publishable capability for the parent metaobject. +""" +type MetaobjectCapabilityDataPublishable @componentName(name: "content") { + """ + The visibility status of this metaobject across all channels. + """ + status: MetaobjectStatus! +} + +""" +The input fields for publishable capability to adjust visibility on channels. +""" +input MetaobjectCapabilityDataPublishableInput @componentName(name: "content") { + """ + The visibility status of this metaobject across all channels. + """ + status: MetaobjectStatus! +} + +""" +The Online Store capability data for the metaobject definition. +""" +type MetaobjectCapabilityDefinitionDataOnlineStore @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + Whether to redirect published metaobjects automatically when the URL handle changes. + """ + createRedirects: Boolean = false + + """ + The URL handle for accessing pages of this metaobject type in the Online Store. + """ + urlHandle: String! +} + +""" +The renderable capability data for the metaobject definition. +""" +type MetaobjectCapabilityDefinitionDataRenderable @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 for enabling and disabling the Online Store capability. +""" +input MetaobjectCapabilityOnlineStoreInput @componentName(name: "content") { + """ + The data associated with the Online Store capability. + """ + data: MetaobjectCapabilityDefinitionDataOnlineStoreInput + + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the publishable capability. +""" +input MetaobjectCapabilityPublishableInput @componentName(name: "content") { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the renderable capability. +""" +input MetaobjectCapabilityRenderableInput @componentName(name: "content") { + """ + The data associated with the renderable capability. + """ + data: MetaobjectCapabilityDefinitionDataRenderableInput + + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +The input fields for enabling and disabling the translatable capability. +""" +input MetaobjectCapabilityTranslatableInput @componentName(name: "content") { + """ + Indicates whether the capability should be enabled or disabled. + """ + enabled: Boolean! +} + +""" +Metaobject Capabilities types which can be enabled. +""" +enum MetaobjectCapabilityType @componentName(name: "content") { + """ + Allows for a Metaobject to be rendered as an Online Store page. + """ + ONLINE_STORE + + """ + Allows for a Metaobject to be conditionally publishable. + """ + PUBLISHABLE + + """ + Allows for a Metaobject to have attributes of a renderable page such as SEO. + """ + RENDERABLE + + """ + Allows for a Metaobject to be translated using the translation api. + """ + TRANSLATABLE +} + +""" +The input fields for updating a metaobject capability. +""" +input MetaobjectCapabilityUpdateInput @componentName(name: "content") { + """ + The input for enabling the Online Store capability. + """ + onlineStore: MetaobjectCapabilityOnlineStoreInput + + """ + The input for updating the publishable capability. + """ + publishable: MetaobjectCapabilityPublishableInput + + """ + The input for enabling the renderable capability. + """ + renderable: MetaobjectCapabilityRenderableInput + + """ + The input for updating the translatable capability. + """ + translatable: MetaobjectCapabilityTranslatableInput +} + +""" +An auto-generated type for paginating through multiple Metaobjects. +""" +type MetaobjectConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + Capabilities for the metaobject. + """ + capabilities: MetaobjectCapabilityDataInput + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """ + A unique handle for the metaobject. This value is auto-generated when omitted. + """ + handle: String + + """ + The type of the metaobject. Must match an existing metaobject definition type. + """ + type: String! + + """ + The field values for the metaobject as a JSON object, keyed by field + definition key. Cannot be used in conjunction with `fields`. + """ + values: JSON +} + +""" +Return type for `metaobjectCreate` mutation. +""" +type MetaobjectCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + 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 @requiredAccess(scope: "`read_metaobject_definitions` access scope.") @componentName(name: "content") { + """ + Access configuration for the metaobject definition. + """ + access: MetaobjectAccess! + + """ + The capabilities of the metaobject definition. + """ + capabilities: MetaobjectCapabilities! + + """ + The date and time when the metaobject definition was created. + """ + createdAt: DateTime! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! + + """ + The date and time when the metaobject definition was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple MetaobjectDefinitions. +""" +type MetaobjectDefinitionConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + Access configuration for the metaobjects created with this definition. + """ + access: MetaobjectAccessInput + + """ + The capabilities of the metaobject definition. + """ + capabilities: MetaobjectCapabilityCreateInput + + """ + An administrative description of the definition. + """ + description: String + + """ + The key of a field to reference as the display name for metaobjects of this type. + """ + displayNameKey: String + + """ + A set of field definitions to create on this metaobject definition. + """ + fieldDefinitions: [MetaobjectFieldDefinitionCreateInput!] + + """ + A human-readable name for the definition. This can be changed at any time. + """ + name: 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! +} + +""" +Return type for `metaobjectDefinitionCreate` mutation. +""" +type MetaobjectDefinitionCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + Access configuration for the metaobjects created with this definition. + """ + access: MetaobjectAccessInput + + """ + The capabilities of the metaobject definition. + """ + capabilities: MetaobjectCapabilityUpdateInput + + """ + An administrative description of the definition. + """ + description: String + + """ + The key of a metafield to reference as the display name for objects of this type. + """ + displayNameKey: String + + """ + A set of operations for modifying field definitions. + """ + fieldDefinitions: [MetaobjectFieldDefinitionOperationInput!] + + """ + A human-readable name for the definition. + """ + name: 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 +} + +""" +Return type for `metaobjectDefinitionUpdate` mutation. +""" +type MetaobjectDefinitionUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + ): 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + 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!]! + + """ + Whether this field is visible within the Storefront API. + """ + visibleToStorefrontApi: Boolean! +} + +""" +Capabilities available for a metaobject field definition. +""" +type MetaobjectFieldDefinitionCapabilities @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The input for configuring the admin filterable capability. + """ + adminFilterable: MetaobjectFieldCapabilityAdminFilterableInput +} + +""" +The input fields for creating a metaobject field definition. +""" +input MetaobjectFieldDefinitionCreateInput @componentName(name: "content") { + """ + Capabilities configuration for this field. + """ + capabilities: MetaobjectFieldDefinitionCapabilityCreateInput + + """ + An administrative description of the field. + """ + description: String + + """ + 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! + + """ + A human-readable name for the field. This can be changed at any time. + """ + name: String + + """ + Whether metaobjects require a saved value for the field. + """ + required: Boolean = false + + """ + The metafield type applied to values of the field. + """ + type: String! + + """ + Custom validations that apply to values assigned to the field. + """ + validations: [MetafieldDefinitionValidationInput!] + + """ + Whether the field is visible to the storefront API. + Defaults to the visibility of the parent metaobject definition. + """ + visibleToStorefrontApi: Boolean +} + +""" +The input fields for deleting a metaobject field definition. +""" +input MetaobjectFieldDefinitionDeleteInput @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The input fields for creating a metaobject field definition. + """ + create: MetaobjectFieldDefinitionCreateInput + + """ + The input fields for deleting a metaobject field definition. + """ + delete: MetaobjectFieldDefinitionDeleteInput + + """ + The input fields for updating a metaobject field definition. + """ + update: MetaobjectFieldDefinitionUpdateInput +} + +""" +The input fields for updating a metaobject field definition. +""" +input MetaobjectFieldDefinitionUpdateInput @componentName(name: "content") { + """ + Capabilities configuration for this field. + """ + capabilities: MetaobjectFieldDefinitionCapabilityCreateInput + + """ + An administrative description of the field. + """ + description: String + + """ + The key of the field definition to update. + """ + key: String! + + """ + A human-readable name for the field. + """ + name: String + + """ + Whether metaobjects require a saved value for the field. + """ + required: Boolean + + """ + Custom validations that apply to values assigned to the field. + """ + validations: [MetafieldDefinitionValidationInput!] + + """ + Whether the field is visible to the storefront API. + """ + visibleToStorefrontApi: Boolean +} + +""" +The input fields for a metaobject field value. +""" +input MetaobjectFieldInput @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + The handle of the metaobject to create or update. + """ + handle: String! + + """ + The type of the metaobject. Must match an existing metaobject definition type. + """ + type: String! +} + +""" +Defines visibility status for metaobjects. +""" +enum MetaobjectStatus @componentName(name: "content") { + """ + The metaobjects is active for public use. + """ + ACTIVE + + """ + The metaobjects is an internal record. + """ + DRAFT +} + +""" +Metaobject access permissions for the Storefront API. +""" +enum MetaobjectStorefrontAccess @componentName(name: "content") { + """ + No access. + """ + NONE + + """ + Read-only access. + """ + PUBLIC_READ +} + +""" +Provides attributes for visual representation. +""" +type MetaobjectThumbnail @componentName(name: "content") { + """ + 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 @componentName(name: "content") { + """ + Capabilities for the metaobject. + """ + capabilities: MetaobjectCapabilityDataInput + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """ + A unique handle for the metaobject. + """ + handle: String + + """ + Whether to create a redirect for the metaobject. + """ + redirectNewHandle: Boolean = false + + """ + The field values for the metaobject as a JSON object, keyed by field + definition key. This is a full replacement — omitted keys are cleared on an + existing record. Cannot be used in conjunction with `fields`. + """ + values: JSON +} + +""" +Return type for `metaobjectUpdate` mutation. +""" +type MetaobjectUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + Capabilities for the metaobject. + """ + capabilities: MetaobjectCapabilityDataInput + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """ + The handle of the metaobject. + """ + handle: String +} + +""" +Return type for `metaobjectUpsert` mutation. +""" +type MetaobjectUpsertPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "content") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + The input value is blank. + """ + BLANK + + """ + The capability you are using is not enabled. + """ + CAPABILITY_NOT_ENABLED + + """ + The display name cannot be the same when using the metaobject as a product option. + """ + DISPLAY_NAME_CONFLICT + + """ + Duplicate inputs were provided for this field key. + """ + DUPLICATE_FIELD_INPUT + + """ + Renderable data input is referencing an invalid field. + """ + FIELD_TYPE_INVALID + + """ + The targeted object cannot be modified. + """ + IMMUTABLE + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The maximum number of input metaobjects has been exceeded. + """ + INPUT_LIMIT_EXCEEDED + + """ + An unexpected error occurred. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + The value for the metafield definition option was invalid. + """ + INVALID_OPTION + + """ + The metafield type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or the definition options. + """ + INVALID_VALUE + + """ + 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 input is missing required keys. + """ + MISSING_REQUIRED_KEYS + + """ + Not authorized. + """ + NOT_AUTHORIZED + + """ + Missing required fields were found for this object. + """ + OBJECT_FIELD_REQUIRED + + """ + The specified field key is already in use. + """ + OBJECT_FIELD_TAKEN + + """ + The input value needs to be blank. + """ + PRESENT + + """ + The requested record couldn't be found. + """ + RECORD_NOT_FOUND + + """ + The action cannot be completed because associated metaobjects are referenced by another resource. + """ + REFERENCE_EXISTS_ERROR + + """ + The provided name is reserved for system use. + """ + RESERVED_NAME + + """ + Definition is required by an installed app and cannot be deleted. + """ + STANDARD_METAOBJECT_DEFINITION_DEPENDENT_ON_APP + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + No field definition found for this key. + """ + UNDEFINED_OBJECT_FIELD + + """ + No metaobject definition found for this type. + """ + UNDEFINED_OBJECT_TYPE + + """ + The Online Store URL handle cannot be blank. + """ + URL_HANDLE_BLANK + + """ + The Online Store URL handle is invalid. + """ + URL_HANDLE_INVALID + + """ + The Online Store URL handle is already taken. + """ + URL_HANDLE_TAKEN +} + +""" +The input fields for creating multiple metaobjects. +""" +input MetaobjectsCreateInput @componentName(name: "content") { + """ + An array of inputs used to create metaobjects. + """ + metaobjects: [MetaobjectsCreateMetaobjectInput!]! + + """ + The type of metaobjects to create. Must match an existing metaobject definition type. + """ + type: String! +} + +""" +The input fields for creating a single metaobject. +""" +input MetaobjectsCreateMetaobjectInput @componentName(name: "content") { + """ + Capabilities for the metaobject. + """ + capabilities: MetaobjectCapabilityDataInput + + """ + Values for fields. These are mapped by key to fields of the metaobject definition. + """ + fields: [MetaobjectFieldInput!] + + """ + A unique handle for the metaobject. This value is auto-generated when omitted. + """ + handle: String + + """ + The field values for the metaobject as a JSON object, keyed by field + definition key. Cannot be used in conjunction with `fields`. + """ + values: JSON +} + +""" +Return type for `metaobjectsCreate` mutation. +""" +type MetaobjectsCreatePayload @componentName(name: "platform") { + """ + The created metaobjects. + """ + metaobjects: [Metaobject!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +The set of valid sort keys for the MethodDefinition query. +""" +enum MethodDefinitionSortKeys @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") @componentName(name: "mobile_support") = AndroidApplication | AppleApplication + +""" +An auto-generated type for paginating through multiple MobilePlatformApplications. +""" +type MobilePlatformApplicationConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "mobile_support") { + """ + Whether Android App Links are supported by this app. + """ + appLinksEnabled: Boolean! + + """ + Android application ID. + """ + applicationId: String + + """ + The SHA256 fingerprints of the app’s signing certificate. + """ + sha256CertFingerprints: [String!]! +} + +""" +The input fields for an Apple based mobile platform application. +""" +input MobilePlatformApplicationCreateAppleInput @componentName(name: "mobile_support") { + """ + The Apple app clip application ID. + """ + appClipApplicationId: String + + """ + Whether Apple app clips are enabled for this app. + """ + appClipsEnabled: Boolean + + """ + Apple application ID. + """ + appId: String + + """ + Whether Apple shared web credentials are enabled for this app. + """ + sharedWebCredentialsEnabled: Boolean! + + """ + Whether Apple Universal Links are supported by this app. + """ + universalLinksEnabled: Boolean! +} + +""" +The input fields for a mobile application platform type. +""" +input MobilePlatformApplicationCreateInput @oneOf @componentName(name: "mobile_support") { + """ + Android based mobile platform application. + """ + android: MobilePlatformApplicationCreateAndroidInput + + """ + Apple based mobile platform application. + """ + apple: MobilePlatformApplicationCreateAppleInput +} + +""" +Return type for `mobilePlatformApplicationCreate` mutation. +""" +type MobilePlatformApplicationCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "mobile_support") { + """ + 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 @componentName(name: "mobile_support") { + """ + Whether Android App Links are supported by this app. + """ + appLinksEnabled: Boolean + + """ + Android application ID. + """ + applicationId: String + + """ + The SHA256 fingerprints of the app’s signing certificate. + """ + sha256CertFingerprints: [String!] +} + +""" +The input fields for an Apple based mobile platform application. +""" +input MobilePlatformApplicationUpdateAppleInput @componentName(name: "mobile_support") { + """ + The Apple App Clip application ID. + """ + appClipApplicationId: String + + """ + Whether Apple App Clips are enabled for this app. + """ + appClipsEnabled: Boolean + + """ + Apple application ID. + """ + appId: String + + """ + Whether Apple shared web credentials are enabled for this app. + """ + sharedWebCredentialsEnabled: Boolean + + """ + Whether Apple Universal Links are supported by this app. + """ + universalLinksEnabled: Boolean +} + +""" +The input fields for the mobile platform application platform type. +""" +input MobilePlatformApplicationUpdateInput @oneOf @componentName(name: "mobile_support") { + """ + Android based Mobile Platform Application. + """ + android: MobilePlatformApplicationUpdateAndroidInput + + """ + Apple based Mobile Platform Application. + """ + apple: MobilePlatformApplicationUpdateAppleInput +} + +""" +Return type for `mobilePlatformApplicationUpdate` mutation. +""" +type MobilePlatformApplicationUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "mobile_support") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + 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! + + """ + Status resulting from the latest update operation. See fileErrors for details. + """ + updateStatus: FileStatus + + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope or `read_themes` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + Amount in shop currency. + """ + shopMoney: MoneyInput! +} + +""" +The input fields for a monetary value with currency. +""" +input MoneyInput @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The ID of the object to be moved. + """ + id: ID! @gidTypes(types: ["Product", "ProductImage", "Media"]) + + """ + 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 @componentName(name: "platform") { + """ + Updates the email state value for an abandonment. + """ + abandonmentEmailStateUpdate( + """ + The date and time for when the email was sent, if that is the case. + """ + emailSentAt: DateTime + + """ + The new email state of the abandonment. + """ + emailState: AbandonmentEmailState! + + """ + The reason why the email was or was not sent. + """ + emailStateChangeReason: String + + """ + The ID of the abandonment that needs to be updated. + """ + id: ID! @gidTypes(types: ["Abandonment"]) + ): AbandonmentEmailStateUpdatePayload @deprecated(reason: "Use `abandonmentUpdateActivitiesDeliveryStatuses` instead.") @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + Updates the marketing activities delivery statuses for an abandonment. + """ + abandonmentUpdateActivitiesDeliveryStatuses( + """ + The ID of the abandonment that needs to be updated. + """ + abandonmentId: ID! @gidTypes(types: ["Abandonment"]) + + """ + The delivery timestamp if the activity delivered. + """ + deliveredAt: DateTime + + """ + The new delivery status of the marketing activity for this abandonment. + """ + deliveryStatus: AbandonmentDeliveryState! + + """ + The reason why the activity was or was not delivered. + """ + deliveryStatusChangeReason: String + + """ + The ID of the marketing activity that needs to be updated. + """ + marketingActivityId: ID! @gidTypes(types: ["MarketingActivity"]) + ): AbandonmentUpdateActivitiesDeliveryStatusesPayload @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + Creates an [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget) that + defines a merchant's goal for a specific metric over a date range. For example, a merchant + can set a target of $50,000 in total sales for a quarter, or 1,000 orders in a month. + + Provide the target attributes through the `input` argument. The target's currency is set to + the shop's currency. A target is uniquely identified by the combination of `metric`, `startDate`, + `endDate`, and `filters` — attempting to create a duplicate returns a user error. + + Use [`analyticsTargetUpdate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetUpdate) + to modify an existing target, or + [`analyticsTargetsDelete`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetsDelete) + to remove targets. + """ + analyticsTargetCreate( + """ + The input fields for creating an [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). + """ + input: AnalyticsTargetCreateInput! + ): AnalyticsTargetCreatePayload @requiredAccess(scope: "`write_reports` access scope.") + + """ + Updates an existing [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). + Only the fields provided in the `input` argument are modified; omitted fields remain unchanged. + Setting a nullable field to `null` clears its value. + + Use [`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetCreate) + to create a new target, or + [`analyticsTargetsDelete`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetsDelete) + to remove targets. + """ + analyticsTargetUpdate( + """ + The ID of the analytics target to update. + """ + id: ID! @gidTypes(types: ["AnalyticsTarget"]) + + """ + The input fields for updating an [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). + """ + input: AnalyticsTargetUpdateInput! + ): AnalyticsTargetUpdatePayload @requiredAccess(scope: "`write_reports` access scope.") + + """ + Deletes one or more [analytics targets](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). + Accepts a list of target IDs and returns the IDs that were successfully deleted. If any ID + is not found, a user error is returned for that ID while the remaining valid targets are still deleted. + + Use [`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetCreate) + to create new targets, or + [`analyticsTargetUpdate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetUpdate) + to modify existing ones. + """ + analyticsTargetsDelete( + """ + The IDs of the analytics targets to delete. + """ + ids: [ID!]! @gidTypes(types: ["AnalyticsTarget"]) + ): AnalyticsTargetsDeletePayload @requiredAccess(scope: "`write_reports` access scope.") + + """ + 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 @requiredAccess(scope: "This mutation can only be run on the current app.") + + """ + 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! @gidTypes(types: ["AppSubscription"]) + + """ + Whether to issue prorated credits for the unused portion of the app subscription. There will + be a corresponding deduction (based on revenue share) to your Partner account. + For example, if a $10.00 app subscription (with 0% revenue share) is cancelled and prorated half way + through the billing cycle, then the merchant will be credited $5.00 and that amount will be deducted + from 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( + """ + Attaches one or more pricing plans to an app subscription. Only one pricing plan can be defined for each available type. + """ + lineItems: [AppSubscriptionLineItemInput!]! + + """ + A descriptive name for the app subscription. + """ + name: String! + + """ + The replacement behavior when creating an app subscription for a merchant with an already existing app subscription. + """ + replacementBehavior: AppSubscriptionReplacementBehavior = STANDARD + + """ + The URL pointing to the page where the merchant is redirected after approving the app subscription. + """ + returnUrl: URL! + + """ + 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 + ): 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 new maximum amount of usage charges that can be incurred within a subscription billing interval. + """ + cappedAmount: MoneyInput! + + """ + The ID of the app subscription line item to be updated. + """ + id: ID! @gidTypes(types: ["AppSubscriptionLineItem"]) + ): 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 number of days to extend the trial. The value must be greater than 0 and less than or equal to 1000. + """ + days: Int! + + """ + The ID of the app subscription to extend the trial for. + """ + id: ID! @gidTypes(types: ["AppSubscription"]) + ): AppSubscriptionTrialExtendPayload @requiredAccess(scope: "This must be a third party developed application that you can access.") + + """ + 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 @requiredAccess(scope: "This mutation can only be used by apps to uninstall themselves.") + + """ + 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 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 + + """ + The price of the app usage record. + """ + price: MoneyInput! + + """ + 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! @gidTypes(types: ["AppSubscriptionLineItem"]) + ): 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 @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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! @gidTypes(types: ["Article"]) + ): ArticleDeletePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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 properties of the article to be updated. + """ + article: ArticleUpdateInput! + + """ + The properties of the blog to be created. + """ + blog: ArticleBlogInput + + """ + The ID of the article to be updated. + """ + id: ID! @gidTypes(types: ["Article"]) + ): ArticleUpdatePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + 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 @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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! @gidTypes(types: ["Blog"]) + ): BlogDeletePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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 properties of the blog to be updated. + """ + blog: BlogUpdateInput! + + """ + The ID of the blog to be updated. + """ + id: ID! @gidTypes(types: ["Blog"]) + ): BlogUpdatePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + Creates resource feedback for multiple discounts. + """ + bulkDiscountResourceFeedbackCreate( + """ + An array of inputs to create the feedback. Limited to 50. + """ + feedbackInput: [DiscountResourceFeedbackInput!]! + ): BulkDiscountResourceFeedbackCreatePayload @requiredAccess(scope: "`write_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") + + """ + 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! @gidTypes(types: ["BulkOperation"]) + ): 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. + You can run one bulk mutation operation at a time per shop, though a [`bulkOperationRunQuery`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/bulkoperationrunquery) + operation can run simultaneously. + + Learn more about [bulk importing data](https://shopify.dev/docs/api/usage/bulk-operations/imports). + """ + bulkOperationRunMutation( + """ + An optional identifier which may be used for querying. + """ + clientIdentifier: 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.") + + """ + The mutation to be executed in bulk. + """ + mutation: String! + + """ + The staged upload path of the file containing mutation variables. + """ + stagedUploadPath: String! + ): BulkOperationRunMutationPayload @requiredAccess(scope: "Only accessible by supported access tokens: https:\/\/shopify.dev\/docs\/api\/usage\/bulk-operations\/queries#access-token-considerations.") + + """ + 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. + + Apps can run one bulk query operation and one bulk mutation operation at a + time per shop. 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( + """ + 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 + + """ + The query to be executed in bulk. + """ + query: String! + ): BulkOperationRunQueryPayload @requiredAccess(scope: "Only accessible by supported access tokens: https:\/\/shopify.dev\/docs\/api\/usage\/bulk-operations\/queries#access-token-considerations.") + + """ + Creates product feedback for multiple products. + """ + bulkProductResourceFeedbackCreate( + """ + An array of inputs to create the feedback. Limited to 50. + """ + feedbackInput: [ProductResourceFeedbackInput!]! + ): BulkProductResourceFeedbackCreatePayload @requiredAccess(scope: "`write_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") + + """ + 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 @requiredAccess(scope: "`write_shipping` access scope.") + + """ + Removes an existing carrier service. + """ + carrierServiceDelete( + """ + The global ID of the carrier service to delete. + """ + id: ID! @gidTypes(types: ["CarrierService"]) + ): CarrierServiceDeletePayload @requiredAccess(scope: "`write_shipping` access scope.") + + """ + 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 @requiredAccess(scope: "`write_shipping` access scope.") + + """ + 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( + """ + Whether a run failure should block cart and checkout operations. + """ + blockOnFailure: Boolean = false + + """ + The handle of the Function providing the cart transform. + """ + functionHandle: String + + """ + The identifier of the Function providing the cart transform. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + Additional metafields to associate to the cart transform. + """ + metafields: [MetafieldInput!] = [] + ): CartTransformCreatePayload @requiredAccess(scope: "`write_cart_transforms` access scope. Also: The shop must have\n[upgraded to Checkout Extensibility](https:\/\/help.shopify.com\/manual\/checkout-settings\/checkout-extensibility\/checkout-upgrade)\nand the user must have\n[products and preferences permission](https:\/\/help.shopify.com\/manual\/your-account\/staff-accounts\/staff-permissions)\nto create a cart transform function.\n") + + """ + 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! @gidTypes(types: ["CartTransform"]) + ): CartTransformDeletePayload @requiredAccess(scope: "`write_cart_transforms` access scope. Also: The user must have products and preferences permission to delete a cart transform function.") + + """ + Creates a cash drawer in a provided location. + """ + cashDrawerCreate( + """ + The location the cash drawer is located in. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + The name of the cash drawer. + """ + name: String! + ): CashDrawerCreatePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + Finds or creates a cash drawer for cash management. Also ensures the provided device is assigned to the drawer. + """ + cashDrawerFindOrCreate( + """ + The location the cash drawer is located in. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + The name of the cash drawer. + """ + name: String! + + """ + The point of sale device to assign to the cash drawer. + """ + pointOfSaleDeviceId: ID! @gidTypes(types: ["PointOfSaleDevice"]) + ): CashDrawerFindOrCreatePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + Updates a cash drawer. + """ + cashDrawerUpdate( + """ + The ID of the cash drawer to update. + """ + id: ID! @gidTypes(types: ["CashDrawer"]) + + """ + The input fields for updating a cash drawer. + """ + input: CashDrawerUpdateInput! + ): CashDrawerUpdatePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + Create a cash management reason code. + """ + cashManagementReasonCodeCreate( + """ + The reason code to create. + """ + code: String! + ): CashManagementReasonCodeCreatePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + Deletes a cash management reason code. + """ + cashManagementReasonCodeDelete( + """ + The reason code id to delete. + """ + id: ID! @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) + ): CashManagementReasonCodeDeletePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + 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! @gidTypes(types: ["Catalog"]) + + """ + The contexts to add to the catalog. + """ + contextsToAdd: CatalogContextInput + + """ + The contexts to remove from the catalog. + """ + contextsToRemove: CatalogContextInput + ): CatalogContextUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") + + """ + 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 @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") + + """ + Delete a catalog. + """ + catalogDelete( + """ + Whether to also delete the price list and the publication owned by the catalog. + """ + deleteDependentResources: Boolean = false + + """ + The ID of the catalog to delete. + """ + id: ID! @gidTypes(types: ["Catalog"]) + ): CatalogDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to delete catalogs.") + + """ + 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! @gidTypes(types: ["Catalog"]) + + """ + The properties of the updated catalog. + """ + input: CatalogUpdateInput! + ): CatalogUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") + + """ + Creates a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) + representing a connection between the shop and an external selling platform + account. Use this mutation after a merchant authenticates with an external + platform to establish the publishing destination for product syndication and, + for order-generating channels, order import. + + The platform resolves the [channel specification](https://shopify.dev/docs/apps/build/sales-channels/channel-config-extension) + identified by `specificationHandle`, determines its country coverage, + intersects with the shop's available region markets, and establishes product + feeds for all matching regions. Product feeds immediately begin emitting + events to the application's webhook or event subscription. + + If the specification sets `expects_online_store_parity` and no matching region + markets exist, the mutation returns an error. If the specification doesn't + require online store parity and no matching region markets exist, a channel + subordinate to shop defaults is created automatically. + """ + channelCreate( + """ + The input fields for creating the channel. + """ + input: ChannelCreateInput! + ): ChannelCreatePayload + + """ + Deletes a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) + from the shop. All associated product feeds are removed. Existing orders + attributed to the channel are preserved. The channel must have been created via [`channelCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelCreate). + """ + channelDelete( + """ + The ID of the channel to delete. + """ + id: ID! @gidTypes(types: ["Channel", "Publication"]) + ): ChannelDeletePayload + + """ + Triggers a full product resync for the specified [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + All published products are added to the channel's product feed attention set, + causing the next poll or event-triggered consumption to receive current state + for the complete catalog. Use this mutation after initial channel setup, after + recovering from a prolonged outage, or when the channel's external catalog has + drifted from Shopify's state. + + The sync can be scoped to a specific country and language. When neither is + specified, all country-language combinations covered by the channel's + specification are triggered. + """ + channelFullSync( + """ + Syncs only products that haven't changed since the specified timestamp. + """ + beforeUpdatedAt: DateTime + + """ + The ID of the channel to trigger a full sync for. Accepts a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) or [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) global ID. + """ + channelId: ID! @gidTypes(types: ["Channel", "Publication"]) + + """ + The country to scope the sync to. When omitted, all countries covered by the channel's specification are synced. + """ + country: CountryCode + + """ + The language to scope the sync to. When omitted, all languages for the targeted countries are synced. + """ + language: LanguageCode + + """ + Syncs only products that have changed since the specified timestamp. + """ + updatedAtSince: DateTime + ): ChannelFullSyncPayload @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") + + """ + Updates the properties of an existing [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). + Use this mutation to update account information — such as the display name + shown in Shopify Admin — or to bind the channel to a different channel specification. + + Updating the `specificationHandle` triggers re-evaluation of the + specification's country coverage against the shop's region markets, + reconciling product feeds accordingly. This is also the mechanism for + migrating legacy channel records to the multi-channel model by assigning a + specification handle. + """ + channelUpdate( + """ + The ID of the [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) to update. + """ + id: ID! @gidTypes(types: ["Channel", "Publication"]) + + """ + The input fields for updating the channel. + """ + input: ChannelUpdateInput! + ): ChannelUpdatePayload + + """ + Updates a checkout and accounts configuration. + """ + checkoutAndAccountsConfigurationUpdate( + """ + The intended changes to the configuration. + """ + configuration: CheckoutAndAccountsConfigurationInput! + + """ + The ID of the configuration to update. + """ + id: ID! @gidTypes(types: ["Configuration"]) + ): CheckoutAndAccountsConfigurationUpdatePayload @requiredAccess(scope: "`write_checkout_and_accounts_configurations` access scope or `write_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") + + """ + 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( + """ + The input fields to use to upsert the checkout branding settings (pass null to reset them to default). + """ + checkoutBrandingInput: CheckoutBrandingInput + + """ + A globally-unique identifier. + """ + checkoutProfileId: ID! @gidTypes(types: ["CheckoutProfile"]) + ): CheckoutBrandingUpsertPayload @deprecated(reason: "Use `checkoutAndAccountsConfigurationUpdate` instead.") @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan. User must have `preferences` permission to modify.") + + """ + 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. + + This operation only works with manual collections where merchants explicitly + choose which products to include. It will return an error if used with smart + collections that automatically include products based on conditions. + + 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. This can't be a smart collection. + """ + id: ID! @gidTypes(types: ["Collection"]) + + """ + The IDs of the products that are being added to the collection. + If any of the products is already present in the input collection, + then an error is raised and no products are added. + """ + productIds: [ID!]! @gidTypes(types: ["Product"]) + ): CollectionAddProductsPayload @requiredAccess(scope: "`write_products` access scope. Also: The store must not be on the Starter or Retail plans and user must have a permission to add products to a collection.") + + """ + 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! @gidTypes(types: ["Collection"]) + + """ + 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!]! @gidTypes(types: ["Product"]) + ): CollectionAddProductsV2Payload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to add products to a collection.") + + """ + 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. + + There are two types of collections: + + - **[Custom (manual) collections](https://help.shopify.com/manual/products/collections/manual-shopify-collection)**: + You specify the products to include in a collection. + - **[Smart (automated) collections](https://help.shopify.com/manual/products/collections/automated-collections)**: + You define rules, and products matching those rules are automatically + included in the collection. + + 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 rules (for example, by tag, type, or price) + + > 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 smart collections](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). + """ + collectionCreate( + """ + The properties to use when creating the collection. + """ + input: CollectionInput! + ): CollectionCreatePayload @requiredAccess(scope: "`write_products` access scope. Also: The app must have access to the input fields used to create the collection. Further, the store must not be on the Starter or Retail plans and user must have a permission to create collection.") + + """ + 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 @requiredAccess(scope: "`write_products` access scope. Also: The store must not be on the Starter or Retail plans and user must have a permission to delete collection.") + + """ + 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 @requiredAccess(scope: "`write_products` access scope. Also: The store must not be on the Starter or Retail plans and user must have permission to create collections. If also copying publications, user must have permission to manage publications.") + + """ + 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.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to publish a collection.") + + """ + Removes multiple 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 manual collection. + """ + id: ID! @gidTypes(types: ["Collection"]) + + """ + 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!]! @gidTypes(types: ["Product"]) + ): CollectionRemoveProductsPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to remove products from a collection.") + + """ + 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! @gidTypes(types: ["Collection"]) + + """ + A list of moves to perform, evaluated in order. Provide only products whose + positions changed; do not send the full list. + `newPosition` is a zero-based index evaluated at the time each move is applied (after any prior moves). + `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. + Up to 250 moves are supported. + """ + moves: [MoveInput!]! + ): CollectionReorderProductsPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to reorder products within a collection.") + + """ + 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.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to unpublish a collection.") + + """ + 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 (using rule updates for smart collections) + - Publishing or unpublishing collections across different sales channels + - Updating custom data using [metafields](https://shopify.dev/docs/apps/build/custom-data/metafields) + + There are two types of collections with different update capabilities: + + - **[Custom (manual) collections](https://help.shopify.com/manual/products/collections/manual-shopify-collection)**: + You can update collection properties, but rule sets can't be modified since + products are manually selected. + - **[Smart (automated) collections](https://help.shopify.com/manual/products/collections/automated-collections)**: + You can update both collection properties and the rules that automatically + determine which products are included. + When updating [rule sets](https://shopify.dev/docs/api/admin-graphql/latest/objects/CollectionRuleConditions) + for smart collections, 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 smart collections](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). + """ + collectionUpdate( + """ + The updated properties for the collection. + """ + input: CollectionInput! + ): CollectionUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The app must have access to the input fields used to update the collection. Further, the store must not be on the Starter or Retail plans and user must have a permission to update collection.") + + """ + 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 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!] + + """ + The ID of the parent product. + """ + parentProductId: ID! + + """ + 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!] @gidTypes(types: ["Product"]) + + """ + The updated title for the combined listing. + """ + title: String + ): CombinedListingUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to manage products.") + + """ + 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! @gidTypes(types: ["Comment"]) + ): CommentApprovePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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! @gidTypes(types: ["Comment"]) + ): CommentDeletePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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! @gidTypes(types: ["Comment"]) + ): CommentNotSpamPayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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! @gidTypes(types: ["Comment"]) + ): CommentSpamPayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + Deletes a list of companies. + """ + companiesDelete( + """ + A list of IDs of companies to delete. + """ + companyIds: [ID!]! @gidTypes(types: ["Company"]) + ): CompaniesDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Deletes a company address. + """ + companyAddressDelete( + """ + The ID of the address to delete. + """ + addressId: ID! @gidTypes(types: ["CompanyAddress"]) + ): CompanyAddressDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + 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! @gidTypes(types: ["Company"]) + + """ + The ID of the customer to assign as the contact. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + ): CompanyAssignCustomerAsContactPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Assigns the main contact for the company. + """ + companyAssignMainContact( + """ + The ID of the company contact to be assigned as the main contact. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + + """ + The ID of the company to assign the main contact to. + """ + companyId: ID! @gidTypes(types: ["Company"]) + ): CompanyAssignMainContactPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Assigns a role to a contact for a location. + """ + companyContactAssignRole( + """ + The ID of the contact to assign a role to. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + + """ + The ID of the role to assign to a contact. + """ + companyContactRoleId: ID! @gidTypes(types: ["CompanyContactRole"]) + + """ + The ID of the location to assign a role to a contact. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) + ): CompanyContactAssignRolePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Assigns roles on a company contact. + """ + companyContactAssignRoles( + """ + The contact whose roles are being assigned. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + + """ + The new roles to assign. + """ + rolesToAssign: [CompanyContactRoleAssign!]! + ): CompanyContactAssignRolesPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Creates a company contact and the associated customer. + """ + companyContactCreate( + """ + The ID of the company that the company contact belongs to. + """ + companyId: ID! @gidTypes(types: ["Company"]) + + """ + The fields to use to create the company contact. + """ + input: CompanyContactInput! + ): CompanyContactCreatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Deletes a company contact. + """ + companyContactDelete( + """ + The ID of the company contact to delete. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + ): CompanyContactDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Removes a company contact from a Company. + """ + companyContactRemoveFromCompany( + """ + The ID of the company contact to remove from the Company. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + ): CompanyContactRemoveFromCompanyPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Revokes a role on a company contact. + """ + companyContactRevokeRole( + """ + The ID of the contact to revoke a role from. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + + """ + The ID of the role assignment to revoke from a contact. + """ + companyContactRoleAssignmentId: ID! @gidTypes(types: ["CompanyContactRoleAssignment"]) + ): CompanyContactRevokeRolePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Revokes roles on a company contact. + """ + companyContactRevokeRoles( + """ + The contact whose roles are being revoked. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + + """ + Flag to revoke all roles on the contact. + """ + revokeAll: Boolean = false + + """ + The current role assignment IDs to revoke. + """ + roleAssignmentIds: [ID!] @gidTypes(types: ["CompanyContactRoleAssignment"]) + ): CompanyContactRevokeRolesPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Sends the company contact a welcome email. + """ + companyContactSendWelcomeEmail( + """ + The ID of the company contact to send welcome email to. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + + """ + The welcome email fields. + """ + email: EmailInput + ): CompanyContactSendWelcomeEmailPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @privatelyDocumented + + """ + Updates a company contact. + """ + companyContactUpdate( + """ + The ID of the company contact to be updated. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + + """ + The fields to use to update the company contact. + """ + input: CompanyContactInput! + ): CompanyContactUpdatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Deletes one or more company contacts. + """ + companyContactsDelete( + """ + The list of IDs of the company contacts to delete. + """ + companyContactIds: [ID!]! @gidTypes(types: ["CompanyContact"]) + ): CompanyContactsDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + 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 @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Deletes a company. + """ + companyDelete( + """ + The ID of the company to delete. + """ + id: ID! @gidTypes(types: ["Company"]) + ): CompanyDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Updates an address on a company location. + """ + companyLocationAssignAddress( + """ + The input fields to use to update the address. + """ + address: CompanyAddressInput! + + """ + The list of address types on the location to update. + """ + addressTypes: [CompanyAddressType!]! + + """ + The ID of the company location to update addresses on. + """ + locationId: ID! @gidTypes(types: ["CompanyLocation"]) + ): CompanyLocationAssignAddressPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Assigns roles on a company location. + """ + companyLocationAssignRoles( + """ + The location whose roles are being assigned. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) + + """ + The roles to assign. + """ + rolesToAssign: [CompanyLocationRoleAssign!]! + ): CompanyLocationAssignRolesPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + 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! @gidTypes(types: ["CompanyLocation"]) + + """ + The list of IDs of the staff members to assign. + """ + staffMemberIds: [ID!]! @gidTypes(types: ["StaffMember"]) + ): CompanyLocationAssignStaffMembersPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Assigns tax exemptions to the company location. + """ + companyLocationAssignTaxExemptions( + """ + The location to which the tax exemptions will be assigned. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) + + """ + The tax exemptions that are being assigned to the location. + """ + taxExemptions: [TaxExemption!]! + ): CompanyLocationAssignTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + 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! @gidTypes(types: ["Company"]) + + """ + The fields to use to create the company location. + """ + input: CompanyLocationInput! + ): CompanyLocationCreatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Creates a tax registration for a company location. + """ + companyLocationCreateTaxRegistration( + """ + The ID of the company location that the tax registration gets assigned to. + """ + locationId: ID! @gidTypes(types: ["CompanyLocation"]) + + """ + The unique tax id for the tax registration. + """ + taxId: String! + ): CompanyLocationCreateTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Deletes a company location. + """ + companyLocationDelete( + """ + The ID of the company location to delete. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) + ): CompanyLocationDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + 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!]! @gidTypes(types: ["CompanyLocationStaffMemberAssignment"]) + ): CompanyLocationRemoveStaffMembersPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Revokes roles on a company location. + """ + companyLocationRevokeRoles( + """ + The location whose roles are being revoked. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) + + """ + The current roles to revoke. + """ + rolesToRevoke: [ID!]! @gidTypes(types: ["CompanyContactRoleAssignment"]) + ): CompanyLocationRevokeRolesPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Revokes tax exemptions from the company location. + """ + companyLocationRevokeTaxExemptions( + """ + The location from which the tax exemptions will be revoked. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) + + """ + The tax exemptions that are being revoked from the location. + """ + taxExemptions: [TaxExemption!]! + ): CompanyLocationRevokeTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Revokes tax registration on a company location. + """ + companyLocationRevokeTaxRegistration( + """ + The location whose tax registration is being revoked. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) + ): CompanyLocationRevokeTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Sets the tax settings for a company location. + """ + companyLocationTaxSettingsUpdate( + """ + The ID of the company location that the tax settings get assigned to. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) + + """ + 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!] + + """ + Whether the location is exempt from taxes. + """ + taxExempt: Boolean + + """ + The unique tax registration ID for the company location. + """ + taxRegistrationId: String + ): CompanyLocationTaxSettingsUpdatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + 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! @gidTypes(types: ["CompanyLocation"]) + + """ + The input fields to update in the company location. + """ + input: CompanyLocationUpdateInput! + ): CompanyLocationUpdatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Deletes a list of company locations. + """ + companyLocationsDelete( + """ + A list of IDs of company locations to delete. + """ + companyLocationIds: [ID!]! @gidTypes(types: ["CompanyLocation"]) + ): CompanyLocationsDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Revokes the main contact from the company. + """ + companyRevokeMainContact( + """ + The ID of the company to revoke the main contact from. + """ + companyId: ID! @gidTypes(types: ["Company"]) + ): CompanyRevokeMainContactPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + 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! @gidTypes(types: ["Company"]) + + """ + The input fields to update the company. + """ + input: CompanyInput! + ): CompanyUpdatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + 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 @requiredAccess(scope: "`write_privacy_settings` access scope.") + + """ + Add tax exemptions for the customer. + """ + customerAddTaxExemptions( + """ + The ID of the customer to update. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + 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 @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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( + """ + Specifies the fields to use when creating the address. + """ + address: MailingAddressInput! + + """ + The ID of the customer. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + Whether to set the address as the customer's default address. + """ + setAsDefault: Boolean + ): CustomerAddressCreatePayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + Deletes a customer's address. + """ + customerAddressDelete( + """ + The ID of the address to be deleted from the customer. + """ + addressId: ID! @gidTypes(types: ["MailingAddress"]) + + """ + The ID of the customer whose address is being deleted. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + ): CustomerAddressDeletePayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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( + """ + Specifies the fields to use when updating the address. + """ + address: MailingAddressInput! + + """ + The ID of the address to update. + """ + addressId: ID! @gidTypes(types: ["MailingAddress"]) + + """ + The ID of the customer whose address is being updated. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + Whether to set the address as the customer's default address. + """ + setAsDefault: Boolean + ): CustomerAddressUpdatePayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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! @gidTypes(types: ["Customer"]) + ): CustomerCancelDataErasurePayload @requiredAccess(scope: "`write_customer_data_erasure` access scope. Also: The user must have access to erase customer data.") + + """ + 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 @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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 @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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 @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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! @gidTypes(types: ["Customer"]) + ): CustomerGenerateAccountActivationUrlPayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + Merges two customers. + """ + customerMerge( + """ + The ID of the first customer that will be merged. + """ + customerOneId: ID! @gidTypes(types: ["Customer"]) + + """ + The ID of the second customer that will be merged. + """ + customerTwoId: ID! @gidTypes(types: ["Customer"]) + + """ + The fields to override the default customer merge rules. + """ + overrideFields: CustomerMergeOverrideFields + ): CustomerMergePayload @requiredAccess(scope: "`write_customer_merge` access scope.") + + """ + 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 billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + The encrypted payment method data. + """ + encryptedDuplicationData: String! + ): CustomerPaymentMethodCreateFromDuplicationDataPayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_vaulted_payment_method_duplication` scope.") @privatelyDocumented + + """ + 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 billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + 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 @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") + + """ + 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 billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer payment method. + """ + id: ID! @gidTypes(types: ["CustomerPaymentMethod"]) + + """ + The Cardserver session ID. + """ + sessionId: String! + ): CustomerPaymentMethodCreditCardUpdatePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") + + """ + 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! @gidTypes(types: ["CustomerPaymentMethod"]) + + """ + The customer the payment method will be duplicated into. + """ + targetCustomerId: ID! @gidTypes(types: ["Customer"]) + + """ + The shop the payment method will be duplicated into. + """ + targetShopId: ID! @gidTypes(types: ["Shop"]) + ): CustomerPaymentMethodGetDuplicationDataPayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_vaulted_payment_method_duplication` scope.") @privatelyDocumented + + """ + 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! @gidTypes(types: ["CustomerPaymentMethod"]) + ): CustomerPaymentMethodGetUpdateUrlPayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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 billing address. + """ + billingAddress: MailingAddressInput + + """ + The billing agreement ID from PayPal that starts with 'B-' (for example, `B-1234XXXXX`). + """ + billingAgreementId: String! + + """ + The ID of the customer. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + Whether the PayPal billing agreement is inactive. + """ + inactive: Boolean = false + ): CustomerPaymentMethodPaypalBillingAgreementCreatePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") + + """ + 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 billing address. + """ + billingAddress: MailingAddressInput! + + """ + The ID of the customer payment method. + """ + id: ID! @gidTypes(types: ["CustomerPaymentMethod"]) + ): CustomerPaymentMethodPaypalBillingAgreementUpdatePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") + + """ + 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! @gidTypes(types: ["Customer"]) + + """ + Disables the requirement for a billing address on the remote payment method. + """ + disableAddressValidation: Boolean = false + + """ + Remote gateway payment method details. + """ + remoteReference: CustomerPaymentMethodRemoteInput! + ): CustomerPaymentMethodRemoteCreatePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") + + """ + 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! @gidTypes(types: ["CustomerPaymentMethod"]) + ): CustomerPaymentMethodRevokePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") + + """ + 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! @gidTypes(types: ["CustomerPaymentMethod"]) + + """ + Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input. + """ + email: EmailInput + ): CustomerPaymentMethodSendUpdateEmailPayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + Remove tax exemptions from a customer. + """ + customerRemoveTaxExemptions( + """ + The ID of the customer to update. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + 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 @requiredAccess(scope: "`write_customers` access scope.") + + """ + Replace tax exemptions for a customer. + """ + customerReplaceTaxExemptions( + """ + The ID of the customer to update. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + The list of tax exemptions that will replace the current exemptions for a + customer. Can be 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!]! + ): CustomerReplaceTaxExemptionsPayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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! @gidTypes(types: ["Customer"]) + ): CustomerRequestDataErasurePayload @requiredAccess(scope: "`write_customer_data_erasure` access scope. Also: The user must have access to erase customer data.") + + """ + Creates a customer segment members query. + """ + customerSegmentMembersQueryCreate( + """ + The input fields to create a customer segment members query. + """ + input: CustomerSegmentMembersQueryInput! + ): CustomerSegmentMembersQueryCreatePayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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! @gidTypes(types: ["Customer"]) + + """ + Specifies the account invite email fields. + """ + email: EmailInput + ): CustomerSendAccountInviteEmailPayload @requiredAccess(scope: "`write_customers` access scope. Also: The user must have permission to create and edit customers.") + + """ + 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( + """ + Specifies the identifier that will be used to lookup the resource. + """ + identifier: CustomerSetIdentifiers + + """ + The properties of the customer. + """ + input: CustomerSetInput! + ): CustomerSetPayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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 @requiredAccess(scope: "`write_customers` access scope.") + + """ + 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 @requiredAccess(scope: "`write_customers` access scope.") + + """ + Updates a customer's default address. + """ + customerUpdateDefaultAddress( + """ + The ID of the customer's new default address. + """ + addressId: ID! @gidTypes(types: ["MailingAddress"]) + + """ + The ID of the customer whose default address is being updated. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + ): CustomerUpdateDefaultAddressPayload @requiredAccess(scope: "`write_customers` access scope.") + + """ + Opt out a customer from data sale. + """ + dataSaleOptOut( + """ + The email address of the customer to opt out of data sale. + """ + email: String! + ): DataSaleOptOutPayload @requiredAccess(scope: "`write_privacy_settings` access scope.") + + """ + 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 enabled status of the delivery customizations. + """ + enabled: Boolean! + + """ + The global IDs of the delivery customizations. + """ + ids: [ID!]! @gidTypes(types: ["DeliveryCustomization"]) + ): DeliveryCustomizationActivationPayload @requiredAccess(scope: "`write_delivery_customizations` access scope.") + + """ + Creates a delivery customization. + """ + deliveryCustomizationCreate( + """ + The input data used to create the delivery customization. + """ + deliveryCustomization: DeliveryCustomizationInput! + ): DeliveryCustomizationCreatePayload @requiredAccess(scope: "`write_delivery_customizations` access scope.") + + """ + Creates a delivery customization. + """ + deliveryCustomizationDelete( + """ + The global ID of the delivery customization. + """ + id: ID! @gidTypes(types: ["DeliveryCustomization"]) + ): DeliveryCustomizationDeletePayload @requiredAccess(scope: "`write_delivery_customizations` access scope.") + + """ + Updates a delivery customization. + """ + deliveryCustomizationUpdate( + """ + The input data used to update the delivery customization. + """ + deliveryCustomization: DeliveryCustomizationInput! + + """ + The global ID of the delivery customization. + """ + id: ID! @gidTypes(types: ["DeliveryCustomization"]) + ): DeliveryCustomizationUpdatePayload @requiredAccess(scope: "`write_delivery_customizations` access scope.") + + """ + 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 @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") + + """ + Enqueue the removal of a delivery profile. + """ + deliveryProfileRemove( + """ + The ID of the delivery profile to remove. + """ + id: ID! @gidTypes(types: ["Profile"]) + ): DeliveryProfileRemovePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") + + """ + 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! @gidTypes(types: ["Profile"]) + + """ + Specifies the input fields for a delivery profile. + """ + profile: DeliveryProfileInput! + ): DeliveryProfileUpdatePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") + + """ + 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!] = [] @gidTypes(types: ["ProductVariant"]) + + """ + The owners to remove from the delivery promise participants. + """ + ownersToRemove: [ID!] = [] @gidTypes(types: ["ProductVariant"]) + ): DeliveryPromiseParticipantsUpdatePayload @requiredAccess(scope: "`write_delivery_promises` access scope.") + + """ + 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 ID of the location that will be associated with the delivery promise provider. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + 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 + ): DeliveryPromiseProviderUpsertPayload @requiredAccess(scope: "`write_delivery_promises` access scope.") + + """ + Set the delivery settings for a shop. + """ + deliverySettingUpdate: 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! @gidTypes(types: ["Location"]) + ): DeliveryShippingOriginAssignPayload @deprecated(reason: "Single origin shipping mode is no longer supported.") @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") + + """ + Activates an automatic discount. + """ + discountAutomaticActivate( + """ + The ID of the automatic discount to activate. + """ + id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) + ): DiscountAutomaticActivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 @requiredAccess(scope: "`write_discounts` access scope.") + + """ + 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 input fields required to update the automatic discount. + """ + automaticAppDiscount: DiscountAutomaticAppInput! + + """ + The ID of the automatic discount to update. + """ + id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) + ): DiscountAutomaticAppUpdatePayload @requiredAccess(scope: "`write_discounts` access scope.") + + """ + 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 input data used to update the automatic amount off discount. + """ + automaticBasicDiscount: DiscountAutomaticBasicInput! + + """ + The ID of the automatic amount off discount to update. + """ + id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) + ): DiscountAutomaticBasicUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 IDs of the automatic discounts to delete. + """ + ids: [ID!] @gidTypes(types: ["DiscountAutomaticNode"]) + + """ + The ID of the saved search to use for filtering automatic discounts to delete. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + The search query for filtering automatic discounts to delete. + + For 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 + ): DiscountAutomaticBulkDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 input data used to update the automatic BXGY discount. + """ + automaticBxgyDiscount: DiscountAutomaticBxgyInput! + + """ + The ID of the automatic BXGY discount to update. + """ + id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) + ): DiscountAutomaticBxgyUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + Deactivates an automatic discount. + """ + discountAutomaticDeactivate( + """ + The ID of the automatic discount to deactivate. + """ + id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) + ): DiscountAutomaticDeactivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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! @gidTypes(types: ["DiscountAutomaticNode"]) + ): DiscountAutomaticDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 input data used to update the automatic free shipping discount. + """ + freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput! + + """ + The ID of the automatic free shipping discount to update. + """ + id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) + ): DiscountAutomaticFreeShippingUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + Adds tags to multiple + [discounts](https://help.shopify.com/manual/discounts/discount-types) + asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount IDs + + For example, you can add tags to price rules that match a search criteria, or add tags to a predefined set of price rules. + """ + discountBulkTagsAdd( + """ + The IDs of the discounts to tag. + """ + ids: [ID!] @gidTypes(types: ["DiscountNode"]) + + """ + The ID of the saved search for filtering discounts to tag. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + The search query for filtering discounts. +

+ For more information on the list of supported fields and search syntax, refer to the [`discountNodes`](https://shopify.dev/docs/api/admin-graphql/latest/queries/discountNodes#query-arguments) query. + """ + search: String + + """ + The tags to add to the discounts. + """ + tags: [String!]! + ): DiscountBulkTagsAddPayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + Removes tags from multiple + [discounts](https://help.shopify.com/manual/discounts/discount-types) + asynchronously using one of the following: + - A search query + - A saved search ID + - A list of discount IDs + + For example, you can delete tags from price rules that match a search + criteria, or delete tags from a predefined set of price rules. + """ + discountBulkTagsRemove( + """ + The IDs of the discounts to untag. + """ + ids: [ID!] @gidTypes(types: ["DiscountNode"]) + + """ + The ID of the saved search for filtering discounts to remove tags from. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + The search query for filtering discounts. +

+ For more information on the list of supported fields and search syntax, refer to the [`discountNodes`](https://shopify.dev/docs/api/admin-graphql/latest/queries/discountNodes#query-arguments) query. + """ + search: String + + """ + The tags to remove from the discounts. + """ + tags: [String!]! + ): DiscountBulkTagsRemovePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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! @gidTypes(types: ["DiscountCodeNode"]) + ): DiscountCodeActivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 @requiredAccess(scope: "`write_discounts` access scope.") + + """ + 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 input fields required to update the discount. + """ + codeAppDiscount: DiscountCodeAppInput! + + """ + The ID of the discount to update. + """ + id: ID! @gidTypes(types: ["DiscountCodeNode"]) + ): DiscountCodeAppUpdatePayload @requiredAccess(scope: "`write_discounts` access scope.") + + """ + 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 input data used to update the discount code. + """ + basicCodeDiscount: DiscountCodeBasicInput! + + """ + The ID of the discount code to update. + """ + id: ID! @gidTypes(types: ["DiscountCodeNode"]) + ): DiscountCodeBasicUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 IDs of the discounts to activate. + """ + ids: [ID!] @gidTypes(types: ["DiscountCodeNode"]) + + """ + 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 @gidTypes(types: ["SavedSearch"]) + + """ + The search query for filtering discounts. +

+ For 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 + ): DiscountCodeBulkActivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 IDs of the discounts to deactivate. + """ + ids: [ID!] @gidTypes(types: ["DiscountCodeNode"]) + + """ + 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 @gidTypes(types: ["SavedSearch"]) + + """ + The search query for filtering discounts. +

+ For 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 + ): DiscountCodeBulkDeactivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 IDs of the discounts to delete. + """ + ids: [ID!] @gidTypes(types: ["DiscountCodeNode"]) + + """ + 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 @gidTypes(types: ["SavedSearch"]) + + """ + The search query for filtering discounts. +

+ For 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 + ): DiscountCodeBulkDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 input data used to update the BXGY code discount. + """ + bxgyCodeDiscount: DiscountCodeBxgyInput! + + """ + The ID of the BXGY code discount to update. + """ + id: ID! @gidTypes(types: ["DiscountCodeNode"]) + ): DiscountCodeBxgyUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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! @gidTypes(types: ["DiscountCodeNode"]) + ): DiscountCodeDeactivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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! @gidTypes(types: ["DiscountCodeNode"]) + ): DiscountCodeDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 input data used to update the discount code. + """ + freeShippingCodeDiscount: DiscountCodeFreeShippingInput! + + """ + The ID of the discount code to update. + """ + id: ID! @gidTypes(types: ["DiscountCodeNode"]) + ): DiscountCodeFreeShippingUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + Publish a discount code to channels of the sales app making this request. + """ + discountCodePublish( + """ + The input data used to publish a discount code to a channel. + """ + input: DiscountCodePublishInput! + ): DiscountCodePublishPayload @requiredAccess(scope: "`write_discount_to_channel_publications` access scope. Also: Access only available to authorized apps.") @privatelyDocumented + + """ + 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 + [`DiscountCodeNode`](https://help.shopify.com/docs/api/admin-graphql/latest/objects/DiscountCodeNode#field-id) + object that the codes will be removed from. For example, `gid://shopify/DiscountCodeNode/123`. + You can use the + [`codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes) + to retrieve the ID. + """ + discountId: ID! @gidTypes(types: ["DiscountCodeNode"]) + + """ + The IDs of the + [`DiscountRedeemCode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/discountredeemcode#field-id) + objects to delete. + For example, `gid://shopify/DiscountRedeemCode/123`. + You can use the + [`codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes) + to retrieve the ID. + """ + ids: [ID!] @gidTypes(types: ["DiscountRedeemCode"]) + + """ + The ID of a + [saved search](https://shopify.dev/docs/api/admin-graphql/latest/objects/savedsearch#field-id). + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + A filter made up of terms, connectives, modifiers, and comparators that you can use to + search for code discounts. You can apply one or more filters to a query. Learn more about + [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax). + + For a list of accepted values for the `search` field, refer to the + [`query` argument on the `codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes#argument-query). + """ + search: String + ): DiscountCodeRedeemCodeBulkDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + 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 list of codes to associate with the + [code discount](https://help.shopify.com/manual/discounts/discount-types#discount-codes). + Maximum: 250 codes. + """ + codes: [DiscountRedeemCodeInput!]! + + """ + The ID of the + [`DiscountCodeNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeNode#field-id) + object that the codes will be added to. For example, `gid://shopify/DiscountCodeNode/123`. + You can use the + [`codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes) + to retrieve the ID. + """ + discountId: ID! @gidTypes(types: ["DiscountCodeNode"]) + ): DiscountRedeemCodeBulkAddPayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") + + """ + Registers a discounts allocator function. + """ + discountsAllocatorFunctionRegister( + """ + The function extension id of the discounts allocator function. + """ + functionExtensionId: String! + ): DiscountsAllocatorFunctionRegisterPayload @requiredAccess(scope: "`write_discounts_allocator_functions` access scope.") + + """ + Unregisters a discounts allocator function. + """ + discountsAllocatorFunctionUnregister( + """ + The function extension id of the discounts allocator function. + """ + functionExtensionId: String! + ): DiscountsAllocatorFunctionUnregisterPayload @requiredAccess(scope: "`write_discounts_allocator_functions` access scope.") + + """ + 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! @gidTypes(types: ["DisputeEvidence"]) + + """ + The updated properties for a dispute evidence. + """ + input: ShopifyPaymentsDisputeEvidenceUpdateInput! + ): DisputeEvidenceUpdatePayload @requiredAccess(scope: "`write_shopify_payments_dispute_evidences` access scope. Also: The user must have `manage_orders_information` permission or the `manage_disputes` permission.") + + """ + Injects a Meta tag into the online store for a given shop, for verifying the + domains of merchants onboarding to the marketplace. + """ + domainVerificationTagInject( + """ + The name of the marketplace, as it appears on the online store. + """ + name: String! + + """ + The code, as it appears on the online store, for verifying merchant domains. + """ + verificationCode: String! + ): DomainVerificationTagInjectPayload + + """ + Removes a Meta tag from the online store for a given shop. The tag is used for + verifying merchant domains during marketplace onboarding. + """ + domainVerificationTagRemove( + """ + The name of the Meta tag, as it appears on the online store. + """ + name: String! + ): DomainVerificationTagRemovePayload + + """ + Adds tags to multiple draft orders. + """ + draftOrderBulkAddTags( + """ + The IDs of the draft orders to add tags to. + """ + ids: [ID!] @gidTypes(types: ["DraftOrder"]) + + """ + The ID of the draft order saved search for filtering draft orders on. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + The conditions for filtering draft orders on. + See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). + """ + search: String + + """ + List of tags to be added. + """ + tags: [String!]! + ): DraftOrderBulkAddTagsPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") + + """ + Deletes multiple draft orders. + """ + draftOrderBulkDelete( + """ + The IDs of the draft orders to delete. + """ + ids: [ID!] @gidTypes(types: ["DraftOrder"]) + + """ + The ID of the draft order saved search for filtering draft orders on. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + The conditions for filtering draft orders on. + See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). + """ + search: String + ): DraftOrderBulkDeletePayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to delete multiple draft orders.") + + """ + Removes tags from multiple draft orders. + """ + draftOrderBulkRemoveTags( + """ + The IDs of the draft orders to remove tags from. + """ + ids: [ID!] @gidTypes(types: ["DraftOrder"]) + + """ + The ID of the draft order saved search for filtering draft orders on. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + The conditions for filtering draft orders on. + See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). + """ + search: String + + """ + List of tags to be removed. + """ + tags: [String!]! + ): DraftOrderBulkRemoveTagsPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") + + """ + 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 @requiredAccess(scope: "`write_draft_orders` access scope.") + + """ + 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( + """ + Whether to bypass cart and checkout validations. + This will ignore any validations added by apps during completion. + """ + bypassCartValidations: Boolean = false + + """ + The draft order to complete. + """ + id: ID! @gidTypes(types: ["DraftOrder"]) + + """ + The gateway for the completed draft order. + """ + paymentGatewayId: ID @gidTypes(types: ["PaymentGateway"]) + + """ + Whether the payment is pending. + """ + paymentPending: Boolean = false @deprecated(reason: "Create a draft with payment terms rather than marking the draft as pending.") + + """ + A channel definition handle used for sales channel attribution. + """ + sourceName: String + ): DraftOrderCompletePayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to mark as paid, or set payment terms.") + + """ + 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 @requiredAccess(scope: "`write_draft_orders` access scope or `write_quick_sale` access scope. Also: The user must have access to manage draft orders.") + + """ + Creates a draft order from order. + """ + draftOrderCreateFromOrder( + """ + Specifies the order's id that we create the draft order from. + """ + orderId: ID! @gidTypes(types: ["Order"]) + ): DraftOrderCreateFromOrderPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: Requires `write_orders` access scope.") + + """ + Creates a merchant checkout for the given draft order. + """ + draftOrderCreateMerchantCheckout( + """ + Specifies the Draft order's id that we create the checkout for. + """ + id: ID! @gidTypes(types: ["DraftOrder"]) + ): DraftOrderCreateMerchantCheckoutPayload @deprecated(reason: "This mutation is no longer supported.") @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to pay draft orders by credit card. Requires `write_checkouts` access scope.") + + """ + Deletes a draft order. + """ + draftOrderDelete( + """ + Specify the draft order to delete by its ID. + """ + input: DraftOrderDeleteInput! + ): DraftOrderDeletePayload @requiredAccess(scope: "`write_draft_orders` access scope or `write_quick_sale` access scope. Also: The user must have access to delete draft orders.") + + """ + Duplicates a draft order. + """ + draftOrderDuplicate( + """ + The ID of the draft order to duplicate. + """ + draftOrderId: ID @deprecated(reason: "Use `id` instead.") @gidTypes(types: ["DraftOrder"]) + + """ + The ID of the draft order to duplicate. + """ + id: ID @gidTypes(types: ["DraftOrder"]) + ): DraftOrderDuplicatePayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") + + """ + Previews a draft order invoice email. + """ + draftOrderInvoicePreview( + """ + Specifies the draft order invoice email fields. + """ + email: EmailInput + + """ + Specifies the draft order invoice email to preview. + """ + id: ID! @gidTypes(types: ["DraftOrder"]) + ): DraftOrderInvoicePreviewPayload @requiredAccess(scope: "`write_draft_orders` access scope.") + + """ + 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 invoice email fields. + """ + email: EmailInput + + """ + Specifies the draft order to send the invoice for. + """ + id: ID! @gidTypes(types: ["DraftOrder"]) + ): DraftOrderInvoiceSendPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") + + """ + Updates a draft order before sending the invoice to the buyer by configuring settings relevant to the draft order. + """ + draftOrderPrepareForBuyerCheckout( + """ + Whether discount codes are allowed during checkout of this draft order. + """ + allowDiscountCodesInCheckout: Boolean + + """ + Whether to bypass cart validations on this draft order. + """ + bypassCartValidations: Boolean + + """ + The draft order to prepare for buyer checkout. + """ + id: ID! @gidTypes(types: ["DraftOrder"]) + + """ + Whether to create price locks when preparing this draft for buyer checkout. + """ + lockPricesForBuyer: LockDraftOrderPricesForBuyer + ): DraftOrderPrepareForBuyerCheckoutPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") + + """ + 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! @gidTypes(types: ["DraftOrder"]) + + """ + The draft order properties to update. + """ + input: DraftOrderInput! + ): DraftOrderUpdatePayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") + + """ + 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 @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the read_customer_events and write_server_pixels access scopes.") + + """ + 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! @gidTypes(types: ["WebhookSubscription"]) + + """ + 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!]! @gidTypes(types: ["File"]) + ): FileAcknowledgeUpdateFailedPayload @requiredAccess(scope: "`write_files` access scope.") + + """ + 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 @requiredAccess(scope: "`write_files` access scope, `write_themes` access scope or `write_images` access scope. Also: Users must have create files permissions.") + + """ + 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!]! @gidTypes(types: ["File"]) + ): FileDeletePayload @requiredAccess(scope: "`write_files` access scope. Also: Users must have delete files permissions.") + + """ + 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 @requiredAccess(scope: "`write_files` access scope or `write_themes` access scope. Also: Users must have edit files permissions.") + + """ + Generates a signature for a Flow action payload. + """ + flowGenerateSignature( + """ + The unique identifier of the Flow action definition. + """ + id: ID! @gidTypes(types: ["FlowActionDefinition"]) + + """ + The request payload used to generate the signature. + """ + payload: String! + + """ + The schema used to validate the payload. Defaults to ACTION if none is provided. + """ + payloadSchema: FlowGenerateSignaturePayloadSchema + ): FlowGenerateSignaturePayload @privatelyDocumented + + """ + 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! @gidTypes(types: ["Fulfillment"]) + ): FulfillmentCancelPayload + + """ + Creates a fulfillment constraint rule and its metafield. + """ + fulfillmentConstraintRuleCreate( + """ + Associate the function with one or multiple delivery method types. + """ + deliveryMethodTypes: [DeliveryMethodType!]! + + """ + The handle of the function providing the constraint rule. + """ + functionHandle: String + + """ + The identifier of the function providing the constraint rule. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + Metafields to associate to the fulfillment constraint rule. + """ + metafields: [MetafieldInput!] = [] + ): FulfillmentConstraintRuleCreatePayload @requiredAccess(scope: "`write_fulfillment_constraint_rules` access scope.") + + """ + Deletes a fulfillment constraint rule and its metafields. + """ + fulfillmentConstraintRuleDelete( + """ + A globally-unique identifier for the fulfillment constraint rule. + """ + id: ID! @gidTypes(types: ["FulfillmentConstraintRule"]) + ): FulfillmentConstraintRuleDeletePayload @requiredAccess(scope: "`write_fulfillment_constraint_rules` access scope.") + + """ + Update a fulfillment constraint rule. + """ + fulfillmentConstraintRuleUpdate( + """ + Specifies the delivery method types to be updated. + If not provided or providing an empty list will associate the function with all delivery methods. + """ + deliveryMethodTypes: [DeliveryMethodType!]! + + """ + A globally-unique identifier for the fulfillment constraint rule. + """ + id: ID! @gidTypes(types: ["FulfillmentConstraintRule"]) + ): FulfillmentConstraintRuleUpdatePayload @requiredAccess(scope: "`write_fulfillment_constraint_rules` access scope.") + + """ + 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 @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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.") @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 @requiredAccess(scope: "`write_fulfillments` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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! @gidTypes(types: ["FulfillmentOrder"]) + + """ + An optional reason for accepting the cancellation request. + """ + message: String + ): FulfillmentOrderAcceptCancellationRequestPayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 estimated date and time when the fulfillment order will be shipped. + """ + estimatedShippedAt: DateTime + + """ + The ID of the fulfillment order associated with the fulfillment request. + """ + id: ID! @gidTypes(types: ["FulfillmentOrder"]) + + """ + An optional reason for accepting the fulfillment request. + """ + message: String + ): FulfillmentOrderAcceptFulfillmentRequestPayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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! @gidTypes(types: ["FulfillmentOrder"]) + ): FulfillmentOrderCancelPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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! @gidTypes(types: ["FulfillmentOrder"]) + + """ + An optional reason for marking the fulfillment order as incomplete. + """ + message: String + ): FulfillmentOrderClosePayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 details of the fulfillment hold applied on the fulfillment order. + """ + fulfillmentHold: FulfillmentOrderHoldInput! + + """ + The ID of the fulfillment order on which a fulfillment hold is applied. + """ + id: ID! @gidTypes(types: ["FulfillmentOrder"]) + ): FulfillmentOrderHoldPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 fulfillment order line items to be moved. + If left blank, all unfulfilled line items belonging to the fulfillment order are moved. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] + + """ + The ID of the fulfillment order to be moved. + """ + id: ID! @gidTypes(types: ["FulfillmentOrder"]) + + """ + The ID of the location where the fulfillment order will be moved. + """ + newLocationId: ID! @gidTypes(types: ["Location"]) + ): FulfillmentOrderMovePayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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! @gidTypes(types: ["FulfillmentOrder"]) + ): FulfillmentOrderOpenPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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! @gidTypes(types: ["FulfillmentOrder"]) + + """ + An optional reason for rejecting the cancellation request. + """ + message: String + ): FulfillmentOrderRejectCancellationRequestPayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have `fulfill_and_ship_orders` permission.") + + """ + 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! @gidTypes(types: ["FulfillmentOrder"]) + + """ + An optional array of line item rejection details. If none are provided, all + line items will be assumed to be unfulfillable. + + **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!] + + """ + An optional reason for rejecting the fulfillment request. + """ + message: String + + """ + The reason for the fulfillment order rejection. + """ + reason: FulfillmentOrderRejectionReason + ): FulfillmentOrderRejectFulfillmentRequestPayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + Releases the fulfillment hold on a fulfillment order. + """ + fulfillmentOrderReleaseHold( + """ + A configurable ID used to track the automation system releasing this hold. + """ + externalId: String + + """ + The IDs of the fulfillment holds to release.
+
+ Holds will only be released if they belong to the fulfillment order specified by the `id` argument.
+
+ NOTE: If not supplied, all holds for the fulfillment order will be released. + It is highly recommended that apps supply the ids of the holds that they intend to release. + Releasing all holds on a fulfillment order will result in the fulfillment order being released prematurely + and items being incorrectly fulfilled. + """ + holdIds: [ID!] @gidTypes(types: ["FulfillmentHold"]) + + """ + The ID of the fulfillment order for which to release the fulfillment hold. + """ + id: ID! @gidTypes(types: ["FulfillmentOrder"]) + ): FulfillmentOrderReleaseHoldPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope, `write_third_party_fulfillment_orders` access scope or `write_marketplace_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + Reports the progress of an open or in-progress fulfillment order. + """ + fulfillmentOrderReportProgress( + """ + The ID of the fulfillment order for which the progress report is targetting. + """ + id: ID! @gidTypes(types: ["FulfillmentOrder"]) + + """ + The details of the progress report for the fulfillment order. + """ + progressReport: FulfillmentOrderReportProgressInput + ): FulfillmentOrderReportProgressPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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( + """ + A future date and time when the fulfillment order will be marked as ready for fulfillment. + """ + fulfillAt: DateTime! + + """ + The ID of the fulfillment order to reschedule. + """ + id: ID! @gidTypes(types: ["FulfillmentOrder"]) + ): FulfillmentOrderReschedulePayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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! @gidTypes(types: ["FulfillmentOrder"]) + + """ + An optional reason for the cancellation request. + """ + message: String + ): FulfillmentOrderSubmitCancellationRequestPayload @requiredAccess(scope: "`write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 fulfillment order line items to be requested for fulfillment. + If left blank, all line items of the fulfillment order are requested for fulfillment. + """ + fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] + + """ + The ID of the fulfillment order associated with fulfillment request. + """ + id: ID! @gidTypes(types: ["FulfillmentOrder"]) + + """ + 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 + ): FulfillmentOrderSubmitFulfillmentRequestPayload @requiredAccess(scope: "`write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 locations to exclude for rerouting. Excluded + locations specified here take precedence over included locations provided + through included_location_ids. + """ + excludedLocationIds: [ID!] @gidTypes(types: ["Location"]) + + """ + The list of IDs of the fulfillment orders. + """ + fulfillmentOrderIds: [ID!]! @gidTypes(types: ["FulfillmentOrder"]) + + """ + The list of IDs of the locations to include for rerouting. By default, all locations are included. + """ + includedLocationIds: [ID!] @gidTypes(types: ["Location"]) + ): FulfillmentOrdersReroutePayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have the fulfill_and_ship_orders permission or the calling API client must be Shopify POS.") + + """ + Sets the latest date and time by which the fulfillment orders need to be fulfilled. + """ + fulfillmentOrdersSetFulfillmentDeadline( + """ + The new fulfillment deadline of the fulfillment orders. + """ + fulfillmentDeadline: DateTime! + + """ + The IDs of the fulfillment orders for which the deadline is being set. + """ + fulfillmentOrderIds: [ID!]! @gidTypes(types: ["FulfillmentOrder"]) + ): FulfillmentOrdersSetFulfillmentDeadlinePayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope, `write_third_party_fulfillment_orders` access scope or `write_marketplace_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 URL to send requests for the fulfillment service. + + If `callbackUrl` is provided: + - Shopify queries the callback_url/fetch_tracking_numbers endpoint to retrieve tracking numbers + for orders, if `trackingSupport` is set to `true`. + - Shopify queries the callback_url/fetch_stock endpoint to retrieve inventory levels, + if `inventoryManagement` is set to `true`. + - Shopify uses the callback_url/fulfillment_order_notification endpoint to send + [fulfillment and cancellation requests](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-2-receive-fulfillment-requests-and-cancellations). + + Otherwise, if no `callbackUrl` is provided you need to submit this information via the api: + - 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). + - 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 uses the [fulfillment order based workflow]( + https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments + ) for managing fulfillments. + + [As of 2022-07 API version](https://shopify.dev/changelog/legacy-fulfillment-api-deprecation), + the fulfillment order based workflow is the only way to manage fulfillments. + As the migration is now finished, the `fulfillmentOrdersOptIn` property is deprecated + and is always set to `true` on correctly functioning fulfillment services. + + The `fulfillmentOrdersOptIn` input field is [deprecated and will be removed in the next API version]( + https://shopify.dev/changelog/deprecation-of-the-fulfillmentservice-fulfillmentordersoptin-field). + This API version makes it optional and defaults to `true` for a smooth migration experience. + Do 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 manages product inventory and provides updates to Shopify. + + If `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. + + If 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 + + """ + The name of the fulfillment service. + """ + name: String! + + """ + Whether the fulfillment service requires products to be physically shipped. + """ + requiresShippingMethod: Boolean = true + + """ + Whether the fulfillment service provides tracking numbers for packages. + + If `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. + + If 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 + ): FulfillmentServiceCreatePayload @requiredAccess(scope: "`write_fulfillments` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + Deletes a fulfillment service. + """ + fulfillmentServiceDelete( + """ + The ID of an active merchant managed location where inventory and commitments will be relocated + after the fulfillment service is deleted. + + Inventory will only be transferred if the + [`TRANSFER`](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentServiceDeleteInventoryAction#value-transfer) + inventory action has been chosen. + """ + destinationLocationId: ID @gidTypes(types: ["Location"]) + + """ + The ID of the fulfillment service to delete. + """ + id: ID! @gidTypes(types: ["FulfillmentService"]) + + """ + The action to take with the location after the fulfillment service is deleted. + """ + inventoryAction: FulfillmentServiceDeleteInventoryAction = TRANSFER + ): FulfillmentServiceDeletePayload @requiredAccess(scope: "`write_fulfillments` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 URL to send requests for the fulfillment service. + + If `callbackUrl` is provided: + - Shopify queries the callback_url/fetch_tracking_numbers endpoint to retrieve tracking numbers + for orders, if `trackingSupport` is set to `true`. + - Shopify queries the callback_url/fetch_stock endpoint to retrieve inventory levels, + if `inventoryManagement` is set to `true`. + - Shopify uses the callback_url/fulfillment_order_notification endpoint to send + [fulfillment and cancellation requests](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-2-receive-fulfillment-requests-and-cancellations). + + Otherwise, if no `callbackUrl` is provided you need to submit this information via the api: + - 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). + - 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 + + """ + The id of the fulfillment service. + """ + id: ID! @gidTypes(types: ["FulfillmentService"]) + + """ + Whether the fulfillment service manages product inventory and provides updates to Shopify. + + If `callbackUrl` is provided, Shopify will periodically fetch inventory levels via the callback endpoint. + + If 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 + + """ + The name of the fulfillment service. + """ + name: String + + """ + Whether the fulfillment service requires products to be physically shipped. + """ + requiresShippingMethod: Boolean = true + + """ + Whether the fulfillment service provides tracking numbers for packages. + + If `callbackUrl` is provided, Shopify will periodically fetch tracking numbers via the callback endpoint. + + If 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 + ): FulfillmentServiceUpdatePayload @requiredAccess(scope: "`write_fulfillments` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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! @gidTypes(types: ["Fulfillment"]) + + """ + Whether the customer will be notified of this update and future updates for the fulfillment. + If this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated. + """ + notifyCustomer: Boolean + + """ + The tracking input for the mutation, including tracking URL, number, and company. + """ + trackingInfoInput: FulfillmentTrackingInput! + ): FulfillmentTrackingInfoUpdatePayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + Updates tracking information for a fulfillment. + """ + fulfillmentTrackingInfoUpdateV2( + """ + The ID of the fulfillment. + """ + fulfillmentId: ID! @gidTypes(types: ["Fulfillment"]) + + """ + Whether the customer will be notified of this update and future updates for the fulfillment. + If this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated. + """ + notifyCustomer: Boolean + + """ + The tracking input for the mutation, including tracking URL, number, and company. + """ + trackingInfoInput: FulfillmentTrackingInput! + ): FulfillmentTrackingInfoUpdateV2Payload @deprecated(reason: "Use `fulfillmentTrackingInfoUpdate` instead.") @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") + + """ + 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 @requiredAccess(scope: "`write_gift_cards` access scope.") + + """ + 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 input fields to credit a gift card. + """ + creditInput: GiftCardCreditInput! + + """ + The ID of the gift card to be credited. + """ + id: ID! @gidTypes(types: ["GiftCard"]) + ): GiftCardCreditPayload @requiredAccess(scope: "`write_gift_card_transactions` access scope.") + + """ + 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! @gidTypes(types: ["GiftCard"]) + ): GiftCardDeactivatePayload @requiredAccess(scope: "`write_gift_cards` access scope.") + + """ + 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 input fields to debit a gift card. + """ + debitInput: GiftCardDebitInput! + + """ + The ID of the gift card to be debited. + """ + id: ID! @gidTypes(types: ["GiftCard"]) + ): GiftCardDebitPayload @requiredAccess(scope: "`write_gift_card_transactions` access scope.") + + """ + Creates or updates a + [`gift card`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCard) + product. This mutation is specifically designed for gift card products and automatically sets + the `giftCard` field to `true`, applies gift card variant defaults (non-taxable, no shipping + required, inventory untracked), and omits fields that aren't relevant to gift cards. + + For list fields like + [`variants`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-input.fields.variants), + the mutation performs a full replacement: it creates new entries, updates existing ones, and + removes any entries not included in the input. For all other fields, only included fields + change and omitted fields remain unchanged. + + You can run the mutation synchronously to receive the updated product immediately, or + asynchronously by setting + [`synchronous`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-synchronous)`: false` + to receive a + [`ProductSetOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductSetOperation) + object instead. Use the + [`productOperation`](https://shopify.dev/docs/api/admin-graphql/latest/queries/productOperation) + query to check the status and retrieve the product details when running asynchronously. + + > Note: + > The + [`issuanceCurrency`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-input.fields.issuanceCurrency) + and [`crossCurrencyRedeemable`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-input.fields.crossCurrencyRedeemable) fields can only be set during product creation. They can't be changed after + the product is created. + """ + giftCardProductSet( + """ + Specifies the identifier that will be used to lookup the resource. + """ + identifier: ProductSetIdentifiers + + """ + The properties of the gift card product to create or update. + """ + input: GiftCardProductSetInput! + + """ + Whether the mutation should be run synchronously or asynchronously. + + If `true`, the mutation will return the updated `product`. + If `false`, the mutation will return a `productSetOperation`. + + Defaults to `true`. + """ + synchronous: Boolean = true + ): GiftCardProductSetPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create products.") + + """ + 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! @gidTypes(types: ["GiftCard"]) + ): GiftCardSendNotificationToCustomerPayload @requiredAccess(scope: "`write_gift_cards` access scope.") + + """ + 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! @gidTypes(types: ["GiftCard"]) + ): GiftCardSendNotificationToRecipientPayload @requiredAccess(scope: "`write_gift_cards` access scope.") + + """ + 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! @gidTypes(types: ["GiftCard"]) + + """ + The input fields to update the gift card. + """ + input: GiftCardUpdateInput! + ): GiftCardUpdatePayload @requiredAccess(scope: "`write_gift_cards` access scope.") + + """ + Updates the server pixel to connect to an HTTP endpoint. + Running this mutation deletes any previous subscriptions for the server pixel. + """ + httpServerPixelUpdate( + """ + The HTTP endpoint to which customer events are to be sent. + """ + httpEndpoint: String! + ): HttpServerPixelUpdatePayload @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the `read_customer_events` access scope and the `write_server_pixels` and `write_http_server_pixels` Shopify approval access scopes.") @privatelyDocumented + + """ + Sets up a new Hydrogen storefront to power your headless commerce experience. + This mutation kicks off the provisioning process in the background and gives + you a job ID to track progress. + + For example, when launching a new headless commerce experience, developers use + this mutation to provision the storefront environment. + + Use `hydrogenStorefrontCreate` to: + - Provision new Hydrogen storefront instances + - Track creation progress through background jobs + - Handle setup validation and error reporting + + The mutation returns immediately with a job ID that can be used to monitor the + creation progress, as storefront provisioning runs asynchronously. User errors + provide feedback if the creation request contains invalid parameters or + conflicts with existing resources. + + Learn more about [creating Hydrogen storefronts](https://shopify.dev/docs/custom-storefronts/hydrogen/getting-started). + """ + hydrogenStorefrontCreate( + """ + The title for the Hydrogen storefront. + """ + title: String! + ): HydrogenStorefrontCreatePayload @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") + + """ + Updates the customer account application URLs for a Hydrogen storefront, + configuring the authentication and redirect endpoints used by Shopify's + Customer Account API integration. This mutation validates URL formats and + security requirements. + + For example, when setting up customer login functionality, developers + configure the JavaScript origin for client-side authentication, logout + redirect URIs for post-signout navigation, and the primary redirect URI for + successful authentication flows. + + Use `hydrogenStorefrontCustomerApplicationUrlsReplace` to: + - Configure customer authentication endpoints + - Update redirect URLs for login and logout flows + - Modify JavaScript origins for client-side integration + - Validate URL security and format requirements + + The mutation replaces all existing URLs with the new configuration, ensuring + consistent authentication behavior across the storefront. Detailed error + reporting helps developers verify the configuration meets Shopify's security standards. + + Learn more about [Customer Account API integration](https://shopify.dev/docs/storefronts/headless/building-with-the-customer-account-api/getting-started). + """ + hydrogenStorefrontCustomerApplicationUrlsReplace( + """ + The ID of the storefront. + """ + storefrontId: ID! + + """ + An object of fields to update on the customer oauth application. + """ + urlsReplaceInput: HydrogenStorefrontCustomerApplicationUrlsReplaceInput! + ): HydrogenStorefrontCustomerApplicationUrlsReplacePayload @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") + + """ + Replaces all environment variables for a specific Hydrogen storefront + environment in a single atomic operation. This mutation provides a complete + replacement strategy rather than individual variable updates, ensuring + consistent environment configuration. + + For example, when deploying a new version of your Hydrogen storefront that + requires a different set of API keys, database URLs, and feature flags, you + can replace the entire environment configuration at once rather than updating + variables individually. + + Use `HydrogenStorefrontEnvironmentVariableBulkReplace` to: + - Deploy complete environment configurations during releases + - Synchronize development and production environment settings + - Reset environment variables to a known baseline state + - Migrate between different configuration schemas + + This bulk replacement approach helps prevent configuration drift and ensures + all related variables are updated together, reducing the risk of partial + updates that could break your storefront functionality. + + Learn more about [Hydrogen deployment](https://shopify.dev/docs/custom-storefronts/hydrogen/deployment). + """ + hydrogenStorefrontEnvironmentVariableBulkReplace( + """ + The environment ID for which the variables will be set. + """ + environmentId: ID! + + """ + An array of objects, each representing an environment variable to be created. + """ + environmentVariablesInput: [HydrogenStorefrontEnvironmentVariableInput!]! + + """ + The ID of the storefront. + """ + storefrontId: ID! + ): HydrogenStorefrontEnvironmentVariableBulkReplacePayload @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") + + """ + 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 initial available quantity of the inventory item being activated at the location. + """ + available: Int + + """ + The ID of the inventory item to activate. + """ + inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) + + """ + The ID of the location of the inventory item being activated. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + 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 @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to activate an inventory item.") + + """ + 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 @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to apply changes to inventory quantities.") + + """ + 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! @gidTypes(types: ["InventoryItem"]) + + """ + A list of pairs of locations and activate status to update for the specified inventory item. + """ + inventoryItemUpdates: [InventoryBulkToggleActivationInput!]! + ): InventoryBulkToggleActivationPayload @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to update the activation status of an inventory.") + + """ + 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! @gidTypes(types: ["InventoryLevel"]) + ): InventoryDeactivatePayload @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to deactivate an inventory.") + + """ + 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! @gidTypes(types: ["InventoryItem"]) + + """ + The input fields that update an + [`inventoryItem`](https://shopify.dev/api/admin-graphql/latest/queries/inventoryitem). + """ + input: InventoryItemInput! + ): InventoryItemUpdatePayload @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to update an inventory item.") + + """ + 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 @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to move an inventory.") + + """ + 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.") @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to update an inventory.") + + """ + 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 @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to update an inventory.") + + """ + 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! @gidTypes(types: ["InventoryShipment"]) + + """ + The list of line items to add to the inventory shipment. + """ + lineItems: [InventoryShipmentLineItemInput!]! + ): InventoryShipmentAddItemsPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") + + """ + 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 @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") + + """ + 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 @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") + + """ + Deletes an inventory shipment. Only draft shipments can be deleted. + """ + inventoryShipmentDelete( + """ + The ID of the inventory shipment to be deleted. + """ + id: ID! @gidTypes(types: ["InventoryShipment"]) + ): InventoryShipmentDeletePayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") + + """ + Marks a draft inventory shipment as in transit. + """ + inventoryShipmentMarkInTransit( + """ + The date the shipment was shipped. + """ + dateShipped: DateTime + + """ + The ID of the inventory shipment to mark in transit. + """ + id: ID! @gidTypes(types: ["InventoryShipment"]) + ): InventoryShipmentMarkInTransitPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") + + """ + 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 bulk receive action for the inventory shipment. + """ + bulkReceiveAction: InventoryShipmentReceiveLineItemReason + + """ + The date the inventory shipment was initially received. + """ + dateReceived: DateTime + + """ + The ID of the inventory shipment to receive. + """ + id: ID! @gidTypes(types: ["InventoryShipment"]) + + """ + The list of receive line items for the inventory shipment. + """ + lineItems: [InventoryShipmentReceiveItemInput!] + ): InventoryShipmentReceivePayload @requiredAccess(scope: "`write_inventory_shipments_received_items` access scope. Also: The user must have permission to manage inventory.") + + """ + Remove items from an inventory shipment. + """ + inventoryShipmentRemoveItems( + """ + The ID of the inventory shipment to remove items from. + """ + id: ID! @gidTypes(types: ["InventoryShipment"]) + + """ + A list of inventory shipment line item ids representing the items to be removed from the shipment. + """ + lineItems: [ID!]! @gidTypes(types: ["InventoryShipmentLineItem"]) + ): InventoryShipmentRemoveItemsPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") + + """ + Sets the barcode on an inventory shipment. + """ + inventoryShipmentSetBarcode( + """ + A unique barcode for the shipment. + """ + barcode: String! + + """ + The ID of the inventory shipment to set the barcode on. + """ + id: ID! @gidTypes(types: ["InventoryShipment"]) + ): InventoryShipmentSetBarcodePayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory shipments.") + + """ + Edits the tracking info on an inventory shipment. + """ + inventoryShipmentSetTracking( + """ + The ID of the inventory shipment whose tracking info is being edited. + """ + id: ID! @gidTypes(types: ["InventoryShipment"]) + + """ + The tracking info to edit on the inventory shipment. + """ + tracking: InventoryShipmentTrackingInput! + ): InventoryShipmentSetTrackingPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") + + """ + Updates items on an inventory shipment. + """ + inventoryShipmentUpdateItemQuantities( + """ + The ID of the inventory shipment to update item quantities. + """ + id: ID! @gidTypes(types: ["InventoryShipment"]) + + """ + The list of line items to be updated to the shipment. + """ + items: [InventoryShipmentUpdateItemQuantitiesInput!] = [] + ): InventoryShipmentUpdateItemQuantitiesPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") + + """ + Cancels an inventory transfer. + """ + inventoryTransferCancel( + """ + The ID of the inventory transfer to cancel. + """ + id: ID! @gidTypes(types: ["InventoryTransfer"]) + ): InventoryTransferCancelPayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") + + """ + 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 @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") + + """ + 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 @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") + + """ + Deletes an inventory transfer. + """ + inventoryTransferDelete( + """ + The ID of the inventory transfer to delete. + """ + id: ID! @gidTypes(types: ["InventoryTransfer"]) + ): InventoryTransferDeletePayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") + + """ + 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! @gidTypes(types: ["InventoryTransfer"]) + ): InventoryTransferDuplicatePayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") + + """ + Edits an inventory transfer. + """ + inventoryTransferEdit( + """ + The ID of the inventory Transfer to be edited. + """ + id: ID! @gidTypes(types: ["InventoryTransfer"]) + + """ + The input fields to edit the inventory transfer. + """ + input: InventoryTransferEditInput! + ): InventoryTransferEditPayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") + + """ + Sets an inventory transfer to ready to ship. + """ + inventoryTransferMarkAsReadyToShip( + """ + The ID of the inventory transfer to mark as ready to ship. + """ + id: ID! @gidTypes(types: ["InventoryTransfer"]) + ): InventoryTransferMarkAsReadyToShipPayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") + + """ + 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 @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") + + """ + 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 @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") + + """ + Creates a discount code in exchange for a customer's email address. + """ + leadCaptureForDiscount( + """ + The discount to create. + """ + basicCodeDiscount: LeadCaptureDiscountInput! + + """ + The customer to create a discount for. + """ + customer: LeadCaptureCustomerInput! + ): LeadCaptureForDiscountPayload @requiredAccess(scope: "Access only available to authorized apps.") @privatelyDocumented + + """ + 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! @gidTypes(types: ["Location"]) + ): LocationActivatePayload @requiredAccess(scope: "`write_locations` access scope.") + + """ + 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 @requiredAccess(scope: "`write_locations` access scope.") + + """ + 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 destination location to which inventory, pending orders and + moving transfers will be moved from the location to deactivate. + """ + destinationLocationId: ID @gidTypes(types: ["Location"]) + + """ + The ID of a location to deactivate. + """ + locationId: ID! @gidTypes(types: ["Location"]) + ): LocationDeactivatePayload @requiredAccess(scope: "`write_locations` access scope.") + + """ + Deletes a location. + """ + locationDelete( + """ + The ID of a location to delete. + """ + locationId: ID! @gidTypes(types: ["Location"]) + ): LocationDeletePayload @requiredAccess(scope: "`write_locations` access scope.") + + """ + 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! @gidTypes(types: ["Location"]) + + """ + The updated properties for the location. + """ + input: LocationEditInput! + ): LocationEditPayload @requiredAccess(scope: "`write_locations` access scope or `write_fulfillments` access scope. Also: `write_locations`: access scope is required to modify merchant-managed locations. `write_fulfillments`: apps can edit the locations associated with their fulfillment services if they have this scope. Only the app that created the fulfillment service can edit its associated location.") + + """ + Disables local pickup for a location. + """ + locationLocalPickupDisable( + """ + The ID of the location to disable local pickup for. + """ + locationId: ID! @gidTypes(types: ["Location"]) + ): LocationLocalPickupDisablePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") + + """ + 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 @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") + + """ + 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Updates currency settings of a market. + """ + marketCurrencySettingsUpdate( + """ + Properties to update for the market currency settings. + """ + input: MarketCurrencySettingsUpdateInput! + + """ + The ID of the market definition to target. + """ + marketId: ID! @gidTypes(types: ["Market"]) + ): MarketCurrencySettingsUpdatePayload @deprecated(reason: "This will be removed in a future version. Use `marketCreate` and `marketUpdate` for creating and updating\nmarket currency settings, respectively.\n") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Deletes a market definition. + """ + marketDelete( + """ + The ID of the market to delete. + """ + id: ID! @gidTypes(types: ["Market"]) + ): MarketDeletePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Creates or updates market localizations. + """ + marketLocalizationsRegister( + """ + The input fields for a market localization. + """ + marketLocalizations: [MarketLocalizationRegisterInput!]! + + """ + The ID of the resource that is being localized within the context of a market. + """ + resourceId: ID! @gidTypes(types: ["TranslatableMetafieldProxy", "Metaobject"]) + ): MarketLocalizationsRegisterPayload @requiredAccess(scope: "`write_translations` access scope.") + + """ + Deletes market localizations. + """ + marketLocalizationsRemove( + """ + The list of market IDs. + """ + marketIds: [ID!]! @gidTypes(types: ["Market"]) + + """ + The list of market localization keys. + """ + marketLocalizationKeys: [String!]! + + """ + The ID of the resource for which market localizations are being deleted. + """ + resourceId: ID! @gidTypes(types: ["TranslatableMetafieldProxy", "Metaobject"]) + ): MarketLocalizationsRemovePayload @requiredAccess(scope: "`write_translations` access scope.") + + """ + Deletes a market region. + """ + marketRegionDelete( + """ + The ID of the market region to delete. + """ + id: ID! @gidTypes(types: ["Region"]) + ): MarketRegionDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Creates regions that belong to an existing market. + """ + marketRegionsCreate( + """ + The ID of the market to add the regions to. + """ + marketId: ID! @gidTypes(types: ["Market"]) + + """ + 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.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Deletes a list of market regions. + """ + marketRegionsDelete( + """ + A list of IDs of the market regions to delete. + """ + ids: [ID!]! @gidTypes(types: ["Region"]) + ): MarketRegionsDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Updates the properties of a market. + """ + marketUpdate( + """ + The ID of the market to update. + """ + id: ID! @gidTypes(types: ["Market"]) + + """ + The properties to update. + """ + input: MarketUpdateInput! + ): MarketUpdatePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Creates a web presence for a market. + """ + marketWebPresenceCreate( + """ + The ID of the market for which to create a web presence. + """ + marketId: ID! @gidTypes(types: ["Market"]) + + """ + The details of the web presence to be created. + """ + webPresence: MarketWebPresenceCreateInput! + ): MarketWebPresenceCreatePayload @deprecated(reason: "Use `webPresenceCreate` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Deletes a market web presence. + """ + marketWebPresenceDelete( + """ + The ID of the web presence to delete. + """ + webPresenceId: ID! @gidTypes(types: ["WebPresence"]) + ): MarketWebPresenceDeletePayload @deprecated(reason: "Use `webPresenceDelete` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Updates a market web presence. + """ + marketWebPresenceUpdate( + """ + The web_presence fields used to update the market's web presence. + """ + webPresence: MarketWebPresenceUpdateInput! + + """ + The ID of the web presence to update. + """ + webPresenceId: ID! @gidTypes(types: ["WebPresence"]) + ): MarketWebPresenceUpdatePayload @deprecated(reason: "Use `webPresenceUpdate` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + 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 @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + 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 @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + Creates a new external marketing activity. + """ + marketingActivityCreateExternal( + """ + The input field for creating an external marketing activity. + """ + input: MarketingActivityCreateExternalInput! + ): MarketingActivityCreateExternalPayload @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + Deletes an external marketing activity. + """ + marketingActivityDeleteExternal( + """ + The ID of the marketing activity. A marketing activity ID or remote ID must be provided. + """ + marketingActivityId: ID @gidTypes(types: ["MarketingActivity"]) + + """ + 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 @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + 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 @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + 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 @gidTypes(types: ["MarketingActivity"]) + + """ + 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 @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + 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 @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + Creates a new marketing engagement for a marketing activity or a marketing channel. + """ + marketingEngagementCreate( + """ + 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 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 @gidTypes(types: ["MarketingActivity"]) + + """ + The marketing engagement's attributes. + """ + marketingEngagement: MarketingEngagementInput! + + """ + 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 + ): MarketingEngagementCreatePayload @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + 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 @requiredAccess(scope: "`write_marketing_events` access scope.") + + """ + Creates or updates a payment configuration for a shop on a marketplace. + """ + marketplacePaymentsConfigurationUpdate( + """ + The features requested to onboard onto a marketplace. + """ + requestedFeatures: [MarketplacePaymentsFeatureInput!]! + ): MarketplacePaymentsConfigurationUpdatePayload @requiredAccess(scope: "`write_marketplace_payments_configurations` access scope.") @privatelyDocumented + + """ + 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 handle. + """ + handle: String! + + """ + List of the menu's items. + """ + items: [MenuItemCreateInput!]! + + """ + The menu's title. + """ + title: String! + ): MenuCreatePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") + + """ + Deletes a menu. + """ + menuDelete( + """ + The ID of the menu to be deleted. + """ + id: ID! @gidTypes(types: ["Menu"]) + ): MenuDeletePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") + + """ + 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( + """ + The menu's handle. + """ + handle: String + + """ + ID of the menu to be updated. + """ + id: ID! @gidTypes(types: ["Menu"]) + + """ + List of the menu's items. + """ + items: [MenuItemUpdateInput!]! + + """ + The menu's title. + """ + title: String! + ): MenuUpdatePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") + + """ + 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 @requiredAccess(scope: "API client to have access to the namespace and the resource type associated with the metafield definition.\n") + + """ + 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( + """ + Whether to delete all associated metafields. + """ + deleteAllAssociatedMetafields: Boolean = false + + """ + The id of the metafield definition to delete. Using `identifier` is preferred. + """ + id: ID @gidTypes(types: ["MetafieldDefinition"]) + + """ + The identifier of the metafield definition to delete. + """ + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinitionDeletePayload @requiredAccess(scope: "API client to have access to the resource type associated with the metafield definition.\n") + + """ + 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 @gidTypes(types: ["MetafieldDefinition"]) + + """ + The identifier of the metafield definition to pin. + """ + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinitionPinPayload @requiredAccess(scope: "API client to have access to the namespace and the resource type associated with the metafield definition.\n") + + """ + 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 @gidTypes(types: ["MetafieldDefinition"]) + + """ + The identifier of the metafield definition to unpin. + """ + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinitionUnpinPayload @requiredAccess(scope: "API client to have access to the namespace and the resource type associated with the metafield definition.\n") + + """ + 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 @requiredAccess(scope: "API client to have access to the namespace and the resource type associated with the metafield definition.\n") + + """ + 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 @requiredAccess(scope: "access defined by each metafield input `ownerId` scalar's type in a `MetafieldsSetInput` field.\nFor example, setting a metafield on a `PRODUCT` requires the same access as mutating a `PRODUCT`.\n") + + """ + 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 @requiredAccess(scope: "the same access level needed to mutate the owner resource. For instance, if you want to set\na metafield on a product, you need the same permissions as you would need to mutate a product.\n") + + """ + Asynchronously delete metaobjects and their associated metafields in bulk. + """ + metaobjectBulkDelete( + """ + Specifies the condition by which metaobjects are deleted. + Exactly one field of input is required. + """ + where: MetaobjectBulkDeleteWhereCondition! + ): MetaobjectBulkDeletePayload @requiredAccess(scope: "`write_metaobjects` access scope.") + + """ + 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 @requiredAccess(scope: "`write_metaobjects` access scope.") + + """ + 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 @requiredAccess(scope: "`write_metaobject_definitions` access scope.") + + """ + 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! @gidTypes(types: ["MetaobjectDefinition"]) + ): MetaobjectDefinitionDeletePayload @requiredAccess(scope: "`write_metaobject_definitions` access scope.") + + """ + 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 input fields for updating a metaobject definition. + """ + definition: MetaobjectDefinitionUpdateInput! + + """ + The ID of the metaobject definition to update. + """ + id: ID! @gidTypes(types: ["MetaobjectDefinition"]) + ): MetaobjectDefinitionUpdatePayload @requiredAccess(scope: "`write_metaobject_definitions` access scope.") + + """ + Deletes the specified metaobject and its associated metafields. + """ + metaobjectDelete( + """ + The ID of the metaobject to delete. + """ + id: ID! @gidTypes(types: ["Metaobject"]) + ): MetaobjectDeletePayload @requiredAccess(scope: "`write_metaobjects` access scope.") + + """ + 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! @gidTypes(types: ["Metaobject"]) + + """ + Specifies parameters to update on the metaobject. + """ + metaobject: MetaobjectUpdateInput! + ): MetaobjectUpdatePayload @requiredAccess(scope: "`write_metaobjects` access scope.") + + """ + 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. Only the fields you provide are + updated. Cannot be used in conjunction with `values`. + """ + metaobject: MetaobjectUpsertInput + + """ + The values of the metaobject as a JSON object keyed by field definition key. + This is a full replacement — omitted keys are cleared on an existing record. + Cannot be used in conjunction with `metaobject`. + """ + values: JSON + ): MetaobjectUpsertPayload @requiredAccess(scope: "`write_metaobjects` access scope.") + + """ + Creates up to 25 metaobjects of the same type. + """ + metaobjectsCreate( + """ + The parameters for the metaobjects to create. + """ + input: MetaobjectsCreateInput! + ): MetaobjectsCreatePayload @requiredAccess(scope: "`write_metaobjects` access scope.") + + """ + Create a mobile platform application. + """ + mobilePlatformApplicationCreate( + """ + The input to create a mobile platform application. + """ + input: MobilePlatformApplicationCreateInput! + ): MobilePlatformApplicationCreatePayload @requiredAccess(scope: "`write_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") + + """ + Delete a mobile platform application. + """ + mobilePlatformApplicationDelete( + """ + The ID of the Mobile Platform Application to be deleted. + """ + id: ID! @gidTypes(types: ["AndroidApplication", "AppleApplication"]) + ): MobilePlatformApplicationDeletePayload @requiredAccess(scope: "`write_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") + + """ + Update a mobile platform application. + """ + mobilePlatformApplicationUpdate( + """ + The ID of the Mobile Platform Application to be updated. + """ + id: ID! @gidTypes(types: ["AndroidApplication", "AppleApplication"]) + + """ + The input to updat a Mobile Platform Application. + """ + input: MobilePlatformApplicationUpdateInput! + ): MobilePlatformApplicationUpdatePayload @requiredAccess(scope: "`write_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") + + """ + 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( + """ + Whether to send a notification to the customer about the order cancellation. + """ + notifyCustomer: Boolean = false + + """ + The ID of the order to be canceled. + """ + orderId: ID! @gidTypes(types: ["Order"]) + + """ + The reason for canceling the order. + """ + reason: OrderCancelReason! + + """ + 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! + + """ + A staff-facing note about the order cancellation. This is not visible to the customer. Maximum length of 255 characters. + """ + staffNote: String = null + ): OrderCancelPayload @requiredAccess(scope: "`write_orders` access scope or `write_marketplace_orders` access scope. Also: This action cannot be reversed.") + + """ + 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 @requiredAccess(scope: "`write_orders` access scope or `write_marketplace_orders` access scope. Also: The user must have capture_payments_for_orders permission.") + + """ + 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 @requiredAccess(scope: "`write_orders` access scope. Also: User needs manage_orders_information permission.") + + """ + 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 strategies for updating inventory and whether to send shipping and order confirmations to customers. + """ + options: OrderCreateOptionsInput + + """ + The attributes of the new order. + """ + order: OrderCreateOrderInput! + ): OrderCreatePayload @requiredAccess(scope: "`write_orders` access scope. Also: This mutation is only accessible to apps authenticated using [offline tokens](https:\/\/shopify.dev\/docs\/apps\/build\/authentication-authorization\/access-tokens\/offline-access-tokens).") + + """ + 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 payment amount to collect. + """ + amount: MoneyInput + + """ + Whether the payment should be authorized or captured. If `false`, then the authorization of + the payment is triggered. + """ + autoCapture: Boolean = true + + """ + The ID of the order to collect the balance for. + """ + id: ID! @gidTypes(types: ["Order"]) + + """ + A unique key to identify the payment request. + """ + idempotencyKey: String! + + """ + The mandate ID used for payment. + """ + mandateId: ID! @gidTypes(types: ["PaymentMandate"]) + + """ + The ID of the payment schedule to collect the balance for. + """ + paymentScheduleId: ID @gidTypes(types: ["PaymentSchedule"]) + ): OrderCreateMandatePaymentPayload @requiredAccess(scope: "`write_payment_mandate` access scope. Also: The user must have `pay_orders_by_vaulted_card` permission. The API client must be installed on a Shopify Plus store to use the amount field.") + + """ + 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 manual payment amount to be created. + """ + amount: MoneyInput + + """ + The ID of the order to create a manual payment for. + """ + id: ID! @gidTypes(types: ["Order"]) + + """ + 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 @requiredAccess(scope: "`write_orders` access scope. Also: The user must have mark_orders_as_paid permission. The API client must be installed on a Shopify Plus store to use the amount field.") + + """ + Removes customer from an order. + """ + orderCustomerRemove( + """ + The ID of the order having its customer removed. + """ + orderId: ID! @gidTypes(types: ["Order"]) + ): OrderCustomerRemovePayload @requiredAccess(scope: "`write_orders` access scope. Also: The user must have permission to manage the order.") + + """ + Sets a customer on an order. + """ + orderCustomerSet( + """ + The ID of the customer being set on the order. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + The ID of the order having a customer set. + """ + orderId: ID! @gidTypes(types: ["Order"]) + ): OrderCustomerSetPayload @requiredAccess(scope: "`write_orders` access scope or `write_quick_sale` access scope. Also: The user must have permission to manage the order.") + + """ + 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! @gidTypes(types: ["Order"]) + ): OrderDeletePayload @requiredAccess(scope: "`write_orders` access scope. Also: The user must have delete_orders permission.") + + """ + 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) + or the order edit session to edit. This is the edit to which the custom item is added. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + + """ + The ID of the retail [location](https://shopify.dev/api/admin-graphql/latest/objects/location) + (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 @gidTypes(types: ["Location"]) + + """ + 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 requires shipping. Defaults to `false`. + """ + requiresShipping: Boolean + + """ + The optional SKU for the custom item to add. + """ + sku: String + + """ + Whether the custom item is taxable. Defaults to `true`. + """ + taxable: Boolean + + """ + The name of the custom item to add. + """ + title: String! + + """ + Specifies the weight unit and value inputs. + """ + weight: WeightInput + ): OrderEditAddCustomItemPayload @requiredAccess(scope: "`write_order_edits` access scope. Also: To use the GraphQL Admin API to edit orders, your app needs to request the `write_order_edits` access scope for a Shopify store.") + + """ + 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 discount to add to the line item. + """ + discount: OrderEditAppliedDiscountInput! + + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + + """ + The ID of the calculated line item to add the discount to. + """ + lineItemId: ID! @gidTypes(types: ["CalculatedLineItem"]) + ): OrderEditAddLineItemDiscountPayload @requiredAccess(scope: "`write_order_edits` access scope. Also: The user must have apply_discounts_to_orders permission.") + + """ + 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) + or the order edit session to edit. This is the edit to which the shipping line is added. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + + """ + The shipping line to be added. + """ + shippingLine: OrderEditAddShippingLineInput! + ): OrderEditAddShippingLinePayload @requiredAccess(scope: "`write_order_edits` access scope.") + + """ + 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( + """ + Whether the mutation can create a line item for a variant that's already on the calculated order. + """ + allowDuplicates: Boolean = false + + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + + """ + The ID of the [location](https://shopify.dev/api/admin-graphql/latest/objects/location) + to check for inventory availability. Used for tax calculations. A default + location ID is chosen automatically if none is provided. + """ + locationId: ID @gidTypes(types: ["Location"]) + + """ + The quantity of the item to add to the order. Must be a positive value. + """ + quantity: Int! + + """ + The ID of the variant to add. + """ + variantId: ID! @gidTypes(types: ["ProductVariant"]) + ): OrderEditAddVariantPayload @requiredAccess(scope: "`write_order_edits` access scope.") + + """ + 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! @gidTypes(types: ["Order"]) + ): OrderEditBeginPayload @requiredAccess(scope: "Requires `write_order_edits` access scope. Also: User needs either `manage_orders_information`, `edit_orders`, or `fulfill_and_ship_orders` permission.") + + """ + 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) + or the order edit session that will have its changes applied to the order. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + + """ + Whether to notify the customer or not. + """ + notifyCustomer: Boolean + + """ + Note for staff members. + """ + staffNote: String + ): OrderEditCommitPayload @requiredAccess(scope: "Requires `write_order_edits` access scope. Also: User needs either `manage_orders_information`, `edit_orders`, or `fulfill_and_ship_orders` permission.") + + """ + 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 discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) + to remove. + """ + discountApplicationId: ID! @gidTypes(types: ["CalculatedDiscountApplication"]) + + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. This is the edit from which the discount is removed. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + ): OrderEditRemoveDiscountPayload @requiredAccess(scope: "`write_order_edits` access scope. Also: The user must have apply_discounts_to_orders permission.") + + """ + Removes a line item discount that was applied as part of an order edit. + """ + orderEditRemoveLineItemDiscount( + """ + The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) + to remove. + """ + discountApplicationId: ID! @gidTypes(types: ["CalculatedDiscountApplication"]) + + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. This is the edit from which the line item discount is removed. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + ): OrderEditRemoveLineItemDiscountPayload @deprecated(reason: "Use `orderEditRemoveDiscount` instead.") @requiredAccess(scope: "`write_order_edits` access scope. Also: The user must have apply_discounts_to_orders permission.") + + """ + 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) + or the order edit session to edit. This is the edit from which the shipping line is removed. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + + """ + The ID of the calculated shipping line to remove. + """ + shippingLineId: ID! @gidTypes(types: ["CalculatedShippingLine"]) + ): OrderEditRemoveShippingLinePayload @requiredAccess(scope: "`write_order_edits` access scope.") + + """ + 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) + or the order edit session to edit. The edit changes the quantity on the line item. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + + """ + The ID of the calculated line item to edit. + """ + lineItemId: ID! @gidTypes(types: ["CalculatedLineItem"]) + + """ + The ID of the location. If 'restock' is set to true, the restocked item will be made available + at the specified location. + """ + locationId: ID @deprecated(reason: "No longer supported.") @gidTypes(types: ["Location"]) + + """ + 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 + ): OrderEditSetQuantityPayload @requiredAccess(scope: "`write_order_edits` access scope.") + + """ + 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 updated discount. + """ + discount: OrderEditAppliedDiscountInput! + + """ + The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) + to update. + """ + discountApplicationId: ID! @gidTypes(types: ["CalculatedDiscountApplication"]) + + """ + The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) + or the order edit session to edit. This is the edit used to update the discount. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + ): OrderEditUpdateDiscountPayload @requiredAccess(scope: "`write_order_edits` access scope. Also: The user must have apply_discounts_to_orders permission.") + + """ + 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) + or the order edit session to edit. This is the edit used to update the shipping line. + """ + id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + + """ + The updated shipping line. + """ + shippingLine: OrderEditUpdateShippingLineInput! + + """ + The ID of the calculated shipping line to update. + """ + shippingLineId: ID! @gidTypes(types: ["CalculatedShippingLine"]) + ): OrderEditUpdateShippingLinePayload @requiredAccess(scope: "`write_order_edits` access scope.") + + """ + 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 email input fields for the order invoice. The `bcc` and `from` fields should be store or staff account emails. + """ + email: EmailInput + + """ + The order associated with the invoice. + """ + id: ID! @gidTypes(types: ["Order"]) + ): OrderInvoiceSendPayload @requiredAccess(scope: "`write_orders` access scope. Also: The user must have access to orders and manage orders information.") + + """ + 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 @requiredAccess(scope: "`write_orders` access scope. Also: The user must have mark_orders_as_paid permission.") + + """ + Opens a closed order. + """ + orderOpen( + """ + The input for the mutation. + """ + input: OrderOpenInput! + ): OrderOpenPayload @requiredAccess(scope: "`write_orders` access scope. Also: User needs manage_orders_information permission.") + + """ + 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 @requiredAccess(scope: "`write_orders` access scope. Also: This mutation is only accessible to apps authenticated using [offline tokens](https:\/\/shopify.dev\/docs\/apps\/build\/authentication-authorization\/access-tokens\/offline-access-tokens).") + + """ + 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 @requiredAccess(scope: "`write_orders` access scope, `write_marketplace_orders` access scope or `write_quick_sale` access scope. Also: The app must have the `write_pos_staff_member_event_attribution_overrides` access scope to assign events to another staff member.") + + """ + 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 @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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! @gidTypes(types: ["Page"]) + ): PageDeletePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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! @gidTypes(types: ["Page"]) + + """ + The properties of the page to be updated. + """ + page: PageUpdateInput! + ): PageUpdatePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") + + """ + 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 enabled status of the payment customizations. + """ + enabled: Boolean! + + """ + The global IDs of the payment customizations. + """ + ids: [ID!]! @gidTypes(types: ["PaymentCustomization"]) + ): PaymentCustomizationActivationPayload @requiredAccess(scope: "`write_payment_customizations` access scope.") + + """ + 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 @requiredAccess(scope: "`write_payment_customizations` access scope.") + + """ + 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! @gidTypes(types: ["PaymentCustomization"]) + ): PaymentCustomizationDeletePayload @requiredAccess(scope: "`write_payment_customizations` access scope.") + + """ + 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! @gidTypes(types: ["PaymentCustomization"]) + + """ + The input data used to update the payment customization. + """ + paymentCustomization: PaymentCustomizationInput! + ): PaymentCustomizationUpdatePayload @requiredAccess(scope: "`write_payment_customizations` access scope.") + + """ + Sends an email payment reminder for a payment schedule. + """ + paymentReminderSend( + """ + The payment schedule id associated with the reminder. + """ + paymentScheduleId: ID! @gidTypes(types: ["PaymentSchedule"]) + ): PaymentReminderSendPayload @requiredAccess(scope: "`write_orders` access scope.") + + """ + 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( + """ + The attributes used to create the payment terms. + """ + paymentTermsAttributes: PaymentTermsCreateInput! + + """ + Specifies the reference orderId to add the payment terms for. + """ + referenceId: ID! @gidTypes(types: ["Order", "DraftOrder"]) + ): PaymentTermsCreatePayload @requiredAccess(scope: "`write_payment_terms` access scope. Also: The user must have access to orders or draft orders.") + + """ + 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 @requiredAccess(scope: "`write_payment_terms` access scope. Also: User must have either orders or draft orders access according to the reference.") + + """ + 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 @requiredAccess(scope: "`write_payment_terms` access scope. Also: User must have either orders or draft orders access according to the reference.") + + """ + Assigns a point of sale device to a cash drawer, removing any prior assignment. + """ + pointOfSaleDeviceAssignToCashDrawer( + """ + The cash drawer to assign the device to. + """ + cashDrawerId: ID! @gidTypes(types: ["CashDrawer"]) + + """ + The point of sale device to assign. + """ + pointOfSaleDeviceId: ID! @gidTypes(types: ["PointOfSaleDevice"]) + ): PointOfSaleDeviceAssignToCashDrawerPayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + Adds an adjustment to a point of sale device payment session. + """ + pointOfSaleDevicePaymentSessionAdjust( + """ + The amount of cash being added or removed. + """ + cash: MoneyInput! + + """ + The note entered when the adjustment was made. + """ + note: String + + """ + The point of sale device payment session to be adjusted. + """ + pointOfSaleDevicePaymentSessionId: ID! @gidTypes(types: ["PointOfSaleDevicePaymentSession"]) + + """ + The reason code for the adjustment. + """ + reasonCodeId: ID @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) + + """ + The staff member who made the adjustment. + """ + staffMemberId: ID! @gidTypes(types: ["StaffMember"]) + + """ + The time when the adjustment was made. Defaults to the current time. + """ + time: DateTime + ): PointOfSaleDevicePaymentSessionAdjustPayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + Closes a point of sale device payment session. + """ + pointOfSaleDevicePaymentSessionClose( + """ + The counted cash drawer balance when the session was closed. + """ + balance: MoneyInput! + + """ + The note entered when the session was closed. + """ + note: String + + """ + The point of sale device payment session to be closed. + """ + pointOfSaleDevicePaymentSessionId: ID! @gidTypes(types: ["PointOfSaleDevicePaymentSession"]) + + """ + The reason code for closing the session. + """ + reasonCodeId: ID @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) + + """ + The staff member who closed the session. + """ + staffMemberId: ID! @gidTypes(types: ["StaffMember"]) + + """ + When the session was closed. Defaults to the current time. + """ + time: DateTime + ): PointOfSaleDevicePaymentSessionClosePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + Records a mid-session cash count for a point of sale device payment session. + """ + pointOfSaleDevicePaymentSessionCount( + """ + The counted cash drawer balance. + """ + balance: MoneyInput! + + """ + The note entered when the count was performed. + """ + note: String + + """ + The point of sale device payment session to record a count for. + """ + pointOfSaleDevicePaymentSessionId: ID! @gidTypes(types: ["PointOfSaleDevicePaymentSession"]) + + """ + The reason code for the count. + """ + reasonCodeId: ID @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) + + """ + The staff member who performed the count. + """ + staffMemberId: ID! @gidTypes(types: ["StaffMember"]) + + """ + When the count was performed. Defaults to the current time. + """ + time: DateTime + ): PointOfSaleDevicePaymentSessionCountPayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + Opens a point of sale device payment session. + """ + pointOfSaleDevicePaymentSessionOpen( + """ + The counted cash drawer balance when the session was opened. + """ + balance: MoneyInput + + """ + The note entered when the session was opened. + """ + note: String + + """ + The point of sale device to which this session belongs. + """ + pointOfSaleDeviceId: ID! @gidTypes(types: ["PointOfSaleDevice"]) + + """ + The reason code for the session opening. + """ + reasonCodeId: ID @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) + + """ + The staff member who opened the session. + """ + staffMemberId: ID! @gidTypes(types: ["StaffMember"]) + + """ + The time the session was opened. Defaults to the current time. + """ + time: DateTime + ): PointOfSaleDevicePaymentSessionOpenPayload @requiredAccess(scope: "`write_cash_tracking` access scope.") + + """ + Installs storefront generation preview for shop. + """ + previewInstall( + """ + The UUID of the storefront_generation_preview to install. + """ + storefrontGenerationPreviewUuid: String! + ): PreviewInstallPayload @requiredAccess(scope: "`write_online_store` access scope or (`write_themes` access scope and `write_products` access scope).") @privatelyDocumented + + """ + 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 @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") + + """ + 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! @gidTypes(types: ["PriceList"]) + ): PriceListDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to delete catalogs.") + + """ + 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! @gidTypes(types: ["PriceList"]) + + """ + The list of fixed prices to add or update in the price list. + """ + prices: [PriceListPriceInput!]! + ): PriceListFixedPricesAddPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") + + """ + Updates the fixed prices for all variants for a product on a price list. You + can use the `priceListFixedPricesByProductBulkUpdate` mutation to set or + remove a fixed price for all variants of a product associated with the price list. + """ + priceListFixedPricesByProductBulkUpdate( + """ + The price list to update the prices for. + """ + priceListId: ID! @gidTypes(types: ["PriceList"]) + + """ + 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!] @gidTypes(types: ["Product"]) + ): PriceListFixedPricesByProductBulkUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") + + """ + 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( + """ + The price list to update the prices for. + """ + priceListId: ID! @gidTypes(types: ["PriceList"]) + + """ + 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!] @gidTypes(types: ["Product"]) + ): PriceListFixedPricesByProductUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") + + """ + 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! @gidTypes(types: ["PriceList"]) + + """ + A list of product variant IDs whose fixed prices will be removed from the price list. + """ + variantIds: [ID!]! @gidTypes(types: ["ProductVariant"]) + ): PriceListFixedPricesDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to delete catalogs.") + + """ + 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! @gidTypes(types: ["PriceList"]) + + """ + The fixed prices to add. + """ + pricesToAdd: [PriceListPriceInput!]! + + """ + A list of product variant IDs to remove from the price list. + """ + variantIdsToDelete: [ID!]! @gidTypes(types: ["ProductVariant"]) + ): PriceListFixedPricesUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") + + """ + 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! @gidTypes(types: ["PriceList"]) + + """ + The input data used to update the price list. + """ + input: PriceListUpdateInput! + ): PriceListUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") + + """ + Disable a shop's privacy features. + """ + privacyFeaturesDisable( + """ + The list of privacy features to disable. + """ + featuresToDisable: [PrivacyFeaturesEnum!]! + ): PrivacyFeaturesDisablePayload @requiredAccess(scope: "`write_privacy_settings` access scope.") + + """ + 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 @requiredAccess(scope: "`write_products` access scope. Also: The shop must have access to bundles feature.") + + """ + Updates a product bundle or componentized product. + """ + productBundleUpdate( + """ + Input for updating a product bundle or componentized product. + """ + input: ProductBundleUpdateInput! + ): ProductBundleUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The shop must have access to bundles feature.") + + """ + 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! @gidTypes(types: ["Product"]) + + """ + The status to be assigned to the product. + """ + status: ProductStatus! + ): ProductChangeStatusPayload @deprecated(reason: "Use `productUpdate` instead.") @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to change products status.") + + """ + 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 media to add to the product. + """ + media: [CreateMediaInput!] + + """ + The attributes of the new product. + """ + product: ProductCreateInput + + """ + The default preferences in the product create form. + """ + productPreferences: ProductPreferencesInput + ): ProductCreatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create products.") + + """ + 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( + """ + List of new media to be added to a product. + """ + media: [CreateMediaInput!]! + + """ + Specifies the product associated with the media. + """ + productId: ID! @gidTypes(types: ["Product"]) + ): ProductCreateMediaPayload @deprecated(reason: "Use `productUpdate` or `productSet` instead.") @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create media for a product.") + + """ + 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 @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to delete products.") + + """ + 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( + """ + The media IDs to be deleted. + """ + mediaIds: [ID!]! @gidTypes(types: ["Media"]) + + """ + Specifies the product ID from which the media will be deleted. + """ + productId: ID! @gidTypes(types: ["Product"]) + ): ProductDeleteMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to delete media from a product.") + + """ + 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( + """ + Specifies whether or not to duplicate images. + """ + includeImages: Boolean = false + + """ + Specifies whether or not to duplicate translations. + """ + includeTranslations: Boolean = false + + """ + The new status of the product. If no value is provided the status will be inherited from the original product. + """ + newStatus: ProductStatus + + """ + The new title of the product. + """ + newTitle: String! + + """ + The ID of the product to be duplicated. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + Specifies whether or not to run the mutation synchronously. + """ + synchronous: Boolean = true + ): ProductDuplicatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to duplicate a product.") + + """ + Creates a product feed for a specific publication. + """ + productFeedCreate( + """ + The properties of the new product feed. + """ + input: ProductFeedInput + ): ProductFeedCreatePayload @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") + + """ + Deletes a product feed for a specific publication. + """ + productFeedDelete( + """ + The ID of the product feed to be deleted. + """ + id: ID! @gidTypes(types: ["ProductFeed"]) + ): ProductFeedDeletePayload @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") + + """ + 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! @gidTypes(types: ["ProductFeed"]) + + """ + Syncs only products that have changed since the specified timestamp. + """ + updatedAtSince: DateTime + ): ProductFullSyncPayload @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") + + """ + Adds multiple selling plan groups to a product. + """ + productJoinSellingPlanGroups( + """ + The ID of the product. + """ + id: ID! @gidTypes(types: ["Product"]) + + """ + The IDs of the selling plan groups to add. + """ + sellingPlanGroupIds: [ID!]! @gidTypes(types: ["SellingPlanGroup"]) + ): ProductJoinSellingPlanGroupsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + Removes multiple groups from a product. + """ + productLeaveSellingPlanGroups( + """ + The ID of the product. + """ + id: ID! @gidTypes(types: ["Product"]) + + """ + The IDs of the selling plan groups to add. + """ + sellingPlanGroupIds: [ID!]! @gidTypes(types: ["SellingPlanGroup"]) + ): ProductLeaveSellingPlanGroupsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + 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! + + """ + New option values to create. + """ + optionValuesToAdd: [OptionValueCreateInput!] + + """ + IDs of the existing option values to delete. + """ + optionValuesToDelete: [ID!] @gidTypes(types: ["ProductOptionValue"]) + + """ + Existing option values to update. + """ + optionValuesToUpdate: [OptionValueUpdateInput!] + + """ + The ID of the Product the Option belongs to. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + The strategy defines which behavior the mutation should observe regarding variants, + such as creating variants or deleting them in response to option values to add or to delete. + If not provided or set to null, the strategy `LEAVE_AS_IS` will be used. + """ + variantStrategy: ProductOptionUpdateVariantStrategy + ): ProductOptionUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to edit products and manage product variants.") + + """ + 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( + """ + Options to add to the product. + """ + options: [OptionCreateInput!]! + + """ + The ID of the product to update. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + The strategy defines which behavior the mutation should observe regarding variants. + If not provided or set to null, the strategy `LEAVE_AS_IS` will be used. + """ + variantStrategy: ProductOptionCreateVariantStrategy = LEAVE_AS_IS + ): ProductOptionsCreatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create product variants.") + + """ + 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( + """ + IDs of the options to delete from the product. + """ + options: [ID!]! @gidTypes(types: ["ProductOption"]) + + """ + ID of the product from which to delete the options. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + 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 @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to edit products and delete product variants.") + + """ + 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( + """ + Options to reorder on the product. + """ + options: [OptionReorderInput!]! + + """ + The ID of the product to update. + """ + productId: ID! @gidTypes(types: ["Product"]) + ): ProductOptionsReorderPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to update product variants.") + + """ + 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.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to publish a product.") + + """ + 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! @gidTypes(types: ["Product"]) + + """ + A list of moves to perform which will be evaluated in order. + """ + moves: [MoveInput!]! + ): ProductReorderMediaPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to reorder the media attached to a product.") + + """ + 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( + """ + Specifies the identifier that will be used to lookup the resource. + """ + identifier: ProductSetIdentifiers + + """ + The properties of the newly created or updated product. + """ + input: ProductSetInput! + + """ + The default preferences in the product create form. + """ + productPreferences: ProductPreferencesInput + + """ + Whether the mutation should be run synchronously or asynchronously. + + If `true`, the mutation will return the updated `product`. + + If `false`, the mutation will return a `productSetOperation`. + + Defaults to `true`. + + Setting `synchronous: false` may be desirable depending on the input + complexity/size, and should be used if you are experiencing timeouts. + + **Note**: When run in the context of a + [bulk operation](https://shopify.dev/api/usage/bulk-operations/imports), the mutation will + always run synchronously and this argument will be ignored. + """ + synchronous: Boolean = true + ): ProductSetPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create products.") + + """ + Unpublishes a product. + """ + productUnpublish( + """ + Specifies the product to unpublish and the channel to unpublish it from. + """ + input: ProductUnpublishInput! + ): ProductUnpublishPayload @deprecated(reason: "Use `publishableUnpublish` instead.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to unpublish a product.") + + """ + 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( + """ + Specifies the identifier that will be used to lookup the resource. + """ + identifier: ProductUpdateIdentifiers + + """ + The updated properties for a product. + """ + input: ProductInput @deprecated(reason: "Use `product` instead.") + + """ + List of new media to be added to the product. + """ + media: [CreateMediaInput!] + + """ + The updated properties for a product. + """ + product: ProductUpdateInput + + """ + User product configuration settings. + """ + productPreferences: ProductPreferencesInput + ): ProductUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to update products.") + + """ + 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( + """ + A list of media updates. + """ + media: [UpdateMediaInput!]! + + """ + Specifies the product on which media will be updated. + """ + productId: ID! @gidTypes(types: ["Product"]) + ): ProductUpdateMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to update media for a product.") + + """ + 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! @gidTypes(types: ["Product"]) + + """ + A list of pairs of variants and media to be attached to the variants. + """ + variantMedia: [ProductVariantAppendMediaInput!]! + ): ProductVariantAppendMediaPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to append media to variants.") + + """ + Detaches media from product variants. + """ + productVariantDetachMedia( + """ + Specifies the product to which the variants and media are associated. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + A list of pairs of variants and media to be deleted from the variants. + """ + variantMedia: [ProductVariantDetachMediaInput!]! + ): ProductVariantDetachMediaPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to detach media from product variants.") + + """ + Adds multiple selling plan groups to a product variant. + """ + productVariantJoinSellingPlanGroups( + """ + The ID of the product variant. + """ + id: ID! @gidTypes(types: ["ProductVariant"]) + + """ + The IDs of the selling plan groups to add. + """ + sellingPlanGroupIds: [ID!]! @gidTypes(types: ["SellingPlanGroup"]) + ): ProductVariantJoinSellingPlanGroupsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + Remove multiple groups from a product variant. + """ + productVariantLeaveSellingPlanGroups( + """ + The ID of the product variant. + """ + id: ID! @gidTypes(types: ["ProductVariant"]) + + """ + The IDs of the selling plan groups to leave. + """ + sellingPlanGroupIds: [ID!]! @gidTypes(types: ["SellingPlanGroup"]) + ): ProductVariantLeaveSellingPlanGroupsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + 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 @requiredAccess(scope: "`write_products` access scope. Also: The shop must have access to bundles feature.") + + """ + 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( + """ + List of new media to be added to the product. + """ + media: [CreateMediaInput!] + + """ + The ID of the product on which to create the variants. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + 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 + + """ + An array of product variants to be created. + """ + variants: [ProductVariantsBulkInput!]! + ): ProductVariantsBulkCreatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create product variants.") + + """ + 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( + """ + The ID of the product with the variants to update. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + An array of product variants IDs to delete. + """ + variantsIds: [ID!]! @gidTypes(types: ["ProductVariant"]) + ): ProductVariantsBulkDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to delete product variants.") + + """ + Reorders multiple variants in a single product. This mutation can be called directly or via the bulkOperation. + """ + productVariantsBulkReorder( + """ + An array of variant positions. + """ + positions: [ProductVariantPositionInput!]! + + """ + The product ID of the variants to be reordered. + """ + productId: ID! @gidTypes(types: ["Product"]) + ): ProductVariantsBulkReorderPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to reorder product variants.") + + """ + 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( + """ + When partial updates are allowed, valid variant changes may be persisted even if some of + the variants updated have invalid data and cannot be persisted. + When partial updates are not allowed, any error will prevent all variants from updating. + """ + allowPartialUpdates: Boolean = false + + """ + List of new media to be added to the product. + """ + media: [CreateMediaInput!] + + """ + The ID of the product associated with the variants to update. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + An array of product variants to update. + """ + variants: [ProductVariantsBulkInput!]! + ): ProductVariantsBulkUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to update product variants.") + + """ + 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 @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the read_customer_events and write_server_pixels access scopes.") + + """ + 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! @gidTypes(types: ["WebhookSubscription"]) + + """ + 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 @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit catalogs.") + + """ + Deletes a publication. + """ + publicationDelete( + """ + The ID of the publication to delete. + """ + id: ID! @gidTypes(types: ["Publication"]) + ): PublicationDeletePayload @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit catalogs.") + + """ + 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! @gidTypes(types: ["Publication"]) + + """ + The input fields to use when updating the publication. + """ + input: PublicationUpdateInput! + ): PublicationUpdatePayload @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit catalogs.") + + """ + 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! @gidTypes(types: ["Product", "Collection", "ProductVariant"]) + + """ + Specifies the input fields required to publish a resource. + """ + input: [PublicationInput!]! + ): PublishablePublishPayload @requiredAccess(scope: "`write_publications` access scope. Also: The user must have permission to create and edit products or create and edit catalogs.") + + """ + 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! @gidTypes(types: ["Product", "Collection", "ProductVariant"]) + ): PublishablePublishToCurrentChannelPayload @deprecated(reason: "Use `publishablePublish` instead.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit products.") + + """ + 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! @gidTypes(types: ["Product", "Collection", "ProductVariant"]) + + """ + Specifies the input fields required to unpublish a resource. + """ + input: [PublicationInput!]! + ): PublishableUnpublishPayload @requiredAccess(scope: "`write_publications` access scope. Also: The user must have permission to create and edit products or create and edit catalogs.") + + """ + 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! @gidTypes(types: ["Product", "Collection", "ProductVariant"]) + ): PublishableUnpublishToCurrentChannelPayload @deprecated(reason: "Use `publishableUnpublish` instead.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit products.") + + """ + 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 input data used to update the quantity pricing in the price list. + """ + input: QuantityPricingByVariantUpdateInput! + + """ + The ID of the price list for which quantity pricing will be updated. + """ + priceListId: ID! @gidTypes(types: ["PriceList"]) + ): QuantityPricingByVariantUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs, and the shop requires B2B features enabled.") + + """ + 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! @gidTypes(types: ["PriceList"]) + + """ + The list of quantity rules to add or update in the price list. + """ + quantityRules: [QuantityRuleInput!]! + ): QuantityRulesAddPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs, and the shop requires B2B features enabled.") + + """ + 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! @gidTypes(types: ["PriceList"]) + + """ + A list of product variant IDs whose quantity rules will be removed from the price list. + """ + variantIds: [ID!]! @gidTypes(types: ["ProductVariant"]) + ): QuantityRulesDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs, and the shop requires B2B features enabled.") + + """ + 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 @requiredAccess(scope: "`orders` access scope, `marketplace_orders` access scope or `buyer_membership_orders` access scope.") + + """ + Removes return and/or exchange lines from a return. + """ + removeFromReturn( + """ + The exchange line items to remove from the return. + """ + exchangeLineItems: [ExchangeLineItemRemoveFromReturnInput!] + + """ + The ID of the return for line item removal. + """ + returnId: ID! @gidTypes(types: ["Return"]) + + """ + The return line items to remove from the return. + """ + returnLineItems: [ReturnLineItemRemoveFromReturnInput!] + ): RemoveFromReturnPayload @requiredAccess(scope: "`write_returns` access scope. Also: The user must have `return_orders` permission.") + + """ + 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + 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! @gidTypes(types: ["Return"]) + + """ + 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + 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! @gidTypes(types: ["Return"]) + ): ReturnClosePayload @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + Removes return lines from a return. + """ + returnLineItemRemoveFromReturn( + """ + The ID of the return for line item removal. + """ + returnId: ID! @gidTypes(types: ["Return"]) + + """ + The return line items to remove from the return. + """ + returnLineItems: [ReturnLineItemRemoveFromReturnInput!]! + ): ReturnLineItemRemoveFromReturnPayload @deprecated(reason: "Use `removeFromReturn` instead.") @requiredAccess(scope: "`write_returns` access scope. Also: The user must have `return_orders` permission.") + + """ + 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + 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.") @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope. Also: The user must have `refund_orders` permission.") + + """ + Reopens a closed return. + """ + returnReopen( + """ + The ID of the return to reopen. + """ + id: ID! @gidTypes(types: ["Return"]) + ): ReturnReopenPayload @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + Creates a new reverse delivery with associated external shipping information. + """ + reverseDeliveryCreateWithShipping( + """ + 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 + + """ + The reverse delivery line items to be created. If an empty array is provided, then this mutation + will create a reverse delivery line item for each reverse fulfillment order line item, with its quantity equal + to the reverse fulfillment order line item total quantity. + """ + reverseDeliveryLineItems: [ReverseDeliveryLineItemInput!]! + + """ + The ID of the reverse fulfillment order that's associated to the reverse delivery. + """ + reverseFulfillmentOrderId: ID! @gidTypes(types: ["ReverseFulfillmentOrder"]) + + """ + The tracking information for the reverse delivery. + """ + trackingInput: ReverseDeliveryTrackingInput = null + ): ReverseDeliveryCreateWithShippingPayload @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + Updates a reverse delivery with associated external shipping information. + """ + reverseDeliveryShippingUpdate( + """ + 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 + + """ + The ID of the reverse delivery to update. + """ + reverseDeliveryId: ID! @gidTypes(types: ["ReverseDelivery"]) + + """ + The tracking information for the reverse delivery. + """ + trackingInput: ReverseDeliveryTrackingInput = null + ): ReverseDeliveryShippingUpdatePayload @requiredAccess(scope: "`write_returns` access scope.") + + """ + Disposes reverse fulfillment order line items. + """ + reverseFulfillmentOrderDispose( + """ + The input parameters required to dispose reverse fulfillment order line items. + """ + dispositionInputs: [ReverseFulfillmentOrderDisposeInput!]! + ): ReverseFulfillmentOrderDisposePayload @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") + + """ + 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 @requiredAccess(scope: "`write_script_tags` access scope. Also: Requires access to script tags.") + + """ +

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! @gidTypes(types: ["ScriptTag"]) + ): ScriptTagDeletePayload @requiredAccess(scope: "`write_script_tags` access scope. Also: Requires access to script tags.") + + """ +

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! @gidTypes(types: ["ScriptTag"]) + + """ + Specifies the input fields for a script tag. + """ + input: ScriptTagInput! + ): ScriptTagUpdatePayload @requiredAccess(scope: "`write_script_tags` access scope. Also: Requires access to script tags.") + + """ + 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 @requiredAccess(scope: "`write_customers` access scope. Also: The user must not have restricted access.") + + """ + Deletes a segment. + """ + segmentDelete( + """ + Specifies the segment to delete. + """ + id: ID! @gidTypes(types: ["Segment"]) + ): SegmentDeletePayload @requiredAccess(scope: "`write_customers` access scope. Also: The user must not have restricted access.") + + """ + Updates a segment. + """ + segmentUpdate( + """ + Specifies the segment to be updated. + """ + id: ID! @gidTypes(types: ["Segment"]) + + """ + 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 @requiredAccess(scope: "`write_customers` access scope. Also: The user must not have restricted access.") + + """ + Adds multiple product variants to a selling plan group. + """ + sellingPlanGroupAddProductVariants( + """ + The ID of the selling plan group. + """ + id: ID! @gidTypes(types: ["SellingPlanGroup"]) + + """ + The IDs of the product variants to add. + """ + productVariantIds: [ID!]! @gidTypes(types: ["ProductVariant"]) + ): SellingPlanGroupAddProductVariantsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + Adds multiple products to a selling plan group. + """ + sellingPlanGroupAddProducts( + """ + The ID of the selling plan group. + """ + id: ID! @gidTypes(types: ["SellingPlanGroup"]) + + """ + The IDs of the products to add. + """ + productIds: [ID!]! @gidTypes(types: ["Product"]) + ): SellingPlanGroupAddProductsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + 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 @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + Delete a Selling Plan Group. This does not affect subscription contracts. + """ + sellingPlanGroupDelete( + """ + The id of the selling plan group to delete. + """ + id: ID! @gidTypes(types: ["SellingPlanGroup"]) + ): SellingPlanGroupDeletePayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + Removes multiple product variants from a selling plan group. + """ + sellingPlanGroupRemoveProductVariants( + """ + The ID of the selling plan group. + """ + id: ID! @gidTypes(types: ["SellingPlanGroup"]) + + """ + The IDs of the product variants to remove. + """ + productVariantIds: [ID!]! @gidTypes(types: ["ProductVariant"]) + ): SellingPlanGroupRemoveProductVariantsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + Removes multiple products from a selling plan group. + """ + sellingPlanGroupRemoveProducts( + """ + The ID of the selling plan group. + """ + id: ID! @gidTypes(types: ["SellingPlanGroup"]) + + """ + The IDs of the products to remove. + """ + productIds: [ID!]! @gidTypes(types: ["Product"]) + ): SellingPlanGroupRemoveProductsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + Update a Selling Plan Group. + """ + sellingPlanGroupUpdate( + """ + The Selling Plan Group to update. + """ + id: ID! @gidTypes(types: ["SellingPlanGroup"]) + + """ + The properties of the Selling Plan Group to update. + """ + input: SellingPlanGroupInput! + ): SellingPlanGroupUpdatePayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") + + """ + 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 @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the read_customer_events access scope, write_server_pixels access scope, and user access permission.") + + """ + Deletes the Server Pixel associated with the current app & shop. + """ + serverPixelDelete: ServerPixelDeletePayload @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the write_server_pixels access scope, and user access permission.") + + """ + Deletes a shipping package. + """ + shippingPackageDelete( + """ + The ID of the shipping package to remove. + """ + id: ID! @gidTypes(types: ["ShippingPackageV2"]) + ): ShippingPackageDeletePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") + + """ + 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! @gidTypes(types: ["ShippingPackageV2"]) + ): ShippingPackageMakeDefaultPayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") + + """ + Updates a shipping package. + """ + shippingPackageUpdate( + """ + The ID of the shipping package to update. + """ + id: ID! @gidTypes(types: ["ShippingPackageV2"]) + + """ + Specifies the input fields for a shipping package. + """ + shippingPackage: CustomShippingPackageInput! + ): ShippingPackageUpdatePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") + + """ + 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 @requiredAccess(scope: "`write_locales` access scope.") + + """ + 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!] @gidTypes(types: ["WebPresence"]) + ): ShopLocaleEnablePayload @requiredAccess(scope: "`write_locales` access scope.") + + """ + 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 @requiredAccess(scope: "`write_locales` access scope.") + + """ + Updates a shop policy. + """ + shopPolicyUpdate( + """ + The properties to use when updating the shop policy. + """ + shopPolicy: ShopPolicyInput! + ): ShopPolicyUpdatePayload @requiredAccess(scope: "`write_legal_policies` access scope.") + + """ + 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 @requiredAccess(scope: "`write_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") + + """ + Creates a Shop Users API access token for a specific Shop user. + """ + shopUserAccessTokenCreate( + """ + The email address of the Shop account. + """ + email: String! + ): ShopUserAccessTokenCreatePayload + + """ + 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 @requiredAccess(scope: "`write_shopify_payments_tooling` access scope.") + + """ + 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 access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: StandardMetafieldDefinitionAccessInput + + """ + The capabilities of the metafield definition. + """ + capabilities: MetafieldCapabilityCreateInput + + """ + The ID of the standard metafield definition template to enable. + """ + id: ID @gidTypes(types: ["StandardMetafieldDefinitionTemplate"]) + + """ + The key of the standard metafield to enable. Used in combination with `namespace`. + """ + key: String + + """ + The namespace of the standard metafield to enable. Used in combination with `key`. + """ + namespace: String + + """ + The resource type that the metafield definition is scoped to. + """ + ownerType: MetafieldOwnerType! + + """ + Whether to pin the metafield definition. + """ + pin: Boolean = null + + """ + Whether the metafield definition can be used as a collection condition. Defaults to false. + """ + useAsCollectionCondition: Boolean = null @deprecated(reason: "Use `capabilities.smartCollectionCondition` instead.") + + """ + Whether metafields for the definition are visible using the Storefront API. + """ + visibleToStorefrontApi: Boolean = null @deprecated(reason: "Use `access.storefront` instead.") + ): StandardMetafieldDefinitionEnablePayload @requiredAccess(scope: "API client to have access to the resource type associated with the metafield definition owner type.") + + """ + Enables multiple specified standard metafield definitions from their templates as a single transaction. + This API is idempotent so any previously-enabled standard definitions will not cause a failure. However, + invalid inputs or other user errors will prevent all of the requested definitions from being enabled. + + Refer to the [list of standard metafield definition templates](https://shopify.dev/apps/metafields/definitions/standard-definitions). + """ + standardMetafieldDefinitionsEnable( + """ + The list of standard definitions to enable. Maximum of 25. + """ + definitions: [StandardMetafieldDefinitionsEnableInput!]! + ): StandardMetafieldDefinitionsEnablePayload @requiredAccess(scope: "API client to have access to the resource type associated with the metafield definition owner type.") + + """ + Enables the specified standard metaobject definition from its template. + """ + standardMetaobjectDefinitionEnable( + """ + The type of the metaobject definition to enable. + """ + type: String! + ): StandardMetaobjectDefinitionEnablePayload @requiredAccess(scope: "`write_metaobject_definitions` access scope.") + + """ + 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 input fields for a store credit account credit transaction. + """ + creditInput: StoreCreditAccountCreditInput! + + """ + The ID of the store credit account or the ID of the account owner. + """ + id: ID! @gidTypes(types: ["StoreCreditAccount", "HasStoreCreditAccounts"]) + ): StoreCreditAccountCreditPayload @requiredAccess(scope: "`write_store_credit_account_transactions` access scope.") + + """ + Creates a debit transaction that decreases the store credit account balance by the given amount. + """ + storeCreditAccountDebit( + """ + The input fields for a store credit account debit transaction. + """ + debitInput: StoreCreditAccountDebitInput! + + """ + The ID of the store credit account or the ID of the account owner. + """ + id: ID! @gidTypes(types: ["StoreCreditAccount", "HasStoreCreditAccounts"]) + ): StoreCreditAccountDebitPayload @requiredAccess(scope: "`write_store_credit_account_transactions` access scope.") + + """ + 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 information to apply as a billing attempt. + """ + subscriptionBillingAttemptInput: SubscriptionBillingAttemptInput! + + """ + The ID of the subscription contract. + """ + subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) + ): SubscriptionBillingAttemptCreatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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( + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + 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 + + """ + Selected payment processing policy for the billing attempt. Defaults to FAIL_UNLESS_VALID_PAYMENT_METHOD. + """ + paymentProcessingPolicy: SubscriptionBillingAttemptPaymentProcessingPolicy = FAIL_UNLESS_VALID_PAYMENT_METHOD + ): SubscriptionBillingCycleBulkChargePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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 @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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 actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + Select the specific billing cycle to be billed. + If 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 + + """ + Select payment processing policy for the billing attempt. Defaults to FAIL_UNLESS_VALID_PAYMENT_METHOD. + """ + paymentProcessingPolicy: SubscriptionBillingAttemptPaymentProcessingPolicy + + """ + The ID of the subscription contract. + """ + subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) + ): SubscriptionBillingCycleChargePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Commits the updates of a Subscription Billing Cycle Contract draft. + """ + subscriptionBillingCycleContractDraftCommit( + """ + The gid of the Subscription Contract draft to commit. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + ): SubscriptionBillingCycleContractDraftCommitPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Concatenates a contract to a Subscription Draft. + """ + subscriptionBillingCycleContractDraftConcatenate( + """ + An array of Subscription Contracts with their selected billing cycles to concatenate to the subscription draft. + """ + concatenatedBillingCycleContracts: [SubscriptionBillingCycleInput!]! + + """ + The gid of the Subscription Contract draft to update. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + ): SubscriptionBillingCycleContractDraftConcatenatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Edit the contents of a subscription contract for the specified billing cycle. + """ + subscriptionBillingCycleContractEdit( + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleContractEditPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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 @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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! @gidTypes(types: ["SubscriptionContract"]) + + """ + Select billing cycles to be deleted. + """ + targetSelection: SubscriptionBillingCyclesTargetSelection! + ): SubscriptionBillingCycleEditsDeletePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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 @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Skips a Subscription Billing Cycle. + """ + subscriptionBillingCycleSkip( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleSkipPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Unskips a Subscription Billing Cycle. + """ + subscriptionBillingCycleUnskip( + """ + Input object for selecting and using billing cycles. + """ + billingCycleInput: SubscriptionBillingCycleInput! + ): SubscriptionBillingCycleUnskipPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Activates a Subscription Contract. Contract status must be either active, paused, or failed. + """ + subscriptionContractActivate( + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) + ): SubscriptionContractActivatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Creates a Subscription Contract. + """ + subscriptionContractAtomicCreate( + """ + The properties of the new Subscription Contract. + """ + input: SubscriptionContractAtomicCreateInput! + ): SubscriptionContractAtomicCreatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Cancels a Subscription Contract. + """ + subscriptionContractCancel( + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) + ): SubscriptionContractCancelPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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 @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Expires a Subscription Contract. + """ + subscriptionContractExpire( + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) + ): SubscriptionContractExpirePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Fails a Subscription Contract. + """ + subscriptionContractFail( + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) + ): SubscriptionContractFailPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Pauses a Subscription Contract. + """ + subscriptionContractPause( + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + The ID of the Subscription Contract. + """ + subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) + ): SubscriptionContractPausePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Allows for the easy change of a Product in a Contract or a Product price change. + """ + subscriptionContractProductChange( + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + The properties of the Product changes. + """ + input: SubscriptionContractProductChangeInput! + + """ + The gid of the Subscription Line to update. + """ + lineId: ID! @gidTypes(types: ["SubscriptionLine"]) + + """ + The ID of the subscription contract. + """ + subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) + ): SubscriptionContractProductChangePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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! @gidTypes(types: ["SubscriptionContract"]) + + """ + The next billing date. + """ + date: DateTime! + ): SubscriptionContractSetNextBillingDatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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 actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + The gid of the Subscription Contract to update. + """ + contractId: ID! @gidTypes(types: ["SubscriptionContract"]) + ): SubscriptionContractUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Commits the updates of a Subscription Contract draft. + """ + subscriptionDraftCommit( + """ + The gid of the Subscription Contract draft to commit. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + ): SubscriptionDraftCommitPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Adds a subscription discount to a subscription draft. + """ + subscriptionDraftDiscountAdd( + """ + The ID of the Subscription Contract draft to add a subscription discount to. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + + """ + The properties of the new Subscription Discount. + """ + input: SubscriptionManualDiscountInput! + ): SubscriptionDraftDiscountAddPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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! @gidTypes(types: ["SubscriptionDraft"]) + + """ + Code discount redeem code. + """ + redeemCode: String! + ): SubscriptionDraftDiscountCodeApplyPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Removes a subscription discount from a subscription draft. + """ + subscriptionDraftDiscountRemove( + """ + The gid of the subscription draft discount to remove. + """ + discountId: ID! @gidTypes(types: ["SubscriptionManualDiscount", "SubscriptionAppliedCodeDiscount"]) + + """ + The gid of the subscription contract draft to remove a subscription discount from. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + ): SubscriptionDraftDiscountRemovePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Updates a subscription discount on a subscription draft. + """ + subscriptionDraftDiscountUpdate( + """ + The gid of the Subscription Discount to update. + """ + discountId: ID! @gidTypes(types: ["SubscriptionManualDiscount", "SubscriptionAppliedCodeDiscount"]) + + """ + The ID of the Subscription Contract draft to update a subscription discount on. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + + """ + The properties to update on the Subscription Discount. + """ + input: SubscriptionManualDiscountInput! + ): SubscriptionDraftDiscountUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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! @gidTypes(types: ["SubscriptionDraft"]) + + """ + The properties of the new subscription free shipping discount. + """ + input: SubscriptionFreeShippingDiscountInput! + ): SubscriptionDraftFreeShippingDiscountAddPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Updates a subscription free shipping discount on a subscription draft. + """ + subscriptionDraftFreeShippingDiscountUpdate( + """ + The gid of the Subscription Discount to update. + """ + discountId: ID! @gidTypes(types: ["SubscriptionManualDiscount", "SubscriptionAppliedCodeDiscount"]) + + """ + The ID of the Subscription Contract draft to update a subscription discount on. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + + """ + The properties to update on the Subscription Free Shipping Discount. + """ + input: SubscriptionFreeShippingDiscountInput! + ): SubscriptionDraftFreeShippingDiscountUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Adds a subscription line to a subscription draft. + """ + subscriptionDraftLineAdd( + """ + The gid of the Subscription Contract draft to add a subscription line to. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + + """ + The properties of the new Subscription Line. + """ + input: SubscriptionLineInput! + ): SubscriptionDraftLineAddPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Removes a subscription line from a subscription draft. + """ + subscriptionDraftLineRemove( + """ + The gid of the Subscription Contract draft to remove a subscription line from. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + + """ + The gid of the Subscription Line to remove. + """ + lineId: ID! @gidTypes(types: ["SubscriptionLine"]) + ): SubscriptionDraftLineRemovePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Updates a subscription line on a subscription draft. + """ + subscriptionDraftLineUpdate( + """ + The gid of the Subscription Contract draft to update a subscription line from. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + + """ + The properties of the new Subscription Line. + """ + input: SubscriptionLineUpdateInput! + + """ + The gid of the Subscription Line to update. + """ + lineId: ID! @gidTypes(types: ["SubscriptionLine"]) + ): SubscriptionDraftLineUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + Updates a Subscription Draft. + """ + subscriptionDraftUpdate( + """ + The gid of the Subscription Draft to update. + """ + draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) + + """ + The properties of the new Subscription Contract. + """ + input: SubscriptionDraftInput! + ): SubscriptionDraftUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") + + """ + 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), [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article), and [`DiscountNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountNode). + """ + id: ID! @gidTypes(types: ["Order", "Customer", "Product", "DraftOrder", "Article", "Article", "DiscountNode"]) + + """ + 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), [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article), and [`DiscountNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountNode). + """ + id: ID! @gidTypes(types: ["Order", "Customer", "Product", "DraftOrder", "Article", "Article", "DiscountNode"]) + + """ + 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 @requiredAccess(scope: "`write_taxes` access scope. Also: The caller must be a tax calculations app.") + + """ + 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 end time of the range of orders to create the tax summary for. + """ + endTime: DateTime + + """ + The ID of the order to create the tax summary for. + """ + orderId: ID @gidTypes(types: ["Order"]) + + """ + The start time of the range of orders to create the tax summary for. + """ + startTime: DateTime + ): TaxSummaryCreatePayload @requiredAccess(scope: "`write_taxes` access scope. Also: The caller must be a tax calculations app and the relevant feature must be on.") + + """ + 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( + """ + 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 + + """ + An external URL or a + [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate) + of the theme to import. + """ + source: URL! + ): ThemeCreatePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") + + """ + Deletes a theme. + """ + themeDelete( + """ + The ID of the theme to be deleted. + """ + id: ID! @gidTypes(types: ["ThemeType"]) + ): ThemeDeletePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") + + """ + Duplicates a theme. + """ + themeDuplicate( + """ + ID of the theme to be duplicated. + """ + id: ID! @gidTypes(types: ["ThemeType"]) + + """ + Name of the new theme. + """ + name: String + ): ThemeDuplicatePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") + + """ + Copy theme files. Copying to existing theme files will overwrite them. + """ + themeFilesCopy( + """ + The files to update. + """ + files: [ThemeFilesCopyFileInput!]! + + """ + The theme to update. + """ + themeId: ID! @gidTypes(types: ["ThemeType"]) + ): ThemeFilesCopyPayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify theme files.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") + + """ + Deletes a theme's files. + """ + themeFilesDelete( + """ + The files to delete. + """ + files: [String!]! + + """ + Specifies the theme to deleted. + """ + themeId: ID! @gidTypes(types: ["ThemeType"]) + ): ThemeFilesDeletePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify theme files.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") + + """ + 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 files to update. + """ + files: [OnlineStoreThemeFilesUpsertFileInput!]! + + """ + The theme to update. + """ + themeId: ID! @gidTypes(types: ["ThemeType"]) + ): ThemeFilesUpsertPayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify theme files.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") + + """ + Publishes a theme. + """ + themePublish( + """ + ID of the theme to be published. + """ + id: ID! @gidTypes(types: ["ThemeType"]) + ): ThemePublishPayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") + + """ + Updates a theme. + """ + themeUpdate( + """ + The ID of the theme to be updated. + """ + id: ID! @gidTypes(types: ["ThemeType"]) + + """ + The attributes of the theme to be updated. + """ + input: OnlineStoreThemeInput! + ): ThemeUpdatePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") + + """ + Trigger the voiding of an uncaptured authorization transaction. + """ + transactionVoid( + """ + An uncaptured authorization transaction. + """ + parentTransactionId: ID! @gidTypes(types: ["OrderTransaction"]) + ): TransactionVoidPayload @requiredAccess(scope: "`write_orders` access scope. Also: The user must have permission to cancel orders.") + + """ + 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! @gidTypes(types: ["Article", "ArticleImage", "Blog", "Brand", "Collection", "CollectionImage", "CookieBanner", "MethodDefinition", "EmailTemplate", "FilterSetting", "FilterSettingGroup", "Link", "MediaImage", "Menu", "TranslatableMetafieldProxy", "Metaobject", "Article", "OnlineStoreBlog", "Menu", "OnlineStorePage", "ThemeType", "AppEmbed", "JsonTemplate", "ThemeLocaleContent", "SectionGroup", "ThemeSettingsCategory", "ThemeSettingsDataSections", "PackingSlipTemplate", "Page", "PaymentGateway", "Product", "ProductOption", "ProductOptionValue", "SellingPlan", "SellingPlanGroup", "Shop", "ShopPolicy", "SmsTemplate"]) + + """ + Specifies the input fields for a translation. + """ + translations: [TranslationInput!]! + ): TranslationsRegisterPayload @requiredAccess(scope: "`write_translations` access scope.") + + """ + Deletes translations. + """ + translationsRemove( + """ + The list of translation locales. Only locales returned in `shopLocales` are valid. + """ + locales: [String!]! + + """ + The list of market IDs. + """ + marketIds: [ID!] @gidTypes(types: ["Market"]) + + """ + ID of the translatable resource for which translations are being deleted. + """ + resourceId: ID! @gidTypes(types: ["Article", "ArticleImage", "Blog", "Brand", "Collection", "CollectionImage", "CookieBanner", "MethodDefinition", "EmailTemplate", "FilterSetting", "FilterSettingGroup", "Link", "MediaImage", "Menu", "TranslatableMetafieldProxy", "Metaobject", "Article", "OnlineStoreBlog", "Menu", "OnlineStorePage", "ThemeType", "AppEmbed", "JsonTemplate", "ThemeLocaleContent", "SectionGroup", "ThemeSettingsCategory", "ThemeSettingsDataSections", "PackingSlipTemplate", "Page", "PaymentGateway", "Product", "ProductOption", "ProductOptionValue", "SellingPlan", "SellingPlanGroup", "Shop", "ShopPolicy", "SmsTemplate"]) + + """ + The list of translation keys. + """ + translationKeys: [String!]! + ): TranslationsRemovePayload @requiredAccess(scope: "`write_translations` access scope.") + + """ + Asynchronously delete [URL redirects](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) in bulk. + """ + urlRedirectBulkDeleteAll: UrlRedirectBulkDeleteAllPayload @requiredAccess(scope: "`write_online_store_navigation` access scope. Also: Requires an active user.") + + """ + 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`]( + https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect + ) object IDs to delete. + """ + ids: [ID!]! @gidTypes(types: ["UrlRedirect"]) + ): UrlRedirectBulkDeleteByIdsPayload @requiredAccess(scope: "`write_online_store_navigation` access scope. Also: Requires an active user.") + + """ + Asynchronously delete redirects in bulk. + """ + urlRedirectBulkDeleteBySavedSearch( + """ + The ID of the URL redirect saved search for filtering. + """ + savedSearchId: ID! @gidTypes(types: ["SavedSearch"]) + ): UrlRedirectBulkDeleteBySavedSearchPayload @requiredAccess(scope: "`write_online_store_navigation` access scope. Also: Requires an active user.") + + """ + Asynchronously delete redirects in bulk. + """ + urlRedirectBulkDeleteBySearch( + """ + Search query for filtering redirects on (both Redirect from and Redirect to fields). + """ + search: String! + ): UrlRedirectBulkDeleteBySearchPayload @requiredAccess(scope: "`write_online_store_navigation` access scope. Also: Requires an active user.") + + """ + 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 @requiredAccess(scope: "`write_online_store_navigation` access scope.") + + """ + Deletes a [`UrlRedirect`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) object. + """ + urlRedirectDelete( + """ + The ID of the redirect to delete. + """ + id: ID! @gidTypes(types: ["UrlRedirect"]) + ): UrlRedirectDeletePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") + + """ + 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. + You can download [a sample URL redirect CSV file](https://help.shopify.com/csv/sample-redirect-template.csv). + """ + url: URL! + ): UrlRedirectImportCreatePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") + + """ + 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! @gidTypes(types: ["UrlRedirectImport"]) + ): UrlRedirectImportSubmitPayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") + + """ + Updates a URL redirect. + """ + urlRedirectUpdate( + """ + The ID of the URL redirect to update. + """ + id: ID! @gidTypes(types: ["UrlRedirect"]) + + """ + The input fields required to update the URL redirect. + """ + urlRedirect: UrlRedirectInput! + ): UrlRedirectUpdatePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") + + """ + Creates a validation. + """ + validationCreate( + """ + The input fields for a new validation. + """ + validation: ValidationCreateInput! + ): ValidationCreatePayload @requiredAccess(scope: "`write_validations` access scope.") + + """ + Deletes a validation. + """ + validationDelete( + """ + The ID representing the installed validation. + """ + id: ID! + ): ValidationDeletePayload @requiredAccess(scope: "`write_validations` access scope.") + + """ + Update a validation. + """ + validationUpdate( + """ + The ID representing the validation to update. + """ + id: ID! + + """ + The input fields to update a validation. + """ + validation: ValidationUpdateInput! + ): ValidationUpdatePayload @requiredAccess(scope: "`write_validations` access scope.") + + """ + 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 @requiredAccess(scope: "`write_pixels` access scope. Also: The app requires read_customer_events access scope and user access permission.") + + """ + Deletes the web pixel shop settings. + """ + webPixelDelete( + """ + The ID of the web pixel to delete. + """ + id: ID! @gidTypes(types: ["WebPixel"]) + ): WebPixelDeletePayload @requiredAccess(scope: "`write_pixels` access scope. Also: The app requires user access permission.") + + """ + 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! @gidTypes(types: ["WebPixel"]) + + """ + The web pixel settings in JSON format. + """ + webPixel: WebPixelInput! + ): WebPixelUpdatePayload @requiredAccess(scope: "`write_pixels` access scope. Also: The app requires read_customer_events access scope and user access permission.") + + """ + Creates a web presence. + """ + webPresenceCreate( + """ + The details of the web presence to be created. + """ + input: WebPresenceCreateInput! + ): WebPresenceCreatePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Deletes a web presence. + """ + webPresenceDelete( + """ + The ID of the web presence to delete. + """ + id: ID! @gidTypes(types: ["WebPresence"]) + ): WebPresenceDeletePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + Updates a web presence. + """ + webPresenceUpdate( + """ + The ID of the web presence to update. + """ + id: ID! @gidTypes(types: ["WebPresence"]) + + """ + The web presence properties to update. + """ + input: WebPresenceUpdateInput! + ): WebPresenceUpdatePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + 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! @gidTypes(types: ["WebhookSubscription"]) + ): 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! @gidTypes(types: ["WebhookSubscription"]) + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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! +} + +""" +Information on shop's eligibility to sell NFTs. +""" +type NftSalesEligibilityResult @componentName(name: "apps") { + """ + Whether shop is eligible to gift token gated products e.g. NFTs. + """ + giftingApproved: Boolean! + + """ + The date and time when the shop can reappy for attestation. + """ + reapplyDate: DateTime + + """ + Whether shop is eligible to sell token gated products e.g. NFTs. + """ + sellApproved: Boolean! +} + +""" +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 @componentName(name: "platform") { + """ + A globally-unique ID. + """ + id: ID! +} + +""" +The valid values for the notification usage, specifying the intended notification environment usage for certain operations. +""" +enum NotificationUsage @componentName(name: "sales") { + """ + The notification environment is sms. + """ + SMS + + """ + The notification environment is web. + """ + WEB +} + +""" +The input fields for dimensions of an object. +""" +input ObjectDimensionsInput @componentName(name: "platform") { + """ + The height in `unit`s. + """ + height: Float! + + """ + The length in `unit`s. + """ + length: Float! + + """ + Unit of measurement for `length`, `width`, and `height`. + """ + unit: LengthUnit! + + """ + The width in `unit`s. + """ + width: Float! +} + +""" +A score that represents the shop's ability to deliver on time to a particular country. The score is a value between 0 and 1. +""" +type OnTimeDeliveryScore @requiredAccess(scope: "`read_merchant_approval_signals` access scope.") @componentName(name: "merchant_risk") { + """ + Destination country code. + """ + countryCode: CountryCode! + + """ + A score that represents the shop's ability to deliver on time to a particular + country. The score is a float value between 0 and 1. + """ + score: Float! +} + +""" +The shop's online store channel. +""" +type OnlineStore @componentName(name: "online_store") { + """ + Storefront password information. + """ + passwordProtection: OnlineStorePasswordProtection! +} + +""" +Storefront password information. +""" +type OnlineStorePasswordProtection @componentName(name: "online_store") { + """ + Whether the storefront password is enabled. + """ + enabled: Boolean! +} + +""" +Online Store preview URL of the object. +""" +interface OnlineStorePreviewable @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { + """ + The date and time when the theme was created. + """ + createdAt: DateTime! + + """ + The files in the theme. + """ + files( + """ + A cursor for use in pagination. + """ + after: String + + """ + 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 + ): 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 @gidTypes(types: ["Market"]) + ): [Translation!]! + + """ + The date and time when the theme was last updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple OnlineStoreThemes. +""" +type OnlineStoreThemeConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { + """ + 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") = OnlineStoreThemeFileBodyBase64 | OnlineStoreThemeFileBodyText | OnlineStoreThemeFileBodyUrl + +""" +Represents the base64 encoded body of a theme file. +""" +type OnlineStoreThemeFileBodyBase64 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { + """ + The body of the theme file, base64 encoded. + """ + contentBase64: String! +} + +""" +The input fields for the theme file body. +""" +input OnlineStoreThemeFileBodyInput @componentName(name: "online_store") { + """ + 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 @componentName(name: "online_store") { + """ + The base64 encoded body of a theme file. + """ + BASE64 + + """ + The text body of the theme file. + """ + TEXT + + """ + The url of the body of a theme file. + """ + URL +} + +""" +Represents the body of a theme file. +""" +type OnlineStoreThemeFileBodyText @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { + """ + The body of the theme file. + """ + content: String! +} + +""" +Represents the url of the body of a theme file. +""" +type OnlineStoreThemeFileBodyUrl @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { + """ + The short lived url for the body of the theme file. + """ + url: URL! +} + +""" +An auto-generated type for paginating through multiple OnlineStoreThemeFiles. +""" +type OnlineStoreThemeFileConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { + """ + 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { + """ + 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 @componentName(name: "online_store") { + """ + Operation was malformed or invalid. + """ + BAD_REQUEST + + """ + Operation faced a conflict with the current state of the file. + """ + CONFLICT + + """ + Operation encountered an error. + """ + ERROR + + """ + Operation file could not be found. + """ + NOT_FOUND + + """ + Operation was successful. + """ + SUCCESS + + """ + Operation timed out. + """ + TIMEOUT + + """ + Operation could not be processed due to issues with input data. + """ + UNPROCESSABLE_ENTITY +} + +""" +The input fields for the file to create or update. +""" +input OnlineStoreThemeFilesUpsertFileInput @componentName(name: "online_store") { + """ + The body of the theme file. + """ + body: OnlineStoreThemeFileBodyInput! + + """ + The filename of the theme file. + """ + filename: String! +} + +""" +User errors for theme file operations. +""" +type OnlineStoreThemeFilesUserErrors implements DisplayableError @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify theme files.") @componentName(name: "online_store") { + """ + 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 @componentName(name: "platform") { + """ + Access denied. + """ + ACCESS_DENIED + + """ + There are files with the same filename. + """ + DUPLICATE_FILE_INPUT + + """ + Error. + """ + ERROR + + """ + The file is invalid. + """ + FILE_VALIDATION_ERROR + + """ + The input value should be less than or equal to the maximum value allowed. + """ + LESS_THAN_OR_EQUAL_TO + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + There are theme files with conflicts. + """ + THEME_FILES_CONFLICT + + """ + This action is not available on your current plan. Please upgrade to access theme editing features. + """ + THEME_LIMITED_PLAN + + """ + Too many updates in a short period. Please try again later. + """ + THROTTLED +} + +""" +The input fields for Theme attributes to update. +""" +input OnlineStoreThemeInput @componentName(name: "online_store") { + """ + The new name of the theme. + """ + name: String +} + +""" +The input fields for the options and values of the combined listing. +""" +input OptionAndValueInput @componentName(name: "merchandising") { + """ + The linked metafield for the product's option. + """ + linkedMetafield: LinkedMetafieldInput + + """ + The name of the Product's Option. + """ + name: String! + + """ + The ID of the option to update. If not present, the option will be created. + """ + optionId: ID @gidTypes(types: ["ProductOption"]) + + """ + The ordered values of the Product's Option. + """ + values: [String!]! +} + +""" +The input fields for creating a product option. +""" +input OptionCreateInput @componentName(name: "merchandising") { + """ + Specifies the metafield the option is linked to. + """ + linkedMetafield: LinkedMetafieldCreateInput + + """ + Name of the option. + """ + name: String + + """ + Position of the option. + """ + position: Int + + """ + Values associated with the option. + """ + values: [OptionValueCreateInput!] +} + +""" +The input fields for reordering a product option and/or its values. +""" +input OptionReorderInput @componentName(name: "merchandising") { + """ + Specifies the product option to reorder by ID. + """ + id: ID @gidTypes(types: ["ProductOption"]) + + """ + 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 @componentName(name: "merchandising") { + """ + Specifies the product option to update. + """ + id: ID @gidTypes(types: ["ProductOption"]) + + """ + Specifies the metafield the option is linked to. + """ + linkedMetafield: LinkedMetafieldCreateInput + + """ + Name of the option. + """ + name: String + + """ + Position of the option. + """ + position: Int + + """ + Value associated with an option. + """ + values: [OptionValueSetInput!] +} + +""" +The input fields for updating a product option. +""" +input OptionUpdateInput @componentName(name: "merchandising") { + """ + Specifies the product option to update. + """ + id: ID! @gidTypes(types: ["ProductOption"]) + + """ + Specifies the metafield the option is linked to. + """ + linkedMetafield: LinkedMetafieldUpdateInput + + """ + Name of the option. + """ + name: String + + """ + Position of the option. + """ + position: Int +} + +""" +The input fields required to create a product option value. +""" +input OptionValueCreateInput @componentName(name: "merchandising") { + """ + Metafield value associated with an option. + """ + linkedMetafieldValue: String + + """ + Value associated with an option. + """ + name: String +} + +""" +The input fields for reordering a product option value. +""" +input OptionValueReorderInput @componentName(name: "merchandising") { + """ + Specifies the product option value by ID. + """ + id: ID @gidTypes(types: ["ProductOptionValue"]) + + """ + Specifies the product option value by name. + """ + name: String +} + +""" +The input fields for creating or updating a product option value. +""" +input OptionValueSetInput @componentName(name: "merchandising") { + """ + Specifies the product option value. + """ + id: ID @gidTypes(types: ["ProductOptionValue"]) + + """ + Value associated with an option. + """ + name: String +} + +""" +The input fields for updating a product option value. +""" +input OptionValueUpdateInput @componentName(name: "merchandising") { + """ + Specifies the product option value. + """ + id: ID! @gidTypes(types: ["ProductOptionValue"]) + + """ + Metafield value associated with an option. + """ + linkedMetafieldValue: String + + """ + Value associated with an option. + """ + name: 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 @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope or `read_quick_sale` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | happened_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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 token associated with the cart that was used to create the order. + """ + cartToken: String + + """ + 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 + + """ + The token associated with the checkout that was used to create the order. + Useful for correlating an order with the checkout it originated from, + including in web pixels and analytics workflows. + """ + checkoutToken: String + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! + + """ + The status of the refund(s) that can be shown to the merchant. Mostly used when a refund is in a deferred + state (for example, it was not yet sent to the payments provider). + """ + displayRefundStatus: OrderDisplayRefundStatus + + """ + 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 @protectedField(subject: "customer", content: "email") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): EventConnection! + + """ + A list of ExchangeV2s for the order. + """ + exchangeV2s( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | completed_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | include_mirrored_exchanges | boolean | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + If false, all fulfillment orders will be returned. If true, fulfillment + orders that are normally hidden from the merchant will be excluded. + For 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | assigned_location_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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: + `created_at:>='2024-05-07T08:37:00Z' updated_at:<'2025-05-07T08:37:00Z'`, + `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! + + """ + Information about the incoterm used for the order. + """ + incotermInformation: IncotermInformation + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): LineItemConnection! + + """ + List of localization extensions for the resource. + """ + localizationExtensions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The country codes of the extensions. + """ + countryCodes: [CountryCode!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The purpose of the extensions. + """ + purposes: [LocalizationExtensionPurpose!] + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The country codes of the extensions. + """ + countryCodes: [CountryCode!] + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The purpose of the extensions. + """ + purposes: [LocalizedFieldPurpose!] + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @protectedField(subject: "customer", content: "phone") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Whether results should contain removed shipping lines. + """ + includeRemovals: Boolean = false + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @protectedField(subject: "customer", content: "name") + + """ + 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 additional fees from the order to include in the refund. + """ + refundAdditionalFees: [RefundAdditionalFeeInput!] + + """ + The duties from the order to include in the refund. + """ + refundDuties: [RefundDutyInput!] + + """ + The line items from the order to include in the refund. + """ + refundLineItems: [RefundLineItemInput!] + + """ + Specifies which refund methods to allocate the suggested refund amount to. + """ + refundMethodAllocation: RefundMethodAllocation = ORIGINAL_PAYMENT_METHODS + + """ + Whether to refund the full shipping amount. + """ + refundShipping: Boolean + + """ + The amount to refund for shipping. Overrides the `refundShipping` argument. + """ + shippingAmount: Money + + """ + Whether the suggested refund should be created from all refundable line items on the order. + If `true`, the `refundLineItems` argument will be ignored. + """ + suggestFullRefund: Boolean = false + ): 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( + """ + Filter transactions by whether they are capturable. + """ + capturable: Boolean + + """ + Truncate the array result to this size. + """ + first: Int + + """ + Filter transactions by whether they can be resolved manually. + For 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { + """ + The amount of the order adjustment in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The order adjustment type. + """ + kind: OrderAdjustmentKind! @deprecated(reason: "`OrderAdjustmentKind` will be removed from unstable. Use `Refund.refundShippingLines` to query for refunded shipping costs.") + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + The discrepancy reason is customer. + """ + CUSTOMER + + """ + The discrepancy reason is damage. + """ + DAMAGE + + """ + The discrepancy reason is balance adjustment. + """ + FULL_RETURN_BALANCING_ADJUSTMENT + + """ + The discrepancy reason is pending refund. + """ + PENDING_REFUND_DISCREPANCY + + """ + The discrepancy reason is not one of the predefined reasons. + """ + REFUND_DISCREPANCY + + """ + The discrepancy reason is restocking. + """ + RESTOCK +} + +""" +An auto-generated type which holds one OrderAdjustment and a cursor during pagination. +""" +type OrderAdjustmentEdge @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + The discrepancy reason is customer. + """ + CUSTOMER + + """ + The discrepancy reason is damage. + """ + DAMAGE + + """ + The discrepancy reason is not one of the predefined reasons. + """ + OTHER + + """ + The discrepancy reason is restocking. + """ + RESTOCK +} + +""" +The different kinds of order adjustments. +This enum is deprecated and will be removed from unstable. +""" +enum OrderAdjustmentKind @componentName(name: "sales") { + """ + An order adjustment that represents discrepancy between calculated and actual refund. + """ + REFUND_DISCREPANCY @deprecated(reason: "`REFUND_DISCREPANCY` is deprecated.") + + """ + An order adjustment that represents shipping charges refunded to the customer. + """ + SHIPPING_REFUND @deprecated(reason: "`SHIPPING_REFUND` is deprecated. Use `Refund.refundShippingLines` instead.") +} + +""" +An agreement associated with an order placement. +""" +type OrderAgreement implements SalesAgreement @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + The application icon. + """ + icon: Image! + + """ + The application ID. + """ + id: ID! + + """ + The name of the application. + """ + name: String! +} + +""" +A job to determine the result of an order cancellation request. +""" +type OrderCancelJobResult implements JobResult & Node @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope. Also: The user requires `cancel_orders` access scope.") @componentName(name: "sales") { + """ + This indicates if the job is still queued or has been run. + """ + done: Boolean! + + """ + Returns any error that occurred during order cancellation. + """ + errors: [OrderCancelUserError!]! + + """ + A globally-unique ID that's returned when running an asynchronous mutation. + """ + id: ID! + + """ + The order associated with the cancellation request. + """ + order: Order + + """ + The current status of the order cancellation request. + """ + status: OrderCancelStatus! +} + +""" +Return type for `orderCancel` mutation. +""" +type OrderCancelPayload @componentName(name: "platform") { + """ + The job that asynchronously cancels the order. + """ + job: Job + + """ + The job that asynchronously cancels the order. + """ + jobResult: OrderCancelJobResult + + """ + 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 @componentName(name: "sales") { + """ + The customer wanted to cancel the order. + """ + CUSTOMER + + """ + Payment was declined. + """ + DECLINED + + """ + The order was fraudulent. + """ + FRAUD + + """ + There was insufficient inventory. + """ + INVENTORY + + """ + The order was canceled for an unlisted reason. + """ + OTHER + + """ + Staff made an error. + """ + STAFF +} + +""" +The input fields used to specify the refund method for an order cancellation. +""" +input OrderCancelRefundMethodInput @oneOf @componentName(name: "sales") { + """ + Whether to refund to the original payment method. + """ + originalPaymentMethodsRefund: Boolean + + """ + Whether to refund to store credit. + """ + storeCreditRefund: OrderCancelStoreCreditRefundInput +} + +""" +Represents the status of the order's cancellation request. +""" +enum OrderCancelStatus @componentName(name: "sales") { + """ + The order cancellation has failed. + """ + FAILED + + """ + The order cancellation has been initiated. + """ + STARTED + + """ + The order cancellation has been completed successfully. + """ + SUCCEEDED +} + +""" +The input fields used to refund to store credit. +""" +input OrderCancelStoreCreditRefundInput @componentName(name: "sales") { + """ + The expiration date of the store credit. + """ + expiresAt: DateTime +} + +""" +Errors related to order cancellation. +""" +type OrderCancelUserError implements DisplayableError @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + 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 order is a B2B order. + """ + STORE_CREDIT_REFUND_B2B_NOT_SUPPORTED + + """ + 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 +} + +""" +Details about the order cancellation. +""" +type OrderCancellation @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "payment_processing") { + """ + 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 + + """ + The ID of the order to capture. + """ + id: ID! @gidTypes(types: ["Order"]) + + """ + The ID of the authorized transaction to capture. + """ + parentTransactionId: ID! @gidTypes(types: ["OrderTransaction"]) +} + +""" +Return type for `orderCapture` mutation. +""" +type OrderCapturePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + The ID of the order to close. + """ + id: ID! @gidTypes(types: ["Order"]) +} + +""" +Return type for `orderClose` mutation. +""" +type OrderClosePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 customer to associate to the order. + """ + id: ID @gidTypes(types: ["Customer"]) +} + +""" +The input fields for a note attribute for an order. +""" +input OrderCreateCustomAttributeInput @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + A free shipping discount code applied to the shipping on an order. + """ + freeShippingDiscountCode: OrderCreateFreeShippingDiscountCodeAttributesInput + + """ + A fixed amount discount code applied to the line items on the order. + """ + itemFixedDiscountCode: OrderCreateFixedDiscountCodeAttributesInput + + """ + A percentage discount code applied to the line items on the order. + """ + itemPercentageDiscountCode: OrderCreatePercentageDiscountCodeAttributesInput +} + +""" +The status of payments associated with the order. Can only be set when the order is created. +""" +enum OrderCreateFinancialStatus @componentName(name: "sales") { + """ + The payments have been authorized. + """ + AUTHORIZED + + """ + The payments have been expired. + """ + EXPIRED + + """ + The payments have been paid. + """ + PAID + + """ + The order has been partially paid. + """ + PARTIALLY_PAID + + """ + The payments have been partially refunded. + """ + PARTIALLY_REFUNDED + + """ + 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 refunded. + """ + REFUNDED + + """ + The payments have been voided. + """ + VOIDED +} + +""" +The input fields for a fixed amount discount code to apply to an order. +""" +input OrderCreateFixedDiscountCodeAttributesInput @componentName(name: "sales") { + """ + 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 discount code that was entered at checkout. + """ + code: String! +} + +""" +The input fields for a free shipping discount code to apply to an order. +""" +input OrderCreateFreeShippingDiscountCodeAttributesInput @componentName(name: "sales") { + """ + The discount code that was entered at checkout. + """ + code: String! +} + +""" +The input fields for a fulfillment to create for an order. +""" +input OrderCreateFulfillmentInput @componentName(name: "sales") { + """ + The ID of the location to fulfill the order from. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + Whether the customer should be notified of changes with the fulfillment. + """ + notifyCustomer: Boolean = false + + """ + The address at which the fulfillment occurred. + """ + originAddress: FulfillmentOriginAddressInput + + """ + The status of the shipment. + """ + shipmentStatus: FulfillmentEventStatus + + """ + 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 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 order's status in terms of fulfilled line items. +""" +enum OrderCreateFulfillmentStatus @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @gidTypes(types: ["Product"]) + + """ + 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 @gidTypes(types: ["ProductVariant"]) + + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope. Also: The user must have mark_orders_as_paid permission.") @componentName(name: "payment_processing") { + """ + 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 @componentName(name: "platform") { + """ + Amount exceeds the remaining balance. + """ + AMOUNT_EXCEEDS_BALANCE + + """ + Amount must be positive. + """ + AMOUNT_NOT_POSITIVE + + """ + The currency of the amount doesn't match the presentment currency of the order. + """ + CURRENCY_MISMATCH + + """ + Payment gateway is not found. + """ + GATEWAY_NOT_FOUND + + """ + Order is temporarily unavailable. + """ + ORDER_IS_TEMPORARILY_UNAVAILABLE + + """ + Order is not found. + """ + ORDER_NOT_FOUND + + """ + Indicates that the processedAt field is invalid, such as when it references a future date. + """ + PROCESSED_AT_INVALID +} + +""" +Return type for `orderCreateManualPayment` mutation. +""" +type OrderCreateManualPaymentPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 a shipping confirmation to the customer. + """ + sendFulfillmentReceipt: Boolean = false + + """ + Whether to send an order confirmation to the customer. + """ + sendReceipt: Boolean = false +} + +""" +The input fields for creating an order. +""" +input OrderCreateOrderInput @componentName(name: "sales") { + """ + 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 @gidTypes(types: ["CompanyLocation"]) + + """ + 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. + """ + customer: OrderCreateCustomerInput + + """ + The customer to associate to the order. + """ + customerId: ID @deprecated(reason: "This is replaced by the `customer` field in a future version.") @gidTypes(types: ["Customer"]) + + """ + 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 of the checkout. To use this field for sales attribution, you must + register the channels that your app is managing. You can register the channels + that your app is managing by completing [this Google Form](https://docs.google.com/forms/d/e/1FAIpQLScmVTZRQNjOJ7RD738mL1lGeFjqKVe_FM2tO9xsm21QEo5Ozg/viewform?usp=sf_link). + After you've submited your request, you need to wait for your request to be + processed by Shopify. You can find a list of your channels in the Partner + Dashboard, in your app's Marketplace extension. You can specify a handle as + the source_name value in your request. + """ + 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!] + + """ + 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 taxes are included in the order subtotal. + """ + taxesIncluded: Boolean = false + + """ + 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 @gidTypes(types: ["StaffMember"]) +} + +""" +The input fields for a transaction to create for an order. +""" +input OrderCreateOrderTransactionInput @componentName(name: "sales") { + """ + 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 @gidTypes(types: ["PointOfSaleDevice"]) + + """ + The name of the gateway the transaction was issued through. + """ + gateway: String + + """ + The ID of the gift card used for this transaction. + """ + giftCardId: ID @gidTypes(types: ["GiftCard"]) + + """ + The kind of transaction. + """ + kind: OrderTransactionKind = SALE + + """ + The ID of the location where the transaction was processed. + """ + locationId: ID @gidTypes(types: ["Location"]) + + """ + 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 @gidTypes(types: ["StaffMember"]) +} + +""" +Return type for `orderCreate` mutation. +""" +type OrderCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @gidTypes(types: ["Customer"]) + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Indicates that the line item fulfillment service handle is invalid. + """ + FULFILLMENT_SERVICE_INVALID + + """ + The input value is invalid. + """ + 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 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 + + """ + Indicates that the tax line rate is missing - only enforced for LineItem or ShippingLine-level tax lines. + """ + TAX_LINE_RATE_MISSING +} + +""" +Return type for `orderCustomerRemove` mutation. +""" +type OrderCustomerRemovePayload @componentName(name: "platform") { + """ + The order that had its customer removed. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderCustomerSet` mutation. +""" +type OrderCustomerSetPayload @componentName(name: "platform") { + """ + The order that had a customer set. + """ + order: Order + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `orderDelete` mutation. +""" +type OrderDeletePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +Represents the order's current financial status. +""" +enum OrderDisplayFinancialStatus @componentName(name: "sales") { + """ + 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 **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 + + """ + Displayed as **Paid**. Payment was automatically or manually captured, or the order was marked as paid. + """ + PAID + + """ + 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 **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 **Refunded**. The full amount paid for an order was refunded to the customer. + """ + REFUNDED + + """ + Displayed as **Voided**. An unpaid (payment authorized but not captured) order was manually + canceled. + """ + VOIDED +} + +""" +Represents the order's aggregated fulfillment status for display purposes. +""" +enum OrderDisplayFulfillmentStatus @componentName(name: "fulfillments") { + """ + Displayed as **Fulfilled**. All the items in the order have been fulfilled. + """ + FULFILLED + + """ + 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 **Open**. None of the items in the order have been fulfilled. Replaced by "UNFULFILLED" status. + """ + OPEN + + """ + Displayed as **Partially fulfilled**. Some of the items in the order have been fulfilled. + """ + PARTIALLY_FULFILLED + + """ + 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 **Request declined**. Some of the items in the order have been + rejected for fulfillment by the fulfillment service. + """ + REQUEST_DECLINED + + """ + Displayed as **Restocked**. All the items in the order have been restocked. Replaced by the "UNFULFILLED" status. + """ + RESTOCKED + + """ + Displayed as **Scheduled**. All of the unfulfilled items in this order are scheduled for fulfillment at later time. + """ + SCHEDULED + + """ + Displayed as **Unfulfilled**. None of the items in the order have been fulfilled. + """ + UNFULFILLED +} + +""" +Represents the order's refund status for display purposes. +""" +enum OrderDisplayRefundStatus @componentName(name: "shopify_payments") { + """ + Displayed as **Refund pending**. Means that the refund has not yet been submitted to the payments processor. + """ + DEFERRED +} + +""" +A summary of the important details for a dispute on an order. +""" +type OrderDisputeSummary implements Node @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "shopify_payments") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + The price of the shipping line. + """ + price: MoneyInput! + + """ + The title of the shipping line. + """ + title: String! +} + +""" +Return type for `orderEditAddShippingLine` mutation. +""" +type OrderEditAddShippingLinePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `orderEditAddVariant` mutation. +""" +type OrderEditAddVariantPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `orderEditRemoveLineItemDiscount` mutation. +""" +type OrderEditRemoveLineItemDiscountPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +An edit session for an order. +""" +type OrderEditSession implements Node @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + The unique ID of the order edit session. + """ + id: ID! +} + +""" +Return type for `orderEditSetQuantity` mutation. +""" +type OrderEditSetQuantityPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields used to update a shipping line. +""" +input OrderEditUpdateShippingLineInput @componentName(name: "sales") { + """ + The price of the shipping line. + """ + price: MoneyInput + + """ + The title of the shipping line. + """ + title: String +} + +""" +Return type for `orderEditUpdateShippingLine` mutation. +""" +type OrderEditUpdateShippingLinePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields for identifying a order. +""" +input OrderIdentifierInput @oneOf @componentName(name: "sales") { + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the order. + """ + customId: UniqueMetafieldValueInput + + """ + The ID of the order. + """ + id: ID +} + +""" +The input fields for specifying the information to be updated on an order when using the orderUpdate mutation. +""" +input OrderInput @componentName(name: "sales") { + """ + A new list of custom attributes for the order. Overwrites the existing custom attributes. + """ + customAttributes: [AttributeInput!] + + """ + A new customer email address for the order. Overwrites the existing email address. + """ + email: String + + """ + The ID of the order to update. + """ + id: ID! @gidTypes(types: ["Order"]) + + """ + 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!] + + """ + A list of new metafields to add to the existing metafields for the order. + """ + metafields: [MetafieldInput!] + + """ + The new contents for the note associated with the order. Overwrites the existing note. + """ + note: String + + """ + A new customer phone number for the order. Overwrites the existing phone number. + """ + phone: String + + """ + The new purchase order number for the order. + """ + poNumber: String + + """ + The new shipping address for the order. Overwrites the existing shipping address. + """ + shippingAddress: MailingAddressInput + + """ + A new list of tags for the order. Overwrites the existing tags. + """ + tags: [String!] +} + +""" +Return type for `orderInvoiceSend` mutation. +""" +type OrderInvoiceSendPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + An error occurred while sending the invoice. + """ + ORDER_INVOICE_SEND_UNSUCCESSFUL +} + +""" +The input fields for specifying the order to mark as paid. +""" +input OrderMarkAsPaidInput @componentName(name: "payment_processing") { + """ + The ID of the order to mark as paid. + """ + id: ID! @gidTypes(types: ["Order"]) +} + +""" +Return type for `orderMarkAsPaid` mutation. +""" +type OrderMarkAsPaidPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + The ID of the order to open. + """ + id: ID! @gidTypes(types: ["Order"]) +} + +""" +Return type for `orderOpen` mutation. +""" +type OrderOpenPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payments") { + """ + 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 @componentName(name: "payments") { + """ + The payment is authorized. + """ + AUTHORIZED + + """ + The payment is captured. + """ + CAPTURED + + """ + There was an error initiating the payment. + """ + ERROR + + """ + The payment is awaiting processing. + """ + INITIATED + + """ + The payment partially succeeded. Some payment methods were charged but the primary payment method failed. + """ + PARTIAL_SUCCESS + + """ + The payment is pending with the provider, and may take a while. + """ + PENDING + + """ + The payment is still being processed. + """ + PROCESSING + + """ + The payment is in purchased status. + """ + PURCHASED + + """ + Redirect required. + """ + REDIRECT_REQUIRED + + """ + The payment is refunded. + """ + REFUNDED + + """ + Payment can be retried. + """ + RETRYABLE + + """ + The payment succeeded. + """ + SUCCESS + + """ + Status is unknown. + """ + UNKNOWN + + """ + The payment is voided. + """ + VOIDED +} + +""" +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 @componentName(name: "returns") { + """ + All return shipments from a return in this order were inspected. + """ + INSPECTION_COMPLETE + + """ + Some items in the order are being returned. + """ + IN_PROGRESS + + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { + """ + 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 @componentName(name: "reviews") { + """ + The list of facts used to determine the fraud assessment. + """ + facts: [OrderRiskAssessmentFactInput!]! + + """ + The ID of the order receiving the fraud assessment. + """ + orderId: ID! @gidTypes(types: ["Order"]) + + """ + The risk level of the fraud assessment. + """ + riskLevel: RiskAssessmentResult! +} + +""" +Return type for `orderRiskAssessmentCreate` mutation. +""" +type OrderRiskAssessmentCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The order is marked as fulfilled and can no longer accept new risk assessments. + """ + ORDER_ALREADY_FULFILLED + + """ + Too many facts were provided for the risk assessment. + """ + TOO_MANY_FACTS +} + +""" +The input fields to create a fact on an order risk assessment. +""" +input OrderRiskAssessmentFactInput @componentName(name: "reviews") { + """ + A description of the fact. Large values are truncated to 256 characters. + """ + description: String! + + """ + Indicates whether the fact is a negative, neutral or positive contributor with regards to risk. + """ + sentiment: RiskFactSentiment! +} + +""" +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 @componentName(name: "reviews") { + """ + There is a high level of risk that this order is fraudulent. + """ + HIGH + + """ + 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 +} + +""" +List of possible values for an OrderRiskRecommendation recommendation. +""" +enum OrderRiskRecommendationResult @componentName(name: "reviews") { + """ + Recommends fulfilling the order. + """ + ACCEPT + + """ + Recommends cancelling the order. + """ + CANCEL + + """ + Recommends investigating the order by contacting buyers. + """ + INVESTIGATE + + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") = 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + The phone number at the shipping address. + """ + phone: String @protectedField(subject: "customer", content: "phone") + + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + The number of items added. + """ + delta: Int! + + """ + The original line item. + """ + lineItem: LineItem! +} + +""" +A discount application removed during an order edit. +""" +type OrderStagedChangeRemoveDiscount @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + The removed discount application. + """ + discountApplication: DiscountApplication! +} + +""" +A shipping line removed during an order edit. +""" +type OrderStagedChangeRemoveShippingLine @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { + """ + 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( + """ + Crops the image according to the specified region. + """ + crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") + + """ + Image height in pixels between 1 and 2048. + """ + maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") + + """ + Image width in pixels between 1 and 2048. + """ + maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "payment_processing") { + """ + 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 @componentName(name: "payment_processing") { + """ + 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 transaction amount exceeds the maximum amount allowed. + """ + AMOUNT_TOO_LARGE + + """ + The transaction amount is below the minimum amount allowed. + """ + AMOUNT_TOO_SMALL + + """ + The 3D Secure authentication failed. + """ + AUTHENTICATION_FAILED + + """ + The transaction requires 3D Secure authentication but was attempted without authentication. + """ + AUTHENTICATION_REQUIRED + + """ + The authorization has expired. + """ + AUTHORIZATION_EXPIRED + + """ + The issuer declined the transaction, the customer should contact their issuer for more details. + """ + CALL_ISSUER + + """ + The transaction was cancelled. + """ + CANCELLED_PAYMENT + + """ + The card was declined. + """ + CARD_DECLINED + + """ + The transaction was declined due to suspected card testing activity. + """ + CARD_TESTING + + """ + There is an error in the gateway or merchant configuration. + """ + CONFIG_ERROR + + """ + The issuer declined the transaction without providing a specific reason. + """ + DO_NOT_HONOR + + """ + The card is expired. + """ + EXPIRED_CARD + + """ + The transaction was declined due to suspected fraudulent activity. + """ + FRAUD_SUSPECTED + + """ + There was an unknown error with processing the payment. + """ + GENERIC_ERROR + + """ + The address is incorrect. + """ + INCORRECT_ADDRESS + + """ + The card security code (CVC/CVV) is incorrect. + """ + INCORRECT_CVC + + """ + The card number is incorrect. + """ + INCORRECT_NUMBER + + """ + The PIN entered is incorrect. + """ + INCORRECT_PIN + + """ + The ZIP or postal code doesn't match the one on file. + """ + INCORRECT_ZIP + + """ + The payment instrument was declined. + """ + INSTRUMENT_DECLINED + + """ + There are insufficient funds available to complete the transaction. + """ + INSUFFICIENT_FUNDS + + """ + The amount is invalid. + """ + INVALID_AMOUNT + + """ + The payment method is not available in the customer's country. + """ + INVALID_COUNTRY + + """ + The currency isn't supported. + """ + INVALID_CURRENCY + + """ + The format of the CVC is incorrect. + """ + INVALID_CVC + + """ + The format of the expiry date is incorrect. + """ + INVALID_EXPIRY_DATE + + """ + The format of the card number is incorrect. + """ + INVALID_NUMBER + + """ + The payment method is invalid or not found. + """ + INVALID_PAYMENT_METHOD + + """ + This payment method doesn't support the requested transaction type. + """ + INVALID_PURCHASE_TYPE + + """ + The transaction couldn't be processed due to an issue with the merchant account. + """ + MERCHANT_ACCOUNT_ERROR + + """ + The transaction was blocked due to the merchant's custom payment risk rule. + """ + MERCHANT_RULE + + """ + The payment method is momentarily unavailable. + """ + PAYMENT_METHOD_UNAVAILABLE + + """ + The payment method isn't supported. + """ + PAYMENT_METHOD_UNSUPPORTED + + """ + The transaction couldn't be processed due to an unexpected error with the payment provider. + """ + PAYMENT_PROVIDER_ERROR + + """ + 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 was an error while processing the payment. + """ + PROCESSING_ERROR + + """ + The transaction retry attempt was declined. + """ + RETRY_DECLINED + + """ + A real card was used but the gateway was in test mode. + """ + TEST_MODE_LIVE_CARD + + """ + The payment instrument has exceeded the processing frequency limit. + """ + TRANSACTION_LIMIT_EXCEEDED + + """ + The gateway or merchant configuration doesn't support a feature, such as network tokenization. + """ + UNSUPPORTED_FEATURE +} + +""" +The input fields for the information needed to create an order transaction. +""" +input OrderTransactionInput @componentName(name: "payment_processing") { + """ + 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! @gidTypes(types: ["Order"]) + + """ + The ID of the optional parent transaction, for example the authorization of a capture. + """ + parentId: ID @gidTypes(types: ["OrderTransaction"]) +} + +""" +The different kinds of order transactions. +""" +enum OrderTransactionKind @componentName(name: "payment_processing") { + """ + An amount reserved against the cardholder's funding source. + Money does not change hands until the authorization is captured. + """ + AUTHORIZATION + + """ + A transfer of the money that was reserved by an authorization. + """ + CAPTURE + + """ + 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 partial or full return of captured funds to the cardholder. + A refund can happen only after a capture is processed. + """ + REFUND + + """ + An authorization and capture performed together in a single step. + """ + SALE + + """ + A suggested refund transaction that can be used to create a refund. + """ + SUGGESTED_REFUND + + """ + A cancelation of an authorization transaction. + """ + VOID +} + +""" +The different states that an `OrderTransaction` can have. +""" +enum OrderTransactionStatus @componentName(name: "payment_processing") { + """ + Awaiting a response. + """ + AWAITING_RESPONSE + + """ + There was an error while processing the transaction. + """ + ERROR + + """ + The transaction failed. + """ + FAILURE + + """ + The transaction is pending. + """ + PENDING + + """ + The transaction succeeded. + """ + SUCCESS + + """ + The transaction status is unknown. + """ + UNKNOWN +} + +""" +Return type for `orderUpdate` mutation. +""" +type OrderUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 @gidTypes(types: ["Market"]) + ): [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 @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + The text content of the page, complete with HTML markup. + """ + body: String + + """ + 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 + + """ + Whether or not the page should be visible. Defaults to `true` if no publish date is specified. + """ + isPublished: Boolean + + """ + The input fields to create or update a metafield. + """ + metafields: [MetafieldInput!] + + """ + 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 title of the page. + """ + title: String! +} + +""" +Return type for `pageCreate` mutation. +""" +type PageCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + The input value is invalid. + """ + INVALID + + """ + Can’t set isPublished to true and also set a future publish date. + """ + INVALID_PUBLISH_DATE + + """ + The metafield type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too big. + """ + TOO_BIG + + """ + The input value is too long. + """ + TOO_LONG +} + +""" +Return type for `pageDelete` mutation. +""" +type PageDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "online_store") { + """ + The text content of the page, complete with HTML markup. + """ + body: String + + """ + 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 + + """ + Whether or not the page should be visible. Defaults to `true` if no publish date is specified. + """ + isPublished: Boolean + + """ + The input fields to create or update a metafield. + """ + metafields: [MetafieldInput!] + + """ + The date and time (ISO 8601 format) when the page should become visible. + """ + publishDate: DateTime + + """ + 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 + + """ + 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 title of the page. + """ + title: String +} + +""" +Return type for `pageUpdate` mutation. +""" +type PageUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + The input value is invalid. + """ + INVALID + + """ + Can’t set isPublished to true and also set a future publish date. + """ + INVALID_PUBLISH_DATE + + """ + The metafield type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too big. + """ + TOO_BIG + + """ + The input value is too long. + """ + TOO_LONG +} + +""" +A payment customization. +""" +type PaymentCustomization implements HasMetafieldDefinitions & HasMetafields & Node @requiredAccess(scope: "`read_payment_customizations` access scope.") @componentName(name: "checkouts") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + The Shopify Function implementing the payment customization. + """ + shopifyFunction: ShopifyFunction! + + """ + The title of the payment customization. + """ + title: String! +} + +""" +Return type for `paymentCustomizationActivation` mutation. +""" +type PaymentCustomizationActivationPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @requiredAccess(scope: "`read_payment_customizations` access scope.") @componentName(name: "checkouts") { + """ + 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 @componentName(name: "platform") { + """ + 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 ID cannot be changed. + """ + FUNCTION_ID_CANNOT_BE_CHANGED + + """ + Function not found. + """ + FUNCTION_NOT_FOUND + + """ + Function is pending deletion. + """ + FUNCTION_PENDING_DELETION + + """ + The input value is invalid. + """ + INVALID + + """ + Could not create or update metafields. + """ + INVALID_METAFIELDS + + """ + Maximum payment customizations are already enabled. + """ + MAXIMUM_ACTIVE_PAYMENT_CUSTOMIZATIONS + + """ + 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 + + """ + Shop must be on a Shopify Plus plan to activate payment customizations from a custom app. + """ + PAYMENT_CUSTOMIZATION_FUNCTION_NOT_ELIGIBLE + + """ + Payment customization not found. + """ + PAYMENT_CUSTOMIZATION_NOT_FOUND + + """ + Required input field must be present. + """ + REQUIRED_INPUT_FIELD +} + +""" +The input fields to create and update a payment customization. +""" +input PaymentCustomizationInput @componentName(name: "checkouts") { + """ + The enabled status of the payment customization. + """ + enabled: Boolean + + """ + Function handle scoped to your app ID. + """ + functionHandle: String + + """ + The ID of the function providing the payment customization. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + Additional metafields to associate to the payment customization. + """ + metafields: [MetafieldInput!] = [] + + """ + The title of the payment customization. + """ + title: String +} + +""" +Return type for `paymentCustomizationUpdate` mutation. +""" +type PaymentCustomizationUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") = CardPaymentDetails | LocalPaymentMethodsPaymentDetails | PaypalWalletPaymentDetails | ShopPayInstallmentsPaymentDetails + +""" +All possible instrument outputs for Payment Mandates. +""" +union PaymentInstrument @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") = 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 @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + 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 @requiredAccess(scope: "`read_payment_mandate` access scope or `read_customer_payment_methods` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + The unique ID of the payment mandate. Matches the corresponding + `CustomerPaymentMethod.id` token, so partners can identify which payment + method to use for a given mandate scope (e.g., SUBSCRIPTIONS). + """ + id: ID! + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "payments") { + """ + 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 @componentName(name: "payment_processing") { + AMERICAN_EXPRESS + + """ + The payment method for Bancontact payment. + """ + BANCONTACT + BITCOIN + BOGUS + + """ + The payment method for Cartes Bancaires payment. + """ + CARTES_BANCAIRES + DANKORT + DINERS_CLUB + DISCOVER + DOGECOIN + + """ + The payment method for eftpos_au payment. + """ + EFTPOS + + """ + The payment method for Elo payment. + """ + ELO + FORBRUGSFORENINGEN + + """ + The payment method for Interac payment. + """ + INTERAC + JCB + LITECOIN + MAESTRO + MASTERCARD + PAYPAL + + """ + The payment method for UnionPay payment. + """ + UNIONPAY + VISA +} + +""" +Return type for `paymentReminderSend` mutation. +""" +type PaymentReminderSendPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_payment_terms` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "payments") { + """ + 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 @componentName(name: "payments") { + """ + Specifies the date and time when the payment schedule is due. This field must be provided for fixed type payment terms. + """ + dueAt: DateTime + + """ + Specifies the date and time that the payment schedule was issued. This field must be provided for net type payment terms. + """ + issuedAt: DateTime +} + +""" +Settings related to payments. +""" +type PaymentSettings @componentName(name: "payment_processing") { + """ + Whether payments are automatically captured. + """ + autoCapture: Boolean! + + """ + 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 @requiredAccess(scope: "`read_payment_terms` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + Whether the payment can be made before the due date. When true, allows early + payment of the invoice. When false, the payment must be made according to the + payment schedule. + """ + canPayEarly: Boolean! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "payments") { + """ + Specifies the payment schedules for the payment terms. + """ + paymentSchedules: [PaymentScheduleInput!] + + """ + Specifies the payment terms template ID used to generate payment terms. + """ + paymentTermsTemplateId: ID! @gidTypes(types: ["PaymentTermsTemplate"]) +} + +""" +Return type for `paymentTermsCreate` mutation. +""" +type PaymentTermsCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + An error occurred while creating payment terms. + """ + PAYMENT_TERMS_CREATION_UNSUCCESSFUL +} + +""" +The input fields used to delete the payment terms. +""" +input PaymentTermsDeleteInput @componentName(name: "payments") { + """ + The ID of the payment terms being deleted. + """ + paymentTermsId: ID! @gidTypes(types: ["PaymentTerms"]) +} + +""" +Return type for `paymentTermsDelete` mutation. +""" +type PaymentTermsDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "payments") { + """ + Whether the payment can be made before the due date. + When true, allows early payment of the invoice. + When false, the payment must be made according to the payment schedule. + """ + canPayEarly: Boolean + + """ + Specifies the payment schedules for the payment terms. + """ + paymentSchedules: [PaymentScheduleInput!] + + """ + 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 @gidTypes(types: ["PaymentTermsTemplate"]) +} + +""" +Represents the payment terms template object. +""" +type PaymentTermsTemplate implements Node @componentName(name: "payments") { + """ + 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 @componentName(name: "payments") { + """ + 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 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 due on receipt. + """ + RECEIPT + + """ + The type of the payment terms or payment terms template is unknown. + """ + UNKNOWN +} + +""" +The input fields used to update the payment terms. +""" +input PaymentTermsUpdateInput @componentName(name: "payments") { + """ + The attributes used to update the payment terms. + """ + paymentTermsAttributes: PaymentTermsInput! + + """ + The ID of the payment terms being updated. + """ + paymentTermsId: ID! @gidTypes(types: ["PaymentTerms"]) +} + +""" +Return type for `paymentTermsUpdate` mutation. +""" +type PaymentTermsUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + An error occurred while updating payment terms. + """ + PAYMENT_TERMS_UPDATE_UNSUCCESSFUL +} + +""" +The set of valid sort keys for the Payout query. +""" +enum PayoutSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "shop_identity") { + """ + The status is disabled. + """ + DISABLED + + """ + The status is enabled. + """ + ENABLED + + """ + The status is pending. + """ + PENDING +} + +""" +PayPal Wallet payment details related to a transaction. +""" +type PaypalWalletPaymentDetails implements BasePaymentDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +Performance aggregation level of RUM (Real User Monitoring) reports. +""" +enum PerformanceAggregationLevel @componentName(name: "online_store") { + """ + Aggregates metrics on a daily basis. + """ + DAILY + + """ + Aggregates metrics on a monthly basis. + """ + MONTHLY + + """ + Aggregates metrics for the rolling last 28 days. + """ + ROLLING28DAYS + + """ + Aggregates metrics on a weekly basis. + """ + WEEKLY +} + +""" +Specifies the device type for RUM (Real User Monitoring) reports. +""" +enum PerformanceDeviceType @componentName(name: "online_store") { + """ + Includes both desktop and mobile devices. + """ + ALL + + """ + Refers to desktop devices only. + """ + DESKTOP + + """ + Refers to mobile devices only. + """ + MOBILE +} + +""" +Represents an event that impacts storefront performance, measured via Real User Monitoring (RUM). +""" +type PerformanceEvent @requiredAccess(scope: "The user must have access to themes and reports.") @componentName(name: "online_store") { + """ + Additional metadata about the performance event. + """ + metadata: JSON! + + """ + The date and time when the performance event occurred. + """ + occurrence: DateTime! + + """ + Identifies the type of the performance event. + """ + type: PerformanceEventType! +} + +""" +Identifies the type of event that impacts the performance of the storefront. +""" +enum PerformanceEventType @componentName(name: "online_store") { + """ + Indicates that an app has been installed. + """ + APP_INSTALL + + """ + Indicates that an app has been uninstalled. + """ + APP_UNINSTALL + + """ + Indicates that a file in the live theme has been edited. + """ + THEME_LIVE_EDIT + + """ + Indicates that a new theme has been published. + """ + THEME_PUBLICATION +} + +""" +RUM (Real User Monitoring) performance metrics for a shop. +""" +type PerformanceMetrics @requiredAccess(scope: "The user must have access to themes and reports.") @componentName(name: "online_store") { + """ + Specifies the device type for which the RUM (Real User Monitoring) data is provided. + """ + deviceType: PerformanceDeviceType! + + """ + JSON blob with RUM (Real User Monitoring) data for a shop. + """ + metrics: [JSON!]! +} + +""" +A location for in-store pickup. +""" +type PickupInStoreLocation @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { + """ + 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! +} + +""" +Indicates whether the pixel can access events. The state may reflect event restrictions or modifications. +""" +enum PixelDataSharingState @componentName(name: "merchant_marketing") { + """ + The pixel can access all events. + """ + ALWAYS_ON + + """ + Optimization is enabled and the pixel can access all events. + """ + OPTIMIZED_ALLOW_ALL_EVENTS + + """ + Optimization is enabled and the pixel can access some events or partial event data. + """ + OPTIMIZED_ALLOW_LIMITED_EVENTS + + """ + Optimization is enabled and the pixel cannot access any events. + """ + OPTIMIZED_PAUSE_ALL_EVENTS + + """ + The pixel cannot access any events. + """ + PAUSED +} + +""" +Represents a mobile device that Shopify Point of Sale has been installed on. +""" +type PointOfSaleDevice implements Node @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope or `read_point_of_sale_devices` access scope.") @componentName(name: "retail") { + """ + The currently open payment session for this device. + """ + activePaymentSession: PointOfSaleDevicePaymentSession + + """ + The cash drawer that this device is currently assigned to. + """ + cashDrawer: CashDrawer + + """ + A globally-unique ID. + """ + id: ID! +} + +""" +Return type for `pointOfSaleDeviceAssignToCashDrawer` mutation. +""" +type PointOfSaleDeviceAssignToCashDrawerPayload @componentName(name: "platform") { + """ + The point of sale device. + """ + pointOfSaleDevice: PointOfSaleDevice + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PointOfSaleDeviceAssignToCashDrawerUserError!]! +} + +""" +An error that occurs during the execution of `PointOfSaleDeviceAssignToCashDrawer`. +""" +type PointOfSaleDeviceAssignToCashDrawerUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: PointOfSaleDeviceAssignToCashDrawerUserErrorCode + + """ + 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 `PointOfSaleDeviceAssignToCashDrawerUserError`. +""" +enum PointOfSaleDeviceAssignToCashDrawerUserErrorCode @componentName(name: "platform") { + """ + The cash drawer was not found. + """ + CASH_DRAWER_NOT_FOUND + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The cash drawer and point of sale device must be in the same location. + """ + LOCATION_MISMATCH + + """ + The point of sale device was not found. + """ + POINT_OF_SALE_DEVICE_NOT_FOUND +} + +""" +An auto-generated type for paginating through multiple PointOfSaleDevices. +""" +type PointOfSaleDeviceConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PointOfSaleDeviceEdge!]! + + """ + A list of nodes that are contained in PointOfSaleDeviceEdge. 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: [PointOfSaleDevice!]! + + """ + 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 PointOfSaleDevice and a cursor during pagination. +""" +type PointOfSaleDeviceEdge @componentName(name: "retail") { + """ + 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 PointOfSaleDeviceEdge. + """ + node: PointOfSaleDevice! +} + +""" +Tracks the payment activity for a point of sale device. +""" +type PointOfSaleDevicePaymentSession implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { + """ + The activities on the point of sale device payment session. + """ + cashActivities( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | type | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Filter activities by staff member. + """ + staffMemberId: ID @gidTypes(types: ["StaffMember"]) + ): CashActivityConnection! + + """ + The cash that was physically counted when the point of sale device payment session was closed. + """ + cashCountedAtClose: MoneyV2 + + """ + The cash that was physically counted when the point of sale device payment session was opened. + """ + cashCountedAtOpen: MoneyV2! + + """ + The cash drawer associated with the point of sale device payment session. The + session's sales andcash tracking activity will affect the cash drawer's balance. + """ + cashDrawer: CashDrawer! + + """ + The amount that the cash drawer balance was adjusted when the session was closed. + """ + closingAdjustment: MoneyV2 + + """ + The counted balance of the cash drawer when the point of sale device payment session was closed. + """ + closingBalance: MoneyV2 + + """ + The note associated with the point of sale device payment session closing. + """ + closingNote: String + + """ + The staff member who closed the point of sale device payment session. + """ + closingStaffMember: StaffMember + + """ + The time the point of sale device payment session was closed. + """ + closingTime: DateTime + + """ + The currency of the point of sale device payment session. + """ + currency: String! + + """ + The expected cash when the point of sale device payment session was closed. + """ + expectedCashAtClose: MoneyV2 + + """ + The expected balance of the cash drawer when the point of sale device payment session was opened. + """ + expectedCashAtOpen: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The location associated with the point of sale device payment session. The + session's sales and cash tracking activity will contribute to the location's totals. + """ + location: Location! + + """ + The net cash sales for the point of sale device payment session. + """ + netCashSales: MoneyV2! + + """ + The net sales for the duration of this session. + """ + netSales: MoneyV2! + + """ + The note associated with the point of sale device payment session opening. + """ + openingNote: String + + """ + The staff member who opened the point of sale device payment session. + """ + openingStaffMember: StaffMember! + + """ + The time the point of sale device payment session was opened. + """ + openingTime: DateTime! + + """ + The point of sale device. + """ + pointOfSaleDevice: PointOfSaleDevice! + + """ + Whether the point of sale device payment session is open. Payments can't be + processed or refunded during a closed session, and the cash drawer balance + can't be adjusted or corrected. + """ + status: PointOfSaleDevicePaymentSessionStatus! + + """ + The total adjustments for the point of sale device payment session. + """ + totalAdjustments: MoneyV2! + + """ + The total cash refunds for the point of sale device payment session. + """ + totalCashRefunds: MoneyV2! + + """ + The total cash sales for the point of sale device payment session. + """ + totalCashSales: MoneyV2! + + """ + The total discrepancy for the point of sale device payment session. + """ + totalDiscrepancy: MoneyV2! + + """ + The sum of all refunds for the duration of this session. + """ + totalRefunds: MoneyV2! + + """ + The sum of all sales for the duration of this session. + """ + totalSales: MoneyV2! + + """ + Whether the point of sale device payment session totals are ready. + """ + totalsReady: Boolean! +} + +""" +Return type for `pointOfSaleDevicePaymentSessionAdjust` mutation. +""" +type PointOfSaleDevicePaymentSessionAdjustPayload @componentName(name: "platform") { + """ + The adjusted point of sale device payment session. + """ + pointOfSaleDevicePaymentSession: PointOfSaleDevicePaymentSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `pointOfSaleDevicePaymentSessionClose` mutation. +""" +type PointOfSaleDevicePaymentSessionClosePayload @componentName(name: "platform") { + """ + The closed point of sale device payment session. + """ + pointOfSaleDevicePaymentSession: PointOfSaleDevicePaymentSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PointOfSaleDevicePaymentSessionCloseUserError!]! +} + +""" +An error that occurs during the execution of `PointOfSaleDevicePaymentSessionClose`. +""" +type PointOfSaleDevicePaymentSessionCloseUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: PointOfSaleDevicePaymentSessionCloseUserErrorCode + + """ + 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 `PointOfSaleDevicePaymentSessionCloseUserError`. +""" +enum PointOfSaleDevicePaymentSessionCloseUserErrorCode @componentName(name: "platform") { + """ + The currency code does not match the cash drawer currency. + """ + CURRENCY_MISMATCH + + """ + Point of sale device payment session not closed. + """ + FAILED_TO_CLOSE_SESSION + + """ + Point of sale device has no cash drawer associated with it. + """ + NO_CASH_DRAWER_ASSOCIATED + + """ + Point of sale device payment session not found. + """ + PAYMENT_SESSION_NOT_FOUND + + """ + Reason code not found. + """ + REASON_CODE_NOT_FOUND + + """ + Session is already closed. + """ + SESSION_ALREADY_CLOSED + + """ + Staff member not found. + """ + STAFF_MEMBER_NOT_FOUND + + """ + Time cannot be before session opening time. + """ + TIME_BEFORE_SESSION_OPEN +} + +""" +An auto-generated type for paginating through multiple PointOfSaleDevicePaymentSessions. +""" +type PointOfSaleDevicePaymentSessionConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [PointOfSaleDevicePaymentSessionEdge!]! + + """ + A list of nodes that are contained in PointOfSaleDevicePaymentSessionEdge. 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: [PointOfSaleDevicePaymentSession!]! + + """ + 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 `pointOfSaleDevicePaymentSessionCount` mutation. +""" +type PointOfSaleDevicePaymentSessionCountPayload @componentName(name: "platform") { + """ + The point of sale device payment session after recording the count. + """ + pointOfSaleDevicePaymentSession: PointOfSaleDevicePaymentSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PointOfSaleDevicePaymentSessionCountUserError!]! +} + +""" +An error that occurs during the execution of `PointOfSaleDevicePaymentSessionCount`. +""" +type PointOfSaleDevicePaymentSessionCountUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: PointOfSaleDevicePaymentSessionCountUserErrorCode + + """ + 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 `PointOfSaleDevicePaymentSessionCountUserError`. +""" +enum PointOfSaleDevicePaymentSessionCountUserErrorCode @componentName(name: "platform") { + """ + The currency code does not match the cash drawer currency. + """ + CURRENCY_MISMATCH + + """ + Point of sale device payment session count not recorded. + """ + FAILED_TO_RECORD_COUNT + + """ + Point of sale device has no cash drawer associated with it. + """ + NO_CASH_DRAWER_ASSOCIATED + + """ + Point of sale device payment session not found. + """ + PAYMENT_SESSION_NOT_FOUND + + """ + Reason code not found. + """ + REASON_CODE_NOT_FOUND + + """ + Session is already closed. + """ + SESSION_ALREADY_CLOSED + + """ + Staff member not found. + """ + STAFF_MEMBER_NOT_FOUND + + """ + Time cannot be before session opening time. + """ + TIME_BEFORE_SESSION_OPEN +} + +""" +An auto-generated type which holds one PointOfSaleDevicePaymentSession and a cursor during pagination. +""" +type PointOfSaleDevicePaymentSessionEdge @componentName(name: "retail") { + """ + 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 PointOfSaleDevicePaymentSessionEdge. + """ + node: PointOfSaleDevicePaymentSession! +} + +""" +Return type for `pointOfSaleDevicePaymentSessionOpen` mutation. +""" +type PointOfSaleDevicePaymentSessionOpenPayload @componentName(name: "platform") { + """ + The created point of sale device payment session. + """ + pointOfSaleDevicePaymentSession: PointOfSaleDevicePaymentSession + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PointOfSaleDevicePaymentSessionOpenUserError!]! +} + +""" +An error that occurs during the execution of `PointOfSaleDevicePaymentSessionOpen`. +""" +type PointOfSaleDevicePaymentSessionOpenUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: PointOfSaleDevicePaymentSessionOpenUserErrorCode + + """ + 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 `PointOfSaleDevicePaymentSessionOpenUserError`. +""" +enum PointOfSaleDevicePaymentSessionOpenUserErrorCode @componentName(name: "platform") { + """ + A point of sale device payment session is already open for this point of sale device. + """ + ALREADY_OPEN + + """ + The currency does not match the currency of the cash drawer. + """ + CURRENCY_MISMATCH + + """ + The point of sale device payment session was not created. + """ + NOT_SAVED + + """ + The point_of_sale_device has no cash drawer associated with it. + """ + NO_CASH_DRAWER_ASSOCIATED + + """ + The point of sale device was not found. + """ + POINT_OF_SALE_DEVICE_NOT_FOUND + + """ + The reason code was not found. + """ + REASON_CODE_NOT_FOUND + + """ + The staff member was not found. + """ + STAFF_MEMBER_NOT_FOUND +} + +""" +The set of valid sort keys for the PointOfSaleDevicePaymentSession query. +""" +enum PointOfSaleDevicePaymentSessionSortKeys @componentName(name: "platform") { + """ + Sort by the `closing_time` value. + """ + CLOSING_TIME + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `opening_time` value. + """ + OPENING_TIME +} + +""" +The status of the point of sale device payment session. Payments can't be +processed or refunded during a closed session, and the cash drawer balance can't +be adjusted or corrected. +""" +enum PointOfSaleDevicePaymentSessionStatus @componentName(name: "retail") { + """ + The point of sale device payment session is closed. + """ + CLOSED + + """ + The point of sale device payment session is open. + """ + OPEN +} + +""" +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 @componentName(name: "fulfillments") { + """ + The ID of the fulfillment order. + """ + fulfillmentOrderId: ID! @gidTypes(types: ["FulfillmentOrder"]) +} + +""" +Return type for `previewInstall` mutation. +""" +type PreviewInstallPayload @componentName(name: "platform") @privatelyDocumented { + """ + The installed theme. + """ + newTheme: OnlineStoreTheme + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PreviewInstallUserError!]! +} + +""" +An error that occurs during the execution of `PreviewInstall`. +""" +type PreviewInstallUserError implements DisplayableError @componentName(name: "platform") @privatelyDocumented { + """ + The error code. + """ + code: PreviewInstallUserErrorCode + + """ + 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 `PreviewInstallUserError`. +""" +enum PreviewInstallUserErrorCode @componentName(name: "platform") @privatelyDocumented { + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR +} + +""" +How to calculate the parent product variant's price while bulk updating variant relationships. +""" +enum PriceCalculationType @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have a permission to view catalogs.") @componentName(name: "merchandising") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The origin of this price, either fixed (defined on the price list) + or relative (calculated using an adjustment via a price list parent configuration). + """ + originType: PriceListPriceOriginType + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | product_id | id | + | variant_id | id | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PriceListPriceConnection! + + """ + A list of quantity rules associated with the price list, ordered by product variants. + """ + quantityRules( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Whether the quantity rule is fixed (defined on the price list) or relative + (the default quantity rule for the shop). + """ + originType: QuantityRuleOriginType + + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The type of price adjustment, such as percentage increase or decrease. + """ + type: PriceListAdjustmentType! + + """ + The value of the price adjustment as specified by the `type`. + """ + value: Float! +} + +""" +Represents the settings of price list adjustments. +""" +type PriceListAdjustmentSettings @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Determines how adjustments are applied to compare at prices. + """ + compareAtMode: PriceListCompareAtMode! = ADJUSTED +} + +""" +Represents a percentage price adjustment type. +""" +enum PriceListAdjustmentType @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @gidTypes(types: ["Catalog"]) + + """ + Three letter currency code for fixed prices associated with this price list. + """ + currency: CurrencyCode! + + """ + The unique name of the price list, used as a human-readable identifier. + """ + name: String! + + """ + Relative adjustments to other prices. + """ + parent: PriceListParentCreateInput! +} + +""" +Return type for `priceListCreate` mutation. +""" +type PriceListCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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!]! +} + +""" +Return type for `priceListFixedPricesByProductBulkUpdate` mutation. +""" +type PriceListFixedPricesByProductBulkUpdatePayload @componentName(name: "platform") { + """ + The asynchronous job that will perform the bulk update. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [PriceListFixedPricesByProductBulkUpdateUserError!]! +} + +""" +Error codes for failed price list fixed prices by product bulk update operations. +""" +type PriceListFixedPricesByProductBulkUpdateUserError implements DisplayableError @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + Duplicate ID in input. + """ + DUPLICATE_ID_IN_INPUT + + """ + IDs must be mutually exclusive across add or delete operations. + """ + ID_MUST_BE_MUTUALLY_EXCLUSIVE + + """ + 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 + + """ + No update operations specified. + """ + NO_UPDATE_OPERATIONS_SPECIFIED + + """ + The currency specified does not match the price list's currency. + """ + PRICES_TO_ADD_CURRENCY_MISMATCH + + """ + Exceeded the 10000 prices to add limit. + """ + PRICE_LIMIT_EXCEEDED + + """ + Price list does not exist. + """ + PRICE_LIST_DOES_NOT_EXIST + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST +} + +""" +Return type for `priceListFixedPricesByProductUpdate` mutation. +""" +type PriceListFixedPricesByProductUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The compare-at price of the product variant on this price list. + """ + compareAtPrice: MoneyInput + + """ + The price of the product variant on this price list. + """ + price: MoneyInput! + + """ + The product variant ID associated with the price list price. + """ + variantId: ID! @gidTypes(types: ["ProductVariant"]) +} + +""" +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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + 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 + + """ + The specified currency doesn't match the price list's currency. + """ + PRICE_LIST_CURRENCY_MISMATCH + + """ + The price list doesn't exist. + """ + PRICE_LIST_NOT_FOUND + + """ + Only fixed prices can be deleted. + """ + PRICE_NOT_FIXED + + """ + A fixed price for the specified product variant doesn't exist. + """ + VARIANT_NOT_FOUND +} + +""" +The input fields representing the price for all variants of a product. +""" +input PriceListProductPriceInput @componentName(name: "merchandising") { + """ + Specifies the compare-at price and currency to apply to the product's variants on the price list. + """ + compareAtPrice: MoneyInput + + """ + Specifies the price and currency to apply to the product's variants on the price list. + """ + price: MoneyInput! + + """ + Specifies the ID of the product to update its variants for. + """ + productId: ID! @gidTypes(types: ["Product"]) +} + +""" +The set of valid sort keys for the PriceList query. +""" +enum PriceListSortKeys @componentName(name: "platform") { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME +} + +""" +The input fields used to update a price list. +""" +input PriceListUpdateInput @componentName(name: "merchandising") { + """ + The ID of the catalog to associate with this price list. + """ + catalogId: ID @gidTypes(types: ["Catalog"]) + + """ + The three-letter currency code for fixed prices associated with this price list. + """ + currency: CurrencyCode + + """ + The unique name of the price list, used as a human-readable identifier. + """ + name: String + + """ + Relative adjustments to other prices. + """ + parent: PriceListParentUpdateInput +} + +""" +Return type for `priceListUpdate` mutation. +""" +type PriceListUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + 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 + + """ + Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. + """ + CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES + + """ + 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 + + """ + The company location could not be found. + """ + COMPANY_LOCATION_NOT_FOUND + + """ + Only one context rule option may be specified. + """ + CONTEXT_RULE_LIMIT_ONE_OPTION + + """ + A country catalog cannot be assigned to a price list. + """ + COUNTRY_PRICE_LIST_ASSIGNMENT + + """ + A price list’s currency must be the market currency. + """ + CURRENCY_MARKET_MISMATCH + + """ + The price list currency is not supported by the shop's payment gateway. + """ + CURRENCY_NOT_SUPPORTED + + """ + Something went wrong when trying to save the price list. Please try again. + """ + GENERIC_ERROR + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The adjustment value must not be greater than 1000% for `type` `PERCENTAGE_INCREASE`. + """ + INVALID_ADJUSTMENT_MAX_VALUE + + """ + The adjustment value must not be greater than 100% for `type` `PERCENTAGE_DECREASE`. + """ + INVALID_ADJUSTMENT_MIN_VALUE + + """ + 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 price list is currently being modified. Please try again later. + """ + PRICE_LIST_LOCKED + + """ + Cannot create price list for a primary market. + """ + PRICE_LIST_NOT_ALLOWED_FOR_PRIMARY_MARKET + + """ + The specified price list doesn't exist. + """ + PRICE_LIST_NOT_FOUND + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG +} + +""" +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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") @protectedObject(subject: "customer") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | times_used | integer | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): PriceRuleDiscountCodeConnection! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 @componentName(name: "pricing") { + """ + The value will be applied once across the entitled items. + """ + ACROSS + + """ + The value will be applied to each of the entitled items. + """ + EACH +} + +""" +A selection of customers for whom the price rule applies. +""" +type PriceRuleCustomerSelection @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + List of customers to whom the price rule applies. + """ + customers( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | accepts_marketing | boolean | Filter by whether a customer has consented + to receive marketing material. | | | - `accepts_marketing:true` | + | 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` | + | 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'` | + | 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:*` | + | first_name | string | Filter by the customer's first name. | | | - `first_name:Jane` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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'` | + | last_name | string | Filter by the customer's last name. | | | - `last_name:Reeves` | + | 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'` | + | orders_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` | + | 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:*` | + | 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` | + | 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'` | + | 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'` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + The price rule supports bulk discounts. + """ + BULK + + """ + 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 discounts that require a quantity. + """ + QUANTITY_DISCOUNTS + + """ + The price rule targets specific customers. + """ + SPECIFIC_CUSTOMERS +} + +""" +The value of a fixed amount price rule. +""" +type PriceRuleFixedAmountValue @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + The collections to which the price rule applies. + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CollectionConnection! + + """ + The product variants to which the price rule applies. + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductVariantConnection! + + """ + The products to which the price rule applies. + """ + products( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + The collections required for the price rule to be applicable. + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CollectionConnection! + + """ + The product variants required for the price rule to be applicable. + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductVariantConnection! + + """ + The products required for the price rule to be applicable. + """ + products( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductConnection! +} + +""" +A money range within which the price rule is applicable. +""" +type PriceRuleMoneyRange @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + The URL lands on a collection page. + """ + COLLECTION + + """ + The URL lands on a home page. + """ + HOME + + """ + The URL lands on a product page. + """ + PRODUCT +} + +""" +The shipping lines to which the price rule applies to. +""" +type PriceRuleShippingLineEntitlements @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") { + """ + The price rule supports bulk discounts. + """ + BULK + + """ + 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 discounts that require a quantity. + """ + QUANTITY_DISCOUNTS + + """ + The price rule targets specific customers. + """ + SPECIFIC_CUSTOMERS +} + +""" +A time period during which a price rule is applicable. +""" +type PriceRuleValidityPeriod @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { + """ + 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") = 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 @componentName(name: "pricing") { + """ + 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 @componentName(name: "pricing") = MoneyV2 | PricingPercentageValue + +""" +A country code from the `ISO 3166` standard. e.g. `CA` for Canada. +""" +enum PrivacyCountryCode @componentName(name: "privacy") { + """ + 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 `AN`. + """ + AN + + """ + 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 `XX`. + """ + XX + + """ + 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 +} + +""" +Return type for `privacyFeaturesDisable` mutation. +""" +type PrivacyFeaturesDisablePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Failed to disable privacy features. + """ + FAILED +} + +""" +The input fields for a shop's privacy settings. +""" +enum PrivacyFeaturesEnum @componentName(name: "privacy") { + """ + 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 @requiredAccess(scope: "`read_privacy_settings` access scope.") @componentName(name: "privacy") { + """ + Whether the policy is auto managed. + """ + autoManaged: Boolean! + + """ + Policy template supported locales. + """ + supportedLocales: [String!]! +} + +""" +A shop's privacy settings. +""" +type PrivacySettings @requiredAccess(scope: "`read_privacy_settings` access scope.") @componentName(name: "privacy") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | collection_type | string | | - `custom`
- `smart` | + | handle | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | product_id | id | Filter by collections containing a product by its ID. | + | 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` | + | 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` | + | published_at | time | Filter by the date and time when the collection was published to the Online Store. | + | 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` | + | title | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 gift card settings for this product. Only available on gift card products. + """ + giftCardSettings: GiftCardProductSettings + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + Crops the image according to the specified region. + """ + crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Image height in pixels between 1 and 2048. + """ + maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") + + """ + Image width in pixels between 1 and 2048. + """ + maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead.") + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + 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.") + + """ + 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! @gidTypes(types: ["Collection"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | media_type | string | | - `IMAGE`
- `VIDEO`
- `MODEL_3D`
- `EXTERNAL_VIDEO` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-1234` | + | 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` | + | 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` | + | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) + field. | | | - `collection_id:108179161409` | + | 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` | + | 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'` | + | 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` | + | error_feedback | string | Filter by products with publishing errors. | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | 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` | + | has_only_composites | boolean | Filter by products that have only + composite variants. | | | - `has_only_composites:true` | + | 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` | + | has_variant_with_components | boolean | Filter by products that have + variants with associated components. | | | - + `has_variant_with_components:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_total | integer | Filter by inventory count. | | | - + `inventory_total:0`
- `inventory_total:>150`
- + `inventory_total:>=200` | + | 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` | + | 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"` | + | out_of_stock_somewhere | boolean | Filter by products that are out of + stock in at least one location. | | | - `out_of_stock_somewhere:true` | + | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) + field. | | | - `price:100.57` | + | 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` | + | 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` | + | product_type | string | Filter by a comma-separated list of [product + types](https://help.shopify.com/manual/products/details/product-type). | | | + - `product_type:snowboard` | + | publication_ids | string | Filter by a comma-separated list of publication + IDs that are associated with the product. | | | - + `publication_ids:184111530305,184111694145` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | `active` | - + `status:active,draft` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) + field. | | | - `title:The Minimal Snowboard` | + | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + enabled. | | | - `tracks_inventory:true` | + | 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'` | + | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) + field. | | | - `variant_id:45779434701121` | + | 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'` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductConnection! + + """ + A list of the channels where the product is published. + """ + productPublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + A list of the channels where the product is published. + """ + publications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Return only the publications that are published. If false, then return all publications. + """ + onlyPublished: Boolean = true + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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! @requiredAccess(scope: "`read_publications` access scope.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! @gidTypes(types: ["Channel"]) + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + 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! @gidTypes(types: ["Publication"]) + ): 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.") @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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). + """ + resourcePublicationsV2( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationV2Connection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @gidTypes(types: ["Market"]) + ): [Translation!]! + + """ + The list of channels that the resource is not published to. + """ + unpublishedChannels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The product that's related as a component. + """ + componentProduct: Product! + + """ + The list of products' variants that are components. + """ + componentVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The options to use in the component product, and the values for the option. + """ + optionSelections: [ProductBundleComponentOptionSelectionInput!]! + + """ + The ID of the component product to add to the bundle product. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + The quantity of the component product to add to the bundle product. This field can't exceed 2000. + """ + quantity: Int + + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The ID of the option present on the component product. + """ + componentOptionId: ID! @gidTypes(types: ["ProductOption"]) + + """ + 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 @componentName(name: "merchandising") { + """ + 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 is selected as sellable in the bundle. + """ + SELECTED + + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + Selection status of the option. + """ + selectionStatus: ProductBundleComponentOptionSelectionStatus! + + """ + The value of the option. + """ + value: String! +} + +""" +A quantity option related to a bundle. +""" +type ProductBundleComponentQuantityOption @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @gidTypes(types: ["ProductOption"]) + + """ + The value to use for the component option (e.g., 'Small', 'Red'). + """ + componentOptionValue: String! +} + +""" +The input fields for a consolidated option on a componentized product. +""" +input ProductBundleConsolidatedOptionInput @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The component mappings that define how this option value maps to specific component options. + """ + components: [ProductBundleConsolidatedOptionComponentInput!]! + + """ + The value for this consolidated option selection (e.g., 'Small', 'Medium', 'Large'). + """ + optionValue: String! +} + +""" +The input fields for creating a componentized product. +""" +input ProductBundleCreateInput @componentName(name: "merchandising") { + """ + The component products to bundle with the bundle product. + """ + components: [ProductBundleComponentInput!]! + + """ + The consolidated options of the componentized product to create, if provided. + """ + consolidatedOptions: [ProductBundleConsolidatedOptionInput!] + + """ + The title of the product to create. + """ + title: String! +} + +""" +Return type for `productBundleCreate` mutation. +""" +type ProductBundleCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + Input is not valid. + """ + INVALID_INPUT + + """ + Error processing request in the background job. + """ + JOB_ERROR + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST +} + +""" +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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The components to update existing ones. If none provided, no changes occur. + Note: This replaces, not adds to, current components. + """ + components: [ProductBundleComponentInput!] + + """ + The consolidated options of the componentized product to update, if provided. + """ + consolidatedOptions: [ProductBundleConsolidatedOptionInput!] + + """ + The ID of the componentized product to update. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + The title to rename the componentized product to, if provided. + """ + title: String +} + +""" +Return type for `productBundleUpdate` mutation. +""" +type ProductBundleUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The product taxonomy node associated with the product category. + """ + productTaxonomyNode: ProductTaxonomyNode +} + +""" +Return type for `productChangeStatus` mutation. +""" +type ProductChangeStatusPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Cannot be unarchived because combined listings are not compatible with this store. + """ + COMBINED_LISTINGS_NOT_COMPATIBLE_WITH_SHOP + + """ + Product could not be found. + """ + PRODUCT_NOT_FOUND +} + +""" +The input fields to claim ownership for Product features such as Bundles. +""" +input ProductClaimOwnershipInput @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The highest variant's compare-at price. + """ + maxVariantCompareAtPrice: MoneyV2! + + """ + The lowest variant's compare-at price. + """ + minVariantCompareAtPrice: MoneyV2! +} + +""" +The product component information. +""" +type ProductComponentType @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The list of products' variants that are components. + """ + componentVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 + + """ + 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 + + """ + A list of collection IDs to associate with the product. + """ + collectionsToJoin: [ID!] @gidTypes(types: ["Collection"]) + + """ + The role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). + """ + combinedListingRole: CombinedListingsRole + + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + Whether the product is a gift card. + """ + giftCard: Boolean + + """ + 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 + + """ + 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 [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 type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + 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 [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus + + """ + 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 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 +} + +""" +Return type for `productCreateMedia` mutation. +""" +type ProductCreateMediaPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The ID of the product. + """ + id: ID! @gidTypes(types: ["Product"]) +} + +""" +Return type for `productDeleteMedia` mutation. +""" +type ProductDeleteMediaPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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!]! +} + +""" +Controls which product discounts can apply together on the same cart line. By +default, only one product discount applies per line. Available only on a Shopify +Plus plan. + +For discounts to apply together, they must match tags in both directions. Each +discount has two tag sets: the tags that identify the discount, and the tags that +it agrees to apply with. Use the `tags` field on the discount input to set the +discount's own tags. Use this input object to set the tags that the discount can +apply with. Two discounts apply together only if each one allows at least one tag +that the other is tagged with. Any number of product discounts can apply to the +same line if this two-way match holds for every pair in the group. + +Example: Discount A is tagged with `LOYALTY` and allows `SEASONAL`, and Discount B +is tagged with `SEASONAL` and allows `LOYALTY`. They apply together. To add a +third discount, it must meet the same mutual-match rule with both A and B. +""" +input ProductDiscountsWithTagsOnSameCartLineInput @componentName(name: "pricing") { + """ + The tags to add to this discount's combination list. This field doesn't add + tags to the discount itself. To change the tags on the discount, use the + discount input's `tags` field or the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + and [`tagsRemove`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsremove) + mutations. + + If another product discount has a matching tag and also allows at least one + tag on this discount, then both discounts can apply to the same cart line. + """ + add: [String!] + + """ + The tags to remove from this discount's combination list. This field doesn't + remove tags from the discount itself. To change the tags on the discount, use + the discount input's `tags` field or the + [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) + and [`tagsRemove`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsremove) + mutations. + + If this discount and another product discount still match tags in both + directions after the removal, then both discounts can still apply to the same + cart line. + """ + remove: [String!] +} + +""" +Represents a product duplication job. +""" +type ProductDuplicateJob @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_product_listings` access scope.") @componentName(name: "channels") { + """ + The ID of the channel to associate with the product feed. + """ + channelId: ID! + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID + + """ + The input value is already taken. + """ + TAKEN +} + +""" +Return type for `productFeedDelete` mutation. +""" +type ProductFeedDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +An auto-generated type which holds one ProductFeed and a cursor during pagination. +""" +type ProductFeedEdge @componentName(name: "channels") { + """ + 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 @componentName(name: "channels") { + """ + The ID of the channel to associate with the product feed. + """ + channelId: ID @gidTypes(types: ["Channel", "Publication"]) + + """ + The country of the product feed. + """ + country: CountryCode! + + """ + The language of the product feed. + """ + language: LanguageCode! +} + +""" +The valid values for the status of product feed. +""" +enum ProductFeedStatus @componentName(name: "channels") { + """ + The product feed is active. + """ + ACTIVE + + """ + The product feed is inactive. + """ + INACTIVE +} + +""" +Return type for `productFullSync` mutation. +""" +type ProductFullSyncPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +The input fields for identifying a product. +""" +input ProductIdentifierInput @oneOf @componentName(name: "merchandising") { + """ + 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 ID of the product. + """ + id: ID +} + +""" +The set of valid sort keys for the ProductImage query. +""" +enum ProductImageSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 + + """ + 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 + + """ + A list of collection IDs to associate with the product. + """ + collectionsToJoin: [ID!] @gidTypes(types: ["Collection"]) + + """ + The collection IDs to disassociate from the product. + """ + collectionsToLeave: [ID!] @gidTypes(types: ["Collection"]) + + """ + 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 description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + Whether the product is a gift card. + """ + giftCard: Boolean + + """ + 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 + + """ + 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 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 @gidTypes(types: ["Product"]) + + """ + 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") + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: String + + """ + 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") + + """ + 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 + + """ + 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 [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus + + """ + 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 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 +} + +""" +Return type for `productJoinSellingPlanGroups` mutation. +""" +type ProductJoinSellingPlanGroupsPayload @componentName(name: "platform") { + """ + The product object. + """ + product: Product + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SellingPlanGroupUserError!]! +} + +""" +Return type for `productLeaveSellingPlanGroups` mutation. +""" +type ProductLeaveSellingPlanGroupsPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Operation is currently running. + """ + ACTIVE + + """ + Operation is complete. + """ + COMPLETE + + """ + Operation has been created. + """ + CREATED +} + +""" +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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @gidTypes(types: ["Market"]) + ): [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 @componentName(name: "merchandising") { + """ + 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 + + """ + 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 +} + +""" +The set of strategies available for use on the `productOptionDelete` mutation. +""" +enum ProductOptionDeleteStrategy @componentName(name: "merchandising") { + """ + The default strategy, the specified `Option` may only have one corresponding `value`. + """ + DEFAULT + + """ + An `Option` with multiple `values` can be deleted, but the operation only succeeds if no product variants get deleted. + """ + NON_DESTRUCTIVE + + """ + An `Option` with multiple `values` can be deleted. Remaining variants will be + deleted, highest `position` first, in the event of duplicates being detected. + """ + POSITION +} + +""" +Return type for `productOptionUpdate` mutation. +""" +type ProductOptionUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + An option cannot have both metafield linked and nonlinked option values. + """ + CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES + + """ + The number of variants will be above the limit after this operation. + """ + CANNOT_CREATE_VARIANTS_ABOVE_LIMIT + + """ + Deleting all option values of an option is not allowed. + """ + CANNOT_DELETE_ALL_OPTION_VALUES_IN_OPTION + + """ + Cannot update the option because it would result in deleting variants, and you don't have the required permissions. + """ + CANNOT_DELETE_VARIANT_WITHOUT_PERMISSION + + """ + An option cannot be left only with option values that are not linked to any variant. + """ + CANNOT_LEAVE_OPTIONS_WITHOUT_VARIANTS + + """ + At least one of the product variants has invalid SKUs. + """ + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """ + Duplicated option value. + """ + DUPLICATED_OPTION_VALUE + + """ + Cannot link multiple options to the same metafield. + """ + DUPLICATE_LINKED_OPTION + + """ + Invalid metafield value for linked option. + """ + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """ + The name provided is not valid. + """ + INVALID_NAME + + """ + The option position provided is not valid. + """ + INVALID_POSITION + + """ + A key is missing in the input. + """ + KEY_MISSING_IN_INPUT + + """ + No valid metafield definition found for linked option. + """ + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """ + Linked options are currently not supported for this shop. + """ + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """ + Updating the linked_metafield of an option requires a linked_metafield_value for each option value. + """ + LINKED_OPTION_UPDATE_MISSING_VALUES + + """ + On create, this key cannot be used. + """ + NO_KEY_ON_CREATE + + """ + Option already exists. + """ + OPTION_ALREADY_EXISTS + + """ + Option does not exist. + """ + OPTION_DOES_NOT_EXIST + + """ + An option linked to the provided metafield already exists. + """ + OPTION_LINKED_METAFIELD_ALREADY_TAKEN + + """ + Option name is too long. + """ + OPTION_NAME_TOO_LONG + + """ + Option values count is over the allowed limit. + """ + OPTION_VALUES_OVER_LIMIT + + """ + Option value already exists. + """ + OPTION_VALUE_ALREADY_EXISTS + + """ + Performing conflicting actions on an option value. + """ + OPTION_VALUE_CONFLICTING_OPERATION + + """ + Option value does not exist. + """ + OPTION_VALUE_DOES_NOT_EXIST + + """ + Option value with variants linked cannot be deleted. + """ + OPTION_VALUE_HAS_VARIANTS + + """ + Option value name is too long. + """ + OPTION_VALUE_NAME_TOO_LONG + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + The number of option values created with the MANAGE strategy would exceed the variant limit. + """ + TOO_MANY_VARIANTS_CREATED + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION +} + +""" +The set of variant strategies available for use in the `productOptionUpdate` mutation. +""" +enum ProductOptionUpdateVariantStrategy @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @gidTypes(types: ["Market"]) + ): [Translation!]! +} + +""" +A swatch associated with a product option value. +""" +type ProductOptionValueSwatch @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The color representation of the swatch. + """ + color: Color + + """ + An image representation of the swatch. + """ + image: MediaImage +} + +""" +Return type for `productOptionsCreate` mutation. +""" +type ProductOptionsCreatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + Cannot combine linked metafield and option values. + """ + CANNOT_COMBINE_LINKED_METAFIELD_AND_OPTION_VALUES + + """ + At least one of the product variants has invalid SKUs. + """ + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """ + Duplicated option name. + """ + DUPLICATED_OPTION_NAME + + """ + Duplicated option value. + """ + DUPLICATED_OPTION_VALUE + + """ + Cannot link multiple options to the same metafield. + """ + DUPLICATE_LINKED_OPTION + + """ + Invalid metafield value for linked option. + """ + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """ + The name provided is not valid. + """ + INVALID_NAME + + """ + No valid metafield definition found for linked option. + """ + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """ + Cannot specify 'linkedMetafieldValue' for an option that is not linked to a metafield. + """ + LINKED_METAFIELD_VALUE_WITHOUT_LINKED_OPTION + + """ + Linked options are currently not supported for this shop. + """ + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """ + Missing metafield values for linked option. + """ + MISSING_METAFIELD_VALUES_FOR_LINKED_OPTION + + """ + Cannot create new options without values for all existing variants. + """ + NEW_OPTION_WITHOUT_VALUE_FOR_EXISTING_VARIANTS + + """ + Options count is over the allowed limit. + """ + OPTIONS_OVER_LIMIT + + """ + Option already exists. + """ + OPTION_ALREADY_EXISTS + + """ + An option linked to the provided metafield already exists. + """ + OPTION_LINKED_METAFIELD_ALREADY_TAKEN + + """ + Each option must have a name specified. + """ + OPTION_NAME_MISSING + + """ + Option name is too long. + """ + OPTION_NAME_TOO_LONG + + """ + If specified, position field must be present in all option inputs. + """ + OPTION_POSITION_MISSING + + """ + Each option must have at least one option value specified. + """ + OPTION_VALUES_MISSING + + """ + Option values count is over the allowed limit. + """ + OPTION_VALUES_OVER_LIMIT + + """ + Option value name is too long. + """ + OPTION_VALUE_NAME_TOO_LONG + + """ + Position must be between 1 and the maximum number of options per product. + """ + POSITION_OUT_OF_BOUNDS + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + The number of option values created with the CREATE strategy would exceed the variant limit. + """ + TOO_MANY_VARIANTS_CREATED + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION +} + +""" +Return type for `productOptionsDelete` mutation. +""" +type ProductOptionsDeletePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + Can't delete option with multiple values. + """ + CANNOT_DELETE_OPTION_WITH_MULTIPLE_VALUES + + """ + Cannot perform option deletion because it would result in deleting variants, and you don't have the required permissions. + """ + CANNOT_DELETE_VARIANT_WITHOUT_PERMISSION + + """ + At least one of the product variants has invalid SKUs. + """ + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """ + Cannot delete options without deleting variants. + """ + CANNOT_USE_NON_DESTRUCTIVE_STRATEGY + + """ + Options do not belong to the same product. + """ + OPTIONS_DO_NOT_BELONG_TO_THE_SAME_PRODUCT + + """ + Option does not exist. + """ + OPTION_DOES_NOT_EXIST + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION +} + +""" +Return type for `productOptionsReorder` mutation. +""" +type ProductOptionsReorderPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + At least one of the product variants has invalid SKUs. + """ + CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU + + """ + Duplicated option name. + """ + DUPLICATED_OPTION_NAME + + """ + Duplicated option value. + """ + DUPLICATED_OPTION_VALUE + + """ + Missing option name. + """ + MISSING_OPTION_NAME + + """ + Missing option value. + """ + MISSING_OPTION_VALUE + + """ + Cannot specify different options or option values using mixed id and name reference key. + """ + MIXING_ID_AND_NAME_KEYS_IS_NOT_ALLOWED + + """ + On reorder, this key cannot be used. + """ + NO_KEY_ON_REORDER + + """ + Option id does not exist. + """ + OPTION_ID_DOES_NOT_EXIST + + """ + Option name does not exist. + """ + OPTION_NAME_DOES_NOT_EXIST + + """ + Option value does not exist. + """ + OPTION_VALUE_DOES_NOT_EXIST + + """ + Option value id does not exist. + """ + OPTION_VALUE_ID_DOES_NOT_EXIST + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED +} + +""" +The input fields for which fields the user chose to show/hide when they edited a product. +""" +input ProductPreferencesInput @componentName(name: "merchandising") { + """ + Whether the international shipping fields should be shown by default. + """ + showInternationalShipping: Boolean! + + """ + Whether the SKU and barcode fields should be shown by default. + """ + showSkuAndBarcode: Boolean! +} + +""" +The price range of the product. +""" +type ProductPriceRange @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The highest variant's price. + """ + maxVariantPrice: MoneyV2! + + """ + The lowest variant's price. + """ + minVariantPrice: MoneyV2! +} + +""" +The price range of the product. +""" +type ProductPriceRangeV2 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The highest variant's price. + """ + maxVariantPrice: MoneyV2! + + """ + The lowest variant's price. + """ + minVariantPrice: MoneyV2! +} + +""" +Represents the channels where a product is published. +""" +type ProductPublication @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + channelHandle: String @deprecated(reason: "Use publicationId instead.") + + """ + ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") @gidTypes(types: ["Channel"]) + + """ + ID of the publication. + """ + publicationId: ID @gidTypes(types: ["Publication"]) + + """ + 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 @componentName(name: "merchandising") { + """ + The product to create or update publications for. + """ + id: ID! @gidTypes(types: ["Product"]) + + """ + The publication that the product is published to. + """ + productPublications: [ProductPublicationInput!]! +} + +""" +Return type for `productPublish` mutation. +""" +type ProductPublishPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") @componentName(name: "apps") { + """ + The channel this feedback is for. + """ + channel: Channel + + """ + 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 @componentName(name: "apps") { + """ + The ID of the channel that the feedback is for. Used to scope feedback to a + specific sales channel when the app has multiple channels. + """ + channelId: ID @gidTypes(types: ["Channel"]) + + """ + 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! + + """ + 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!] + + """ + The ID of the product that the feedback was created on. + """ + productId: ID! @gidTypes(types: ["Product"]) + + """ + The timestamp of the product associated with the feedback. + """ + productUpdatedAt: DateTime! + + """ + Whether the merchant needs to take action on the product. + """ + state: ResourceFeedbackState! +} + +""" +A sale associated with a product. +""" +type ProductSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "merchandising") { + """ + Custom ID of product to upsert. + """ + customId: UniqueMetafieldValueInput + + """ + Handle of product to upsert. + """ + handle: String + + """ + ID of product to update. + """ + id: ID +} + +""" +The input fields required to create or update a product via ProductSet mutation. +""" +input ProductSetInput @componentName(name: "merchandising") { + """ + 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 + + """ + 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 IDs of collections that this product will be a member of. + """ + collections: [ID!] @gidTypes(types: ["Collection"]) + + """ + The role of the product in a product grouping. It can only be set during creation. + """ + combinedListingRole: CombinedListingsRole + + """ + The description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: String + + """ + The files to associate with the product. + + Complexity cost: 1.9 per file. + """ + files: [FileSetInput!] + + """ + Whether the product is a gift card. + """ + giftCard: Boolean + + """ + 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 + + """ + 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 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") @gidTypes(types: ["Product"]) + + """ + The metafields to associate with this product. + + Complexity cost: 0.4 per metafield. + """ + metafields: [MetafieldInput!] + + """ + List of custom product options and option values (maximum of 3 per product). + """ + productOptions: [OptionSetInput!] + + """ + The [product type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: 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 + + """ + 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 [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The status of the product. + """ + status: ProductStatus + + """ + 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 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 + + """ + A list of variants associated with the product. + + Complexity cost: 0.2 per variant. + """ + variants: [ProductVariantSetInput!] + + """ + The name of the product's vendor. + """ + vendor: String +} + +""" +The input fields required to set inventory quantities using `productSet` mutation. +""" +input ProductSetInventoryInput @componentName(name: "merchandising") { + """ + The ID of the location of the inventory quantity being set. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + An option cannot have both metafield linked and nonlinked option values. + """ + CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + Duplicated metafield value for linked option. + """ + DUPLICATED_METAFIELD_VALUE + + """ + Duplicated option name. + """ + DUPLICATED_OPTION_NAME + + """ + Duplicated option value. + """ + DUPLICATED_OPTION_VALUE + + """ + Duplicated value. + """ + DUPLICATED_VALUE + + """ + Cannot link multiple options to the same metafield. + """ + DUPLICATE_LINKED_OPTION + + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + 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 + + """ + Handle already in use. Please provide a new handle. + """ + HANDLE_NOT_UNIQUE + + """ + The id field is not allowed if identifier is provided. + """ + ID_NOT_ALLOWED + + """ + The identifier value does not match the value of the corresponding field in the input. + """ + INPUT_MISMATCH + + """ + Input is not valid. + """ + INVALID_INPUT + + """ + Metafield is not valid. + """ + INVALID_METAFIELD + + """ + Invalid metafield value for linked option. + """ + INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION + + """ + Product is not valid. + """ + INVALID_PRODUCT + + """ + Product variant is not valid. + """ + INVALID_VARIANT + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED + + """ + Error processing request in the background job. + """ + JOB_ERROR + + """ + No valid metafield definition found for linked option. + """ + LINKED_METAFIELD_DEFINITION_NOT_FOUND + + """ + Linked options are currently not supported for this shop. + """ + LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP + + """ + The input argument `metafields` (if present) must contain the `customId` value. + """ + METAFIELD_MISMATCH + + """ + The input field corresponding to the identifier is required. + """ + MISSING_FIELD_REQUIRED + + """ + Resource matching the identifier was not found. + """ + NOT_FOUND + + """ + Options over limit. + """ + OPTIONS_OVER_LIMIT + + """ + Option does not exist. + """ + OPTION_DOES_NOT_EXIST + + """ + Each option must have at least one option value specified. + """ + OPTION_VALUES_MISSING + + """ + Option values over limit. + """ + OPTION_VALUES_OVER_LIMIT + + """ + Option value does not exist. + """ + OPTION_VALUE_DOES_NOT_EXIST + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Must specify product options when updating variants. + """ + PRODUCT_OPTIONS_INPUT_MISSING + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Product variant does not exist. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST + + """ + Must specify variants when updating options. + """ + VARIANTS_INPUT_MISSING + + """ + Number of product variants exceeds shop limit. + """ + VARIANTS_OVER_LIMIT +} + +""" +The set of valid sort keys for the Product query. +""" +enum ProductSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 archived. + """ + isArchived: Boolean! + + """ + 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! +} + +""" +An auto-generated type for paginating through multiple ProductTaxonomyNodes. +""" +type ProductTaxonomyNodeConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ProductTaxonomyNodeEdge!]! + + """ + A list of nodes that are contained in ProductTaxonomyNodeEdge. 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: [ProductTaxonomyNode!]! + + """ + 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 ProductTaxonomyNode and a cursor during pagination. +""" +type ProductTaxonomyNodeEdge @componentName(name: "merchandising") { + """ + 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 ProductTaxonomyNodeEdge. + """ + node: ProductTaxonomyNode! +} + +""" +The input fields for specifying a product to unpublish from a channel and the sales channels to unpublish it from. +""" +input ProductUnpublishInput @componentName(name: "merchandising") { + """ + The ID of the product to create or update publications for. + """ + id: ID! @gidTypes(types: ["Product"]) + + """ + The channels to unpublish the product from. + """ + productPublications: [ProductPublicationInput!]! +} + +""" +Return type for `productUnpublish` mutation. +""" +type ProductUnpublishPayload @componentName(name: "platform") { + """ + 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 required to identify a product for update. +""" +input ProductUpdateIdentifiers @oneOf @componentName(name: "merchandising") { + """ + Custom ID of product to update. + """ + customId: UniqueMetafieldValueInput + + """ + Handle of product to update. + """ + handle: String + + """ + ID of product to update. + """ + id: ID +} + +""" +The input fields for updating a product. +""" +input ProductUpdateInput @componentName(name: "merchandising") { + """ + 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 + + """ + A list of collection IDs to associate with the product. + """ + collectionsToJoin: [ID!] @gidTypes(types: ["Collection"]) + + """ + The collection IDs to disassociate from the product. + """ + collectionsToLeave: [ID!] @gidTypes(types: ["Collection"]) + + """ + 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 description of the product, with HTML tags. + For example, the description might include bold `` and italic `` text. + """ + descriptionHtml: 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 + + """ + 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 product's ID. + """ + id: ID @gidTypes(types: ["Product"]) + + """ + 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 type](https://help.shopify.com/manual/products/details/product-type) + that merchants define. + """ + productType: 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 + + """ + 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 [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) + that are associated with a product. + """ + seo: SEOInput + + """ + The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), + which controls visibility across all sales channels. + """ + status: ProductStatus + + """ + 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 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 +} + +""" +Return type for `productUpdateMedia` mutation. +""" +type ProductUpdateMediaPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 & Publishable @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + Whether the product variant is available for sale. + """ + availableForSale: Boolean! + + """ + 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 @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 + + """ + The delivery promise participants for the product variant. + """ + deliveryPromiseParticipants( + """ + The branded promise handle to filter by. + """ + brandedPromiseHandle: String! + ): [DeliveryPromiseParticipant!]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): EventConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The featured image for the variant. + """ + image( + """ + Crops the image according to the specified region. + """ + crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") + + """ + Image height in pixels between 1 and 2048. + """ + maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") + + """ + Image width in pixels between 1 and 2048. + """ + maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The presentment currencies prices should return in. + """ + presentmentCurrencies: [CurrencyCode!] + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-1234` | + | 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` | + | 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` | + | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) + field. | | | - `collection_id:108179161409` | + | 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` | + | 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'` | + | 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` | + | error_feedback | string | Filter by products with publishing errors. | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | 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` | + | has_only_composites | boolean | Filter by products that have only + composite variants. | | | - `has_only_composites:true` | + | 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` | + | has_variant_with_components | boolean | Filter by products that have + variants with associated components. | | | - + `has_variant_with_components:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_total | integer | Filter by inventory count. | | | - + `inventory_total:0`
- `inventory_total:>150`
- + `inventory_total:>=200` | + | 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` | + | 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"` | + | out_of_stock_somewhere | boolean | Filter by products that are out of + stock in at least one location. | | | - `out_of_stock_somewhere:true` | + | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) + field. | | | - `price:100.57` | + | 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` | + | 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` | + | product_type | string | Filter by a comma-separated list of [product + types](https://help.shopify.com/manual/products/details/product-type). | | | + - `product_type:snowboard` | + | publication_ids | string | Filter by a comma-separated list of publication + IDs that are associated with the product. | | | - + `publication_ids:184111530305,184111694145` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | `active` | - + `status:active,draft` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) + field. | | | - `title:The Minimal Snowboard` | + | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + enabled. | | | - `tracks_inventory:true` | + | 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'` | + | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) + field. | | | - `variant_id:45779434701121` | + | 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'` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductConnection! + + """ + A list of the product variant components. + """ + productVariantComponents( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductVariantComponentConnection! + + """ + 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.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! @gidTypes(types: ["Channel"]) + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + 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! @gidTypes(types: ["Publication"]) + ): 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! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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). + """ + resourcePublicationsV2( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationV2Connection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @gidTypes(types: ["Market"]) + ): [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 list of channels that the resource is not published to. + """ + unpublishedChannels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 @componentName(name: "merchandising") { + """ + Specifies the media to append to the variant. + """ + mediaIds: [ID!]! @gidTypes(types: ["Media"]) + + """ + Specifies the variant to which media will be appended. + """ + variantId: ID! @gidTypes(types: ["ProductVariant"]) +} + +""" +Return type for `productVariantAppendMedia` mutation. +""" +type ProductVariantAppendMediaPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "merchandising") { + """ + Specifies the media to detach from the variant. + """ + mediaIds: [ID!]! @gidTypes(types: ["Media"]) + + """ + Specifies the variant from which media will be detached. + """ + variantId: ID! @gidTypes(types: ["ProductVariant"]) +} + +""" +Return type for `productVariantDetachMedia` mutation. +""" +type ProductVariantDetachMediaPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The ID of the product variant that's a component of the bundle. + """ + id: ID! @gidTypes(types: ["ProductVariant"]) + + """ + 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 @componentName(name: "merchandising") { + """ + The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the product variant. + """ + customId: UniqueMetafieldValueInput + + """ + The ID of the product variant. + """ + id: ID +} + +""" +The valid values for the inventory policy of a product variant once it is out of stock. +""" +enum ProductVariantInventoryPolicy @componentName(name: "merchandising") { + """ + Customers can buy this product variant after it's out of stock. + """ + CONTINUE + + """ + Customers can't buy this product variant after it's out of stock. + """ + DENY +} + +""" +Return type for `productVariantJoinSellingPlanGroups` mutation. +""" +type ProductVariantJoinSellingPlanGroupsPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + Specifies the ID of the product variant to update. + """ + id: ID! @gidTypes(types: ["ProductVariant"]) + + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Combined listing cannot be child product variants. + """ + CHILD_PRODUCT_VARIANT_CANNOT_BE_COMBINED_LISTING + + """ + A parent product variant cannot contain itself as a component. + """ + CIRCULAR_REFERENCE + + """ + 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 + + """ + Unable to create parent product variant. + """ + FAILED_TO_CREATE + + """ + Unable to remove product variant relationships. + """ + FAILED_TO_REMOVE + + """ + Unable to update product variant relationships. + """ + FAILED_TO_UPDATE + + """ + Unable to update parent product variant price. + """ + FAILED_TO_UPDATE_PARENT_PRODUCT_VARIANT_PRICE + + """ + Product variant relationships must have a quantity greater than 0. + """ + INVALID_QUANTITY + + """ + The product variant relationships to remove must be specified if all the + parent product variant's components aren't being removed. + """ + MUST_SPECIFY_COMPONENTS + + """ + Nested parent product variants aren't supported. + """ + NESTED_PARENT_PRODUCT_VARIANT + + """ + Combined listing cannot be parent product variants. + """ + PARENT_PRODUCT_VARIANT_CANNOT_BE_COMBINED_LISTING + + """ + 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 + + """ + A parent product variant ID or product ID must be provided. + """ + PARENT_REQUIRED + + """ + The products for these product variants are already owned by another App. + """ + PRODUCT_EXPANDER_APP_OWNERSHIP_ALREADY_EXISTS + + """ + Some of the provided product variants are not components of the specified parent product variant. + """ + PRODUCT_VARIANTS_NOT_COMPONENTS + + """ + The product variants were not found. + """ + PRODUCT_VARIANTS_NOT_FOUND + + """ + 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 + + """ + Multipack bundles are not supported. + """ + UNSUPPORTED_MULTIPACK_RELATIONSHIP + + """ + A price must be provided for a parent product variant if the price calculation is set to fixed. + """ + UPDATE_PARENT_VARIANT_PRICE_REQUIRED +} + +""" +The input fields for updating a composite product variant. +""" +input ProductVariantRelationshipUpdateInput @componentName(name: "merchandising") { + """ + A product ID which contains product variants that have relationships with other variants. + """ + parentProductId: ID @gidTypes(types: ["Product"]) + + """ + The product variant ID representing that which contains the relationships with other variants. + """ + parentProductVariantId: ID @gidTypes(types: ["ProductVariant"]) + + """ + Method in which to update the price of the parent product variant. + """ + priceInput: PriceInput = null + + """ + The product variants and associated quantitites to add to the product variant. + """ + productVariantRelationshipsToCreate: [ProductVariantGroupRelationshipInput!] = null + + """ + The bundle component product variants to be removed from the product variant. + """ + productVariantRelationshipsToRemove: [ID!] = null @gidTypes(types: ["ProductVariant"]) + + """ + The product variants and associated quantitites to update in specified product variant. + """ + productVariantRelationshipsToUpdate: [ProductVariantGroupRelationshipInput!] = null + + """ + Whether to remove all components from the product variant. The default value is `false`. + """ + removeAllProductVariantRelationships: Boolean = false +} + +""" +The input fields for specifying a product variant to create or update. +""" +input ProductVariantSetInput @componentName(name: "merchandising") { + """ + The value of the barcode associated with the product. + """ + barcode: String + + """ + The compare-at price of the variant. + """ + compareAtPrice: Money + + """ + 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 + + """ + Specifies the product variant to update or create a new variant if absent. + """ + id: ID @gidTypes(types: ["ProductVariant"]) + + """ + The inventory item associated with the variant, used for unit cost. + """ + inventoryItem: InventoryItemInput + + """ + 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!] + + """ + Additional customizable information about the product variant. + + Complexity cost: 0.4 per variant metafield. + """ + metafields: [MetafieldInput!] + + """ + The custom properties that a shop owner uses to define product variants. + """ + optionValues: [VariantOptionValueInput!]! + + """ + The order of the product variant in the list of product variants. The first position in the list is 1. + """ + position: Int + + """ + The price of the variant. + """ + price: Money + + """ + Indicates whether the product variant is created as published or unpublished. + This option is only available for new product variants. + """ + published: 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 + + """ + Whether or not unit price should be shown for this product variant. + """ + showUnitPrice: Boolean + + """ + The SKU for the variant. Case-sensitive string. + """ + sku: String + + """ + The tax code associated with the variant. + """ + taxCode: String + + """ + Whether the variant is taxable. + """ + taxable: Boolean + + """ + The unit price measurement for the product variant. + """ + unitPriceMeasurement: UnitPriceMeasurementInput +} + +""" +The set of valid sort keys for the ProductVariant query. +""" +enum ProductVariantSortKeys @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 + + """ + Preserves the existing standalone variant when the product has only a single + default ("Default Title") or a single custom variant. + """ + PRESERVE_STANDALONE_VARIANT + + """ + Deletes the existing standalone variant when the product has only a single default ("Default Title") or custom variant. + """ + REMOVE_STANDALONE_VARIANT +} + +""" +Error codes for failed product variant bulk create mutations. +""" +type ProductVariantsBulkCreateUserError implements DisplayableError @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """ + The input value is blank. + """ + BLANK + + """ + Cannot set name for an option value linked to a metafield. + """ + CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + Variant price must be greater than or equal to zero. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + Invalid input detected. + """ + INVALID + + """ + Input is invalid. + """ + INVALID_INPUT + + """ + The type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED + + """ + Price must be 0 for variants of products with a gift card issuance currency. + """ + LOCAL_CURRENCY_GIFT_CARD_PRICE_MUST_BE_ZERO + + """ + Input must be for this product. + """ + MUST_BE_FOR_THIS_PRODUCT + + """ + Variant options are not enough. + """ + NEED_TO_ADD_OPTION_VALUES + + """ + Price cannot take a negative value. + """ + NEGATIVE_PRICE_VALUE + + """ + Input is not defined for this shop. + """ + NOT_DEFINED_FOR_SHOP + + """ + On create, this key cannot be used. + """ + NO_KEY_ON_CREATE + + """ + Variant options are more than the product options. + """ + OPTION_VALUES_FOR_NUMBER_OF_UNKNOWN_OPTIONS + + """ + The input value needs to be blank. + """ + PRESENT + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + You reached the limit of available SKUs in your current plan. + """ + SUBSCRIPTION_VIOLATION + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + Inventory locations cannot exceed the allowed resource limit or 10. + """ + TOO_MANY_INVENTORY_LOCATIONS + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Quantity could not be set. The location was not found. + """ + TRACKED_VARIANT_LOCATION_NOT_FOUND + + """ + Unstructured reserved namespace. + """ + UNSTRUCTURED_RESERVED_NAMESPACE + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + Variant already exists. + """ + VARIANT_ALREADY_EXISTS + + """ + Variant options already exist. Please change the variant option(s). + """ + VARIANT_ALREADY_EXISTS_CHANGE_OPTION_VALUE +} + +""" +Return type for `productVariantsBulkDelete` mutation. +""" +type ProductVariantsBulkDeletePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + The variant does not exist. + """ + AT_LEAST_ONE_VARIANT_DOES_NOT_BELONG_TO_THE_PRODUCT + + """ + Cannot delete default variant. + """ + CANNOT_DELETE_LAST_VARIANT + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + 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 @componentName(name: "merchandising") { + """ + 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 @gidTypes(types: ["ProductVariant"]) + + """ + The inventory item associated with the variant, used for unit cost. + """ + inventoryItem: InventoryItemInput + + """ + 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!] + + """ + The ID of the media that's associated with the variant. + """ + mediaId: ID @gidTypes(types: ["MediaImage"]) + + """ + The URL of the media to associate with the variant. + """ + mediaSrc: [String!] + + """ + 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 + + """ + Indicates whether the product variant is created as published or unpublished. + This option is only available for new product variants. + """ + published: Boolean + + """ + Adjust inventory quantities with deltas. + """ + quantityAdjustments: [InventoryAdjustmentInput!] + + """ + 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 the unit price should be shown for this product variant. + """ + showUnitPrice: Boolean + + """ + The tax code associated with the variant. + """ + taxCode: String + + """ + Whether the variant is taxable. + """ + taxable: Boolean + + """ + The unit price measurement for the product variant. + """ + unitPriceMeasurement: UnitPriceMeasurementInput +} + +""" +Return type for `productVariantsBulkReorder` mutation. +""" +type ProductVariantsBulkReorderPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + Product variant IDs must be unique. + """ + DUPLICATED_VARIANT_ID + + """ + Something went wrong, please try again. + """ + GENERIC_ERROR + + """ + Product variant position cannot be zero or negative number. + """ + INVALID_POSITION + + """ + Product variant does not exist. + """ + MISSING_VARIANT + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST +} + +""" +Return type for `productVariantsBulkUpdate` mutation. +""" +type ProductVariantsBulkUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """ + The input value is blank. + """ + BLANK + + """ + Cannot set name for an option value linked to a metafield. + """ + CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE + + """ + Mutually exclusive input fields provided. + """ + CANNOT_SPECIFY_BOTH + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + The price of the variant must be greater than or equal to zero. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + Input is invalid. + """ + INVALID_INPUT + + """ + The type is invalid. + """ + INVALID_TYPE + + """ + Metafield value is invalid. + """ + INVALID_VALUE + + """ + Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. + """ + INVENTORY_QUANTITIES_LIMIT_EXCEEDED + + """ + Price must be 0 for variants of products with a gift card issuance currency. + """ + LOCAL_CURRENCY_GIFT_CARD_PRICE_MUST_BE_ZERO + + """ + Input must be for this product. + """ + MUST_BE_FOR_THIS_PRODUCT + + """ + Mandatory field input field missing. + """ + MUST_SPECIFY_ONE_OF_PAIR + + """ + Variant options are not enough. + """ + NEED_TO_ADD_OPTION_VALUES + + """ + Price cannot take a negative value. + """ + NEGATIVE_PRICE_VALUE + + """ + Input is not defined for this shop. + """ + NOT_DEFINED_FOR_SHOP + + """ + Inventory quantities cannot be provided during update. + """ + NO_INVENTORY_QUANTITES_DURING_UPDATE + + """ + Inventory quantities can only be provided during create. To update inventory + for existing variants, use inventoryAdjustQuantities. + """ + NO_INVENTORY_QUANTITIES_ON_VARIANTS_UPDATE + + """ + Option does not exist. + """ + OPTION_DOES_NOT_EXIST + + """ + Variant options are more than the product options. + """ + OPTION_VALUES_FOR_NUMBER_OF_UNKNOWN_OPTIONS + + """ + Option value does not exist. + """ + OPTION_VALUE_DOES_NOT_EXIST + + """ + Option value name is too long. + """ + OPTION_VALUE_NAME_TOO_LONG + + """ + The input value needs to be blank. + """ + PRESENT + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product is suspended. + """ + PRODUCT_SUSPENDED + + """ + Product variant does not exist. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST + + """ + Product variant is missing ID attribute. + """ + PRODUCT_VARIANT_ID_MISSING + + """ + You reached the limit of available SKUs in your current plan. + """ + SUBSCRIPTION_VIOLATION + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Unstructured reserved namespace. + """ + UNSTRUCTURED_RESERVED_NAMESPACE + + """ + Operation is not supported for a combined listing parent product. + """ + UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION + + """ + The variant already exists. + """ + VARIANT_ALREADY_EXISTS +} + +""" +Return type for `pubSubServerPixelUpdate` mutation. +""" +type PubSubServerPixelUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Invalid parameters provided. + """ + INVALID_PARAMETERS + + """ + Address for this topic has already been taken. + """ + TAKEN +} + +""" +The input fields for a PubSub webhook subscription. +""" +input PubSubWebhookSubscriptionInput @componentName(name: "apps") { + """ + 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 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!] + + """ + 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!] + + """ + A human-readable name for the webhook subscription. + """ + name: String + + """ + The Pub/Sub project ID. + """ + pubSubProject: String! + + """ + The Pub/Sub topic ID. + """ + pubSubTopic: String! +} + +""" +Return type for `pubSubWebhookSubscriptionUpdate` mutation. +""" +type PubSubWebhookSubscriptionUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "apps") { + """ + 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 channels associated with the publication. + """ + channels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection + + """ + The list of collection publication records, each representing the publication + status and details for a collection published to this publication (typically channel). + """ + collectionPublicationsV3( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationConnection! + + """ + The list of collections published to the publication. + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @gidTypes(types: ["Collection"]) + ): Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The list of products included, but not necessarily published, in the publication. + """ + includedProducts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-1234` | + | 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` | + | 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` | + | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) + field. | | | - `collection_id:108179161409` | + | 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` | + | 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'` | + | 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` | + | error_feedback | string | Filter by products with publishing errors. | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | 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` | + | has_only_composites | boolean | Filter by products that have only + composite variants. | | | - `has_only_composites:true` | + | 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` | + | has_variant_with_components | boolean | Filter by products that have + variants with associated components. | | | - + `has_variant_with_components:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_total | integer | Filter by inventory count. | | | - + `inventory_total:0`
- `inventory_total:>150`
- + `inventory_total:>=200` | + | 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` | + | 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"` | + | out_of_stock_somewhere | boolean | Filter by products that are out of + stock in at least one location. | | | - `out_of_stock_somewhere:true` | + | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) + field. | | | - `price:100.57` | + | 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` | + | 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` | + | product_type | string | Filter by a comma-separated list of [product + types](https://help.shopify.com/manual/products/details/product-type). | | | + - `product_type:snowboard` | + | publication_ids | string | Filter by a comma-separated list of publication + IDs that are associated with the product. | | | - + `publication_ids:184111530305,184111694145` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | `active` | - + `status:active,draft` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) + field. | | | - `title:The Minimal Snowboard` | + | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + enabled. | | | - `tracks_inventory:true` | + | 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'` | + | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) + field. | | | - `variant_id:45779434701121` | + | 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'` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): ProductConnection! + + """ + The count of products included in the publication. Limited to a maximum of 10000 by default. + """ + includedProductsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-1234` | + | 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` | + | 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` | + | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) + field. | | | - `collection_id:108179161409` | + | 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` | + | 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'` | + | 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` | + | error_feedback | string | Filter by products with publishing errors. | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | 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` | + | has_only_composites | boolean | Filter by products that have only + composite variants. | | | - `has_only_composites:true` | + | 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` | + | has_variant_with_components | boolean | Filter by products that have + variants with associated components. | | | - + `has_variant_with_components:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_total | integer | Filter by inventory count. | | | - + `inventory_total:0`
- `inventory_total:>150`
- + `inventory_total:>=200` | + | 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` | + | 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"` | + | out_of_stock_somewhere | boolean | Filter by products that are out of + stock in at least one location. | | | - `out_of_stock_somewhere:true` | + | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) + field. | | | - `price:100.57` | + | 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` | + | 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` | + | product_type | string | Filter by a comma-separated list of [product + types](https://help.shopify.com/manual/products/details/product-type). | | | + - `product_type:snowboard` | + | publication_ids | string | Filter by a comma-separated list of publication + IDs that are associated with the product. | | | - + `publication_ids:184111530305,184111694145` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | `active` | - + `status:active,draft` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) + field. | | | - `title:The Minimal Snowboard` | + | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + enabled. | | | - `tracks_inventory:true` | + | 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'` | + | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) + field. | | | - `variant_id:45779434701121` | + | 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'` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The ID of an existing saved search. + The search’s query string is used as the query argument. + Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationConnection! + + """ + The list of products published to the publication. + """ + products( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-1234` | + | 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` | + | 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` | + | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) + field. | | | - `collection_id:108179161409` | + | 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` | + | 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'` | + | 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` | + | error_feedback | string | Filter by products with publishing errors. | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | 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` | + | has_only_composites | boolean | Filter by products that have only + composite variants. | | | - `has_only_composites:true` | + | 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` | + | has_variant_with_components | boolean | Filter by products that have + variants with associated components. | | | - + `has_variant_with_components:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_total | integer | Filter by inventory count. | | | - + `inventory_total:0`
- `inventory_total:>150`
- + `inventory_total:>=200` | + | 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` | + | 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"` | + | out_of_stock_somewhere | boolean | Filter by products that are out of + stock in at least one location. | | | - `out_of_stock_somewhere:true` | + | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) + field. | | | - `price:100.57` | + | 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` | + | 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` | + | product_type | string | Filter by a comma-separated list of [product + types](https://help.shopify.com/manual/products/details/product-type). | | | + - `product_type:snowboard` | + | publication_ids | string | Filter by a comma-separated list of publication + IDs that are associated with the product. | | | - + `publication_ids:184111530305,184111694145` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | `active` | - + `status:active,draft` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) + field. | | | - `title:The Minimal Snowboard` | + | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + enabled. | | | - `tracks_inventory:true` | + | 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'` | + | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) + field. | | | - `variant_id:45779434701121` | + | 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'` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): ProductConnection! + + """ + Whether the publication supports future publishing. + """ + supportsFuturePublishing: Boolean! +} + +""" +An auto-generated type for paginating through multiple Publications. +""" +type PublicationConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + Whether to automatically add newly created products to this publication. + """ + autoPublish: Boolean = false + + """ + The ID of the catalog. + """ + catalogId: ID @gidTypes(types: ["Catalog"]) + + """ + Whether to create an empty publication or prepopulate it with all products. + """ + defaultState: PublicationCreateInputPublicationDefaultState = EMPTY +} + +""" +The input fields for the possible values for the default state of a publication. +""" +enum PublicationCreateInputPublicationDefaultState @componentName(name: "merchandising") { + """ + The publication is populated with all products. + """ + ALL_PRODUCTS + + """ + The publication is empty. + """ + EMPTY +} + +""" +Return type for `publicationCreate` mutation. +""" +type PublicationCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "apps") { + """ + 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 @componentName(name: "merchandising") { + """ + ID of the channel. + """ + channelId: ID @deprecated(reason: "Use publicationId instead.") @gidTypes(types: ["Channel"]) + + """ + ID of the publication. + """ + publicationId: ID @gidTypes(types: ["Publication"]) + + """ + 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 @requiredAccess(scope: "The user must have `read_products` or `read_publications` access.") @componentName(name: "merchandising") = AddAllProductsOperation | CatalogCsvOperation | PublicationResourceOperation + +""" +A bulk update operation on a publication. +""" +type PublicationResourceOperation implements Node & ResourceOperation @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Whether new products should be automatically published to the publication. + """ + autoPublish: Boolean + + """ + A list of publishable IDs to add. The maximum number of publishables to update simultaneously is 50. + """ + publishablesToAdd: [ID!] = [] @gidTypes(types: ["Publishable"]) + + """ + A list of publishable IDs to remove. The maximum number of publishables to update simultaneously is 50. + """ + publishablesToRemove: [ID!] = [] @gidTypes(types: ["Publishable"]) +} + +""" +Return type for `publicationUpdate` mutation. +""" +type PublicationUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + Products and variants cannot be updated together. + """ + CANNOT_COMBINE_PRODUCTS_AND_VARIANTS + + """ + Cannot modify a catalog for an app. + """ + CANNOT_MODIFY_APP_CATALOG + + """ + Can't modify a publication that belongs to an app catalog. + """ + CANNOT_MODIFY_APP_CATALOG_PUBLICATION + + """ + Cannot modify a catalog for a market. + """ + CANNOT_MODIFY_MARKET_CATALOG + + """ + Can't modify a publication that belongs to a market catalog. + """ + CANNOT_MODIFY_MARKET_CATALOG_PUBLICATION + + """ + Catalog does not exist. + """ + CATALOG_NOT_FOUND + + """ + The input value is invalid. + """ + INVALID + + """ + Publishable ID not found. + """ + INVALID_PUBLISHABLE_ID + + """ + Market does not exist. + """ + MARKET_NOT_FOUND + + """ + The product is currently being modified. Please try again later. + """ + PRODUCT_LOCK_ERROR + + """ + 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 publication is currently being modified. Please try again later. + """ + PUBLICATION_LOCKED + + """ + Publication not found. + """ + PUBLICATION_NOT_FOUND + + """ + The limit for simultaneous publication updates has been exceeded. + """ + PUBLICATION_UPDATE_LIMIT_EXCEEDED + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Can't perform this action on a publication. + """ + UNSUPPORTED_PUBLICATION_ACTION + + """ + A catalog publication can only contain products. + """ + UNSUPPORTED_PUBLISHABLE_TYPE + + """ + Variants in a single operation must belong to the same product. + """ + VARIANTS_BELONG_TO_MULTIPLE_PRODUCTS + + """ + Variant publishing is not supported for this product type. + """ + VARIANT_PUBLISHING_UNSUPPORTED_PRODUCT_TYPE +} + +""" +Represents a resource that can be published to a channel. +A publishable resource can be either a Product or Collection. +""" +interface Publishable @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + Whether the resource is published to a specific channel. + """ + publishedOnChannel( + """ + The ID of the channel to check. + """ + channelId: ID! @gidTypes(types: ["Channel"]) + ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + 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! @gidTypes(types: ["Publication"]) + ): Boolean! + + """ + The list of resources that are published to a + [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). + """ + resourcePublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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). + """ + resourcePublicationsV2( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ResourcePublicationV2Connection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + The list of channels that the resource is not published to. + """ + unpublishedChannels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") + + """ + The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) + that the resource isn't published to. + """ + unpublishedPublications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") +} + +""" +Return type for `publishablePublish` mutation. +""" +type PublishablePublishPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "The user must have access to orders or draft orders.") @componentName(name: "business_customers") { + """ + 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 @componentName(name: "business_customers") { + """ + ID of the company contact. + """ + companyContactId: ID! @gidTypes(types: ["CompanyContact"]) + + """ + ID of the company. + """ + companyId: ID! @gidTypes(types: ["Company"]) + + """ + ID of the company location. + """ + companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) +} + +""" +Represents information about the purchasing entity for the order or draft order. +""" +union PurchasingEntity @requiredAccess(scope: "The user must have access to customers and orders or draft orders.") @componentName(name: "business_customers") = Customer | PurchasingCompany + +""" +The input fields for a purchasing entity. Can either be a customer or a purchasing company. +""" +input PurchasingEntityInput @componentName(name: "business_customers") { + """ + Represents a customer. Null if there's a purchasing company. + """ + customerId: ID @gidTypes(types: ["Customer"]) + + """ + 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The minimum required quantity for a variant to qualify for this price. + """ + minimumQuantity: Int! + + """ + The price of the product variant when its quantity meets the break's minimum quantity. + """ + price: MoneyInput! + + """ + The product variant ID associated with the quantity break. + """ + variantId: ID! @gidTypes(types: ["ProductVariant"]) +} + +""" +The set of valid sort keys for the QuantityPriceBreak query. +""" +enum QuantityPriceBreakSortKeys @componentName(name: "platform") { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `minimum_quantity` value. + """ + MINIMUM_QUANTITY +} + +""" +The input fields used to update quantity pricing. +""" +input QuantityPricingByVariantUpdateInput @componentName(name: "merchandising") { + """ + A list of fixed prices to add. + """ + pricesToAdd: [PriceListPriceInput!]! + + """ + A list of variant IDs that identify which fixed prices to remove. + """ + pricesToDeleteByVariantId: [ID!]! @gidTypes(types: ["ProductVariant"]) + + """ + 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!]! @gidTypes(types: ["QuantityPriceBreak"]) + + """ + A list of product variant IDs that identify which quantity breaks to remove. + """ + quantityPriceBreaksToDeleteByVariantId: [ID!] @gidTypes(types: ["ProductVariant"]) + + """ + A list of quantity rules to add. + """ + quantityRulesToAdd: [QuantityRuleInput!]! + + """ + A list of variant IDs that identify which quantity rules to remove. + """ + quantityRulesToDeleteByVariantId: [ID!]! @gidTypes(types: ["ProductVariant"]) +} + +""" +Return type for `quantityPricingByVariantUpdate` mutation. +""" +type QuantityPricingByVariantUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to create and edit catalogs, and the shop requires B2B features enabled.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + Something went wrong when trying to update quantity pricing. Please try again later. + """ + GENERIC_ERROR + + """ + Price list and fixed price currency mismatch. + """ + PRICE_ADD_CURRENCY_MISMATCH + + """ + 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 + + """ + Fixed price's variant not found. + """ + PRICE_ADD_VARIANT_NOT_FOUND + + """ + Price is not fixed. + """ + PRICE_DELETE_PRICE_NOT_FIXED + + """ + Fixed price's variant not found. + """ + PRICE_DELETE_VARIANT_NOT_FOUND + + """ + Price List does not exist. + """ + PRICE_LIST_NOT_FOUND + + """ + Price list and quantity price break currency mismatch. + """ + QUANTITY_PRICE_BREAK_ADD_CURRENCY_MISMATCH + + """ + 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 + + """ + Failed to save quantity price break. + """ + QUANTITY_PRICE_BREAK_ADD_FAILED_TO_SAVE + + """ + Invalid quantity price break. + """ + QUANTITY_PRICE_BREAK_ADD_INVALID + + """ + Exceeded the allowed number of quantity price breaks per variant. + """ + QUANTITY_PRICE_BREAK_ADD_LIMIT_EXCEEDED + + """ + 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 less than the quantity rule minimum. + """ + QUANTITY_PRICE_BREAK_ADD_MIN_LOWER_THAN_QUANTITY_RULES_MIN + + """ + 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's fixed price not found. + """ + QUANTITY_PRICE_BREAK_ADD_PRICE_LIST_PRICE_NOT_FOUND + + """ + Quantity price break variant not found. + """ + QUANTITY_PRICE_BREAK_ADD_VARIANT_NOT_FOUND + + """ + Variant to delete by is not found. + """ + QUANTITY_PRICE_BREAK_DELETE_BY_VARIANT_ID_VARIANT_NOT_FOUND + + """ + Failed to delete quantity price break. + """ + QUANTITY_PRICE_BREAK_DELETE_FAILED + + """ + Quantity price break not found. + """ + QUANTITY_PRICE_BREAK_DELETE_NOT_FOUND + + """ + Quantity rule catalog context not supported. + """ + QUANTITY_RULE_ADD_CATALOG_CONTEXT_NOT_SUPPORTED + + """ + Quantity rules to add inputs must be unique by variant id. + """ + QUANTITY_RULE_ADD_DUPLICATE_INPUT_FOR_VARIANT + + """ + Quantity rule increment is greater than minimum. + """ + QUANTITY_RULE_ADD_INCREMENT_IS_GREATER_THAN_MINIMUM + + """ + Quantity rule increment is less than one. + """ + QUANTITY_RULE_ADD_INCREMENT_IS_LESS_THAN_ONE + + """ + 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 maximum is less than one. + """ + QUANTITY_RULE_ADD_MAXIMUM_IS_LESS_THAN_ONE + + """ + Quantity rule maximum is not a multiple of increment. + """ + QUANTITY_RULE_ADD_MAXIMUM_NOT_A_MULTIPLE_OF_INCREMENT + + """ + Quantity rule maximum is less than the quantity price break minimum. + """ + QUANTITY_RULE_ADD_MAX_LOWER_THAN_QUANTITY_PRICE_BREAK_MIN + + """ + Quantity rule minimum is greater than maximum. + """ + QUANTITY_RULE_ADD_MINIMUM_GREATER_THAN_MAXIMUM + + """ + Quantity rule minimum is less than one. + """ + QUANTITY_RULE_ADD_MINIMUM_IS_LESS_THAN_ONE + + """ + Quantity rule minimum is not a multiple of increment. + """ + QUANTITY_RULE_ADD_MINIMUM_NOT_A_MULTIPLE_OF_INCREMENT + + """ + Quantity rule minimum is higher than the quantity price break minimum. + """ + QUANTITY_RULE_ADD_MIN_HIGHER_THAN_QUANTITY_PRICE_BREAK_MIN + + """ + Quantity rule variant not found. + """ + QUANTITY_RULE_ADD_VARIANT_NOT_FOUND + + """ + Quantity rule not found. + """ + QUANTITY_RULE_DELETE_RULE_NOT_FOUND + + """ + Quantity rule variant not found. + """ + QUANTITY_RULE_DELETE_VARIANT_NOT_FOUND +} + +""" +The quantity rule for the product variant in a given context. +""" +type QuantityRule @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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! @gidTypes(types: ["ProductVariant"]) +} + +""" +The origin of quantity rule on a price list. +""" +enum QuantityRuleOriginType @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + 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 + + """ + Value must be greater than or equal to 1. + """ + GREATER_THAN_OR_EQUAL_TO + + """ + Increment must be lower than or equal to the minimum. + """ + INCREMENT_IS_GREATER_THAN_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 + + """ + 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 + + """ + The maximum must be a multiple of the increment. + """ + MAXIMUM_NOT_MULTIPLE_OF_INCREMENT + + """ + 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 + + """ + The minimum must be a multiple of the increment. + """ + MINIMUM_NOT_MULTIPLE_OF_INCREMENT + + """ + Price list does not exist. + """ + PRICE_LIST_DOES_NOT_EXIST + + """ + Product variant ID does not exist. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST + + """ + Quantity rule for variant associated with the price list provided does not exist. + """ + VARIANT_QUANTITY_RULE_DOES_NOT_EXIST +} + +""" +Return type for `quantityRulesAdd` mutation. +""" +type QuantityRulesAddPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | The date and time (in [ISO 8601 + format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was created. | + | email_state | string | Filter by `abandoned_email_state` value. Possible + values: `sent`, `not_sent`, `scheduled` and `suppressed`. | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | recovery_state | string | Possible values: `recovered` and `not_recovered`. | + | status | string | Possible values: `open` and `closed`. | + | 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. | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): AbandonedCheckoutConnection! @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") + + """ + Returns the count of abandoned checkouts for the given shop. Limited to a maximum of 10000 by default. + """ + abandonedCheckoutsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | The date and time (in [ISO 8601 + format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was created. | + | email_state | string | Filter by `abandoned_email_state` value. Possible + values: `sent`, `not_sent`, `scheduled` and `suppressed`. | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | recovery_state | string | Possible values: `recovered` and `not_recovered`. | + | status | string | Possible values: `open` and `closed`. | + | 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. | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The ID of an existing saved search. + The search’s query string is used as the query argument. + Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): Count @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") + + """ + Returns a `Abandonment` resource by ID. + """ + abandonment( + """ + The ID of the `Abandonment` to return. + """ + id: ID! @gidTypes(types: ["Abandonment"]) + ): Abandonment + + """ + Returns an Abandonment by the Abandoned Checkout ID. + """ + abandonmentByAbandonedCheckoutId( + """ + The ID of the Abandoned Checkout ID to query by. + """ + abandonedCheckoutId: ID! @gidTypes(types: ["AbandonedCheckout"]) + ): Abandonment + + """ + List of all the active sales channels on this shop. + """ + allChannels( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection! + + """ + Returns a paginated list of [analytics targets](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget) + for the shop. Each target represents a merchant-defined goal for a specific metric over a date range. + + Results can be filtered by metric, name, date range, or filter expression, and sorted by fields + such as `start_date`, `expected_value`, or `metric`. + + Use the [`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetCreate) + mutation to add new targets. + """ + analyticsTargets( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | end_date | date | Filter by the end date of the target period. | | | - + `end_date:2026-03-31`
- `end_date:<=2026-03-31` | + | filters | string | Filter by the target's filter expression. | | | - `filters:"shipping_country = 'US'"` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | metric | string | Filter by metric identifier. | | | - `metric:total_sales` | + | name | string | Filter by target name. | | | - `name:Q1 Sales Target` | + | start_date | date | Filter by the start date of the target period. | | | - + `start_date:2026-01-01`
- `start_date:>=2026-01-01` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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: AnalyticsTargetSortKeys = ID + ): AnalyticsTargetConnection! @requiredAccess(scope: "`read_reports` access scope.") + + """ + 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 @gidTypes(types: ["App"]) + ): 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 + + """ + Credits that can be used towards future app purchases. + """ + appCredits( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! + + """ + An app discount type. + """ + appDiscountType( + """ + The ID for the function providing the app discount type. + """ + functionId: String! + ): AppDiscountType @requiredAccess(scope: "Apps must have `read_discounts` access scope.") + + """ + A list of app discount types installed by apps. + """ + appDiscountTypes: [AppDiscountType!]! @requiredAccess(scope: "Apps must have `read_discounts` access scope.") + + """ + A list of app discount types installed by apps. + """ + appDiscountTypesNodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @gidTypes(types: ["AppInstallation"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The category of app installations to fetch. + """ + category: AppInstallationCategory + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The privacy level of app installations to fetch. + """ + privacy: AppInstallationPrivacy = PUBLIC + + """ + 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 + ): AppInstallationConnection! + + """ + Returns a `Article` resource by ID. + """ + article( + """ + The ID of the `Article` to return. + """ + id: ID! @gidTypes(types: ["Article"]) + ): Article + + """ + List of article authors for the shop. + """ + articleAuthors( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ArticleAuthorConnection! @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") + + """ + List of all article tags. + """ + articleTags( + """ + The maximum number of tags to return. + """ + limit: Int! + + """ + Type of sort order. + """ + sort: ArticleTagSort = ALPHABETICAL + ): [String!]! @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- + `query=handle:summer-collection-announcement` | + | author | string | Filter by the author of the article. | + | blog_id | string | Filter by the ID of the blog the article belongs to. | + | | - `blog_id:1234`
- `blog_id:>=1234`
- `blog_id:<=1234` | + | blog_title | string | + | 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` | + | handle | string | Filter by the article's handle. | | | - + `handle:summer-collection-announcement`
- `handle:how-to-guide` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | published_status | string | Filter by published status | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the title of the article. | | | - `title:summer-collection`
- `title:green hoodie` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The assigment status of the fulfillment orders that should be returned. + If `assignmentStatus` argument is not provided, then + the query will return all assigned fulfillment orders, + except those that have the `CLOSED` status. + """ + assignmentStatus: FulfillmentOrderAssignmentStatus + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Returns fulfillment orders only for certain locations, specified by a list of location IDs. + """ + locationIds: [ID!] @gidTypes(types: ["Location"]) + + """ + 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! @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope.") + + """ + Returns a `DiscountAutomatic` resource by ID. + """ + automaticDiscount( + """ + The ID of the `DiscountAutomatic` to return. + """ + id: ID! @gidTypes(types: ["DiscountAutomaticBxgy", "DiscountAutomaticBasic", "DiscountAutomaticApp", "DiscountAutomaticFreeShipping"]) + ): DiscountAutomatic @deprecated(reason: "Use `automaticDiscountNode` instead.") + + """ + Returns a `DiscountAutomaticNode` resource by ID. + """ + automaticDiscountNode( + """ + The ID of the `DiscountAutomaticNode` to return. + """ + id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) + ): DiscountAutomaticNode + + """ + Returns a list of [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts). + """ + automaticDiscountNodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | combines_with.product_discounts_with_tags_on_same_cart_line | string | + Filter by a combines with tag applied to discounts on the same cart line. + Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - + `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | Filter by the discount status. | - `active`
- + `expired`
- `scheduled` | | - `status:scheduled` | + | tag | string | Filter by a tag applied to the discount. | | | - `tag:loyalty`
- `tag:clearance` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): DiscountAutomaticNodeConnection! @deprecated(reason: "Use `discountNodes` instead.") @requiredAccess(scope: "Apps must have `read_discounts` access scope.") + + """ + List of the shop's automatic discount saved searches. + """ + automaticDiscountSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | combines_with.product_discounts_with_tags_on_same_cart_line | string | + Filter by a combines with tag applied to discounts on the same cart line. + Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - + `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | Filter by the discount status. | - `active`
- + `expired`
- `scheduled` | | - `status:scheduled` | + | tag | string | Filter by a tag applied to the discount. | | | - `tag:loyalty`
- `tag:clearance` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): 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( + """ + An array of destination country codes. + """ + destinationCountryCodes: [CountryCode!] + ): [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 the Balance account information for finance embedded apps. + """ + balanceAccount: BalanceAccount + + """ + Returns a `Blog` resource by ID. + """ + blog( + """ + The ID of the `Blog` to return. + """ + id: ID! @gidTypes(types: ["Blog"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | handle | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | title | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): BlogConnection! + + """ + Count of blogs. Limited to a maximum of 10000 by default. + """ + blogsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | handle | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | title | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): Count @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") + + """ + Returns a `BulkOperation` resource by ID. + """ + bulkOperation( + """ + The ID of the `BulkOperation` to return. + """ + id: ID! @gidTypes(types: ["BulkOperation"]) + ): BulkOperation + + """ + Returns the app's bulk operations meeting the specified filters. Defaults to + sorting by created_at, with newest operations first. + """ + bulkOperations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | Filter operations created after a specific date. | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | operation_type | string | Filter operations by type. | - `query`
- `mutation` | + | status | string | Filter operations by status. | - `canceled`
- + `canceling`
- `completed`
- `created`
- `failed`
- `running` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): BulkOperationConnection! + + """ + Returns the number of bundle products that have been created by the current app. + """ + bundleCount: Int! + + """ + 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 @gidTypes(types: ["BusinessEntity"]) + ): BusinessEntity + + """ + Returns a `DeliveryCarrierService` resource by ID. + """ + carrierService( + """ + The ID of the `DeliveryCarrierService` to return. + """ + id: ID! @gidTypes(types: ["CarrierService"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | active | boolean | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): DeliveryCarrierServiceConnection! @requiredAccess(scope: "`read_shipping` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CartTransformConnection! @requiredAccess(scope: "`read_cart_transforms` access scope.") + + """ + Returns a `CashDrawer` resource by ID. + """ + cashDrawer( + """ + The ID of the `CashDrawer` to return. + """ + id: ID! @gidTypes(types: ["CashDrawer"]) + ): CashDrawer @requiredAccess(scope: "`read_cash_tracking` access scope.") + + """ + A list of cash drawers in the shop. + """ + cashDrawers( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | location_id | id | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): CashDrawerConnection! @requiredAccess(scope: "`read_cash_tracking` access scope.") + + """ + Summary of cash management data for a location. + """ + cashManagementLocationSummary( + """ + The end date to summarize to. + """ + endDate: Date! + + """ + Identifies the location to get the summary for. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + The start date to summarize from. + """ + startDate: Date! + ): CashManagementSummary! @requiredAccess(scope: "`read_cash_tracking` access scope. Also: User must have `view_payment_tracking_sessions_pos_channel` or `payments_cash_session_history` retail role permission.") + + """ + Returns the cash management reason codes for the shop. + """ + cashManagementReasonCodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CashManagementReasonCodeConnection! @requiredAccess(scope: "`read_cash_tracking` access scope.") + + """ + Summary of cash management data across all locations with a POS Pro subscription for a shop, filtered by currency. + """ + cashManagementShopSummary( + """ + The currency code to filter by. + """ + currencyCode: CurrencyCode! + + """ + The end date to summarize to. + """ + endDate: Date! + + """ + The start date to summarize from. + """ + startDate: Date! + ): CashManagementSummary! @requiredAccess(scope: "`read_cash_tracking` access scope. Also: User must have `view_payment_tracking_sessions_pos_channel` or `payments_cash_session_history` retail role permission.") + + """ + Returns a `CashTrackingSession` resource by ID. + """ + cashTrackingSession( + """ + The ID of the `CashTrackingSession` to return. + """ + id: ID! @gidTypes(types: ["CashTrackingSession"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | closing_time | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | location_id | id | + | opening_time | time | + | point_of_sale_device_ids | string | + | status | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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! @gidTypes(types: ["Catalog"]) + ): Catalog + + """ + Returns the most recent catalog operations for the shop. + """ + catalogOperations: [ResourceOperation!]! @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | app_id | id | + | company_id | id | + | company_location_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | managed_country_id | id | + | market_id | id | + | status | string | + | title | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + + """ + The type of the catalogs to be returned. + """ + type: CatalogType = null + ): CatalogConnection! + + """ + The count of catalogs belonging to the shop. 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 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | app_id | id | + | company_id | id | + | company_location_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | managed_country_id | id | + | market_id | id | + | status | string | + | title | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The type of the catalogs to be returned. + """ + type: CatalogType = null + ): 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! @gidTypes(types: ["Channel", "Publication"]) + ): Channel + + """ + Returns a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) + by its unique string handle. The handle is either set explicitly during [`channelCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelCreate) + or auto-generated from the specification handle and account ID. The channel + must belong to the calling application. + """ + channelByHandle( + """ + The unique handle of the [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) to return. + """ + handle: String! + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ChannelConnection! + + """ + A checkout and accounts configuration for a shop. + """ + checkoutAndAccountsConfiguration( + """ + The ID of the configuration. + """ + id: ID! @gidTypes(types: ["Configuration"]) + ): CheckoutAndAccountsConfiguration + + """ + List of checkout and accounts configurations on a shop. + """ + checkoutAndAccountsConfigurations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | is_published | boolean | + | one_page_checkout_enabled | boolean | + | typ_osp_pages_enabled | boolean | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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: CheckoutAndAccountsConfigurationsGraphQLSortKeys = ID + ): CheckoutAndAccountsConfigurationConnection + + """ + 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! @gidTypes(types: ["CheckoutProfile"]) + ): 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! @gidTypes(types: ["CheckoutProfile"]) + ): CheckoutProfile @deprecated(reason: "Use `checkoutAndAccountsConfiguration` instead.") @requiredAccess(scope: "access to the checkout and accounts editor.") + + """ + List of checkout profiles on a shop. + """ + checkoutProfiles( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | is_published | boolean | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): CheckoutProfileConnection! @deprecated(reason: "Use `checkoutAndAccountsConfigurations` instead.") @requiredAccess(scope: "access to the checkout and accounts editor.") + + """ + 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! @gidTypes(types: ["DiscountCodeNode"]) + ): DiscountCodeNode + + """ + 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") + + """ + Returns a list of [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes). + """ + codeDiscountNodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | combines_with.product_discounts_with_tags_on_same_cart_line | string | + Filter by a combines with tag applied to discounts on the same cart line. + Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - + `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | + | 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'` | + | 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` | + | 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'` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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'` | + | status | string | Filter by the status of the discount. | - `active`
+ - `expired`
- `scheduled` | | - `status:scheduled` | + | tag | string | Filter by a tag applied to the discount. | | | - `tag:loyalty`
- `tag:clearance` | + | 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` | + | title | string | Filter by the discount name that displays to customers. | | | - `title:Black Friday Sale` | + | 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` | + | 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'` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): DiscountCodeNodeConnection! @deprecated(reason: "Use `discountNodes` instead.") @requiredAccess(scope: "Apps must have `read_discounts` access scope.") + + """ + List of the shop's code discount saved searches. + """ + codeDiscountSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @gidTypes(types: ["Collection"]) + ): 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.") @requiredAccess(scope: "`read_products` access scope.") + + """ + Return a collection by an identifier. + """ + collectionByIdentifier( + """ + The identifier of the collection. + """ + identifier: CollectionIdentifierInput! + ): Collection @requiredAccess(scope: "`read_products` access scope.") + + """ + Lists all rules that can be used to create smart collections. + """ + collectionRulesConditions: [CollectionRuleConditions!]! + + """ + Returns a list of the shop's collection saved searches. + """ + collectionSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SavedSearchConnection! @requiredAccess(scope: "`read_products` access scope.") + + """ + 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. + - Manage both custom ([manual](https://help.shopify.com/manual/products/collections/manual-shopify-collection)) + and smart ([automated](https://help.shopify.com/manual/products/collections/automated-collections)) collections. + + 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 (for smart collections) + - Publishing status and publication details + - Metafields and custom attributes + + Learn more about [using metafields with smart collections](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). + """ + collections( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | collection_type | string | | - `custom`
- `smart` | + | handle | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | product_id | id | Filter by collections containing a product by its ID. | + | 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` | + | 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` | + | published_at | time | Filter by the date and time when the collection was published to the Online Store. | + | 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` | + | title | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): CollectionConnection! + + """ + Count of collections. Limited to a maximum of 10000 by default. + """ + collectionsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | collection_type | string | | - `custom`
- `smart` | + | handle | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | product_id | id | Filter by collections containing a product by its ID. | + | 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` | + | 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` | + | published_at | time | Filter by the date and time when the collection was published to the Online Store. | + | 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` | + | title | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The ID of an existing saved search. + The search’s query string is used as the query argument. + Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): Count @requiredAccess(scope: "`read_products` access scope.") + + """ + Returns a `Comment` resource by ID. + """ + comment( + """ + The ID of the `Comment` to return. + """ + id: ID! @gidTypes(types: ["Comment"]) + ): Comment + + """ + List of the shop's comments. + """ + comments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | published_status | string | Filter by published status | - `any`
- + `published`
- `unpublished` | | - `published_status:any`
- + `published_status:published`
- `published_status:unpublished` | + | status | string | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | active_customers_count | integer | + | created_at | time | + | external_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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"` | + | name | string | + | ordering_status | string | + | since_date | time | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: CompanySortKeys = ID + ): 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") + + """ + Returns a `Company` resource by ID. + """ + company( + """ + The ID of the `Company` to return. + """ + id: ID! @gidTypes(types: ["Company"]) + ): Company + + """ + Returns a `CompanyContact` resource by ID. + """ + companyContact( + """ + The ID of the `CompanyContact` to return. + """ + id: ID! @gidTypes(types: ["CompanyContact"]) + ): CompanyContact + + """ + Returns a `CompanyContactRole` resource by ID. + """ + companyContactRole( + """ + The ID of the `CompanyContactRole` to return. + """ + id: ID! @gidTypes(types: ["CompanyContactRole"]) + ): CompanyContactRole + + """ + Returns a `CompanyLocation` resource by ID. + """ + companyLocation( + """ + The ID of the `CompanyLocation` to return. + """ + id: ID! @gidTypes(types: ["CompanyLocation"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | company_id | id | + | created_at | time | + | external_id | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | ids | string | + | 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"` | + | name | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: CompanyLocationSortKeys = ID + ): CompanyLocationConnection! + + """ + Returns the customer privacy consent policies of a shop. + """ + consentPolicy( + """ + Return policies where consent is required or not. + """ + consentRequired: Boolean + + """ + Return policies with the provided country code. + """ + countryCode: PrivacyCountryCode + + """ + Return policies where data sale opt out is required or not. + """ + dataSaleOptOutRequired: Boolean + + """ + Return the policy with the provided ID. + """ + id: ID @gidTypes(types: ["ConsentPolicy"]) + + """ + Return policies with the provided region code. + """ + regionCode: String + ): [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). + Apps can run one bulk query and one bulk mutation operation at a time per shop. + + 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! @gidTypes(types: ["Customer"]) + ): Customer + + """ + Returns a `CustomerAccountPage` resource by ID. + """ + customerAccountPage( + """ + The ID of the `CustomerAccountPage` to return. + """ + id: ID! @gidTypes(types: ["CustomerAccountPage"]) + ): CustomerAccountPage + + """ + List of the shop's customer account pages. + """ + customerAccountPages( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): CustomerAccountPageConnection + + """ + Returns the configured customer behavior tracking preference. + """ + customerBehaviorTrackingPreference: CustomerBehaviorTrackingPreference @privatelyDocumented + + """ + Retrieve a customer by consuming a single-use access token. Returns null + if the customer was not found or the access token has expired or has + already been consumed. + """ + customerByAccessToken( + """ + The customer access token. + """ + customerAccessToken: String! + ): Customer + + """ + Return a customer by an identifier. + """ + customerByIdentifier( + """ + The identifier of the customer. + """ + identifier: CustomerIdentifierInput! + ): Customer @requiredAccess(scope: "`read_customers` access scope.") + + """ + Returns the status of a customer merge request job. + """ + customerMergeJobStatus( + """ + The ID of the job performing the customer merge request. + """ + jobId: ID! @gidTypes(types: ["Job"]) + ): CustomerMergeRequest @requiredAccess(scope: "`read_customer_merge` access scope.") + + """ + Returns a preview of a customer merge request. + """ + customerMergePreview( + """ + The ID of the first customer that will be merged. + """ + customerOneId: ID! @gidTypes(types: ["Customer"]) + + """ + The ID of the second customer that will be merged. + """ + customerTwoId: ID! @gidTypes(types: ["Customer"]) + + """ + The fields to override the default customer merge rules. + """ + overrideFields: CustomerMergeOverrideFields + ): CustomerMergePreview! @requiredAccess(scope: "`read_customer_merge` access scope.") + + """ + 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! @gidTypes(types: ["CustomerPaymentMethod"]) + + """ + Whether to show the customer's revoked payment method. + """ + showRevoked: Boolean = false + ): CustomerPaymentMethod + + """ + List of the shop's customer saved searches. + """ + customerSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | name | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): SavedSearchConnection! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @gidTypes(types: ["CustomerSegmentMembersQuery"]) + + """ + Reverse the order of the list. The sorting behaviour defaults to ascending order. + """ + reverse: Boolean = false + + """ + The ID of the segment. + """ + segmentId: ID @gidTypes(types: ["Segment"]) + + """ + Sort the list by a given key. Valid values: + • `created_at` - Sort by customer creation date + • `first_order_date` - Sort by the date of the customer's first order + • `last_abandoned_order_date` - Sort by the date of the customer's last abandoned checkout + • `last_order_date` - Sort by the date of the customer's most recent order + • `number_of_orders` - Sort by the total number of orders placed by the customer + • `amount_spent` - Sort by the total amount the customer has spent across all orders + + Use with the `reverse` parameter to control sort direction (ascending by default, descending when reverse=true). + """ + sortKey: String + + """ + The timezone that's used to interpret relative date arguments. The timezone + defaults to UTC if the timezone isn't provided. + """ + timezone: String + ): CustomerSegmentMemberConnection! + + """ + Returns the total number of customers who match the criteria defined in a + customer segment. This count provides real-time visibility into segment size + for targeting and analysis purposes. + + For example, check the size of a "High-Value Customers" segment before launching a VIP program. + + The count reflects current segment membership based on the segment's filter + criteria, updating as customer data changes and new customers meet or no + longer meet the segment conditions. + """ + customerSegmentMembersCount( + """ + 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 @gidTypes(types: ["CustomerSegmentMembersQuery"]) + + """ + The ID of the segment. + """ + segmentId: ID @gidTypes(types: ["Segment"]) + ): Count @requiredAccess(scope: "`read_customers` access scope.") + + """ + Returns a `CustomerSegmentMembersQuery` resource by ID. + """ + customerSegmentMembersQuery( + """ + The ID of the `CustomerSegmentMembersQuery` to return. + """ + id: ID! @gidTypes(types: ["CustomerSegmentMembersQuery"]) + ): CustomerSegmentMembersQuery + + """ + Whether a member, which is a customer, belongs to a segment. + """ + customerSegmentMembership( + """ + The ID of the customer that has the membership. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + The segments to evaluate for the given customer. + """ + segmentIds: [ID!]! @gidTypes(types: ["Segment"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | accepts_marketing | boolean | Filter by whether a customer has consented + to receive marketing material. | | | - `accepts_marketing:true` | + | 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` | + | 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'` | + | 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:*` | + | first_name | string | Filter by the customer's first name. | | | - `first_name:Jane` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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'` | + | last_name | string | Filter by the customer's last name. | | | - `last_name:Reeves` | + | 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'` | + | orders_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` | + | 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:*` | + | 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` | + | 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'` | + | 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'` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): CustomerConnection! + + """ + The number of customers. Limited to a maximum of 10000 by default. + """ + customersCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): Count @requiredAccess(scope: "`read_customers` access scope.") + + """ + The paginated list of deletion events. + """ + deletionEvents( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | occurred_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + + """ + List of subject types to filter by. + """ + subjectTypes: [DeletionEventSubjectType!] + ): DeletionEventConnection! @deprecated(reason: "Use `events` instead.") + + """ + The delivery customization. + """ + deliveryCustomization( + """ + The ID of the delivery customization. + """ + id: ID! @gidTypes(types: ["DeliveryCustomization"]) + ): DeliveryCustomization @requiredAccess(scope: "`read_delivery_customizations` access scope.") + + """ + The delivery customizations. + """ + deliveryCustomizations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | enabled | boolean | + | function_id | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DeliveryCustomizationConnection! @requiredAccess(scope: "`read_delivery_customizations` access scope.") + + """ + 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! @gidTypes(types: ["Profile"]) + ): 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + If `true`, returns only delivery profiles that were created by the merchant. + """ + merchantOwnedOnly: Boolean + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | boolean | Filter by the delivery profile default status. | - `true`
- `false` | | - `default:true` | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | name | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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: DeliveryProfileSortKeys = ID + ): DeliveryProfileConnection! + + """ + Returns delivery promise participants. + """ + deliveryPromiseParticipants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The product variant ID to filter by. + """ + ownerIds: [ID!] @gidTypes(types: ["ProductVariant"]) + + """ + The owner type to filter by. + """ + ownerType: DeliveryPromiseParticipantOwnerType + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DeliveryPromiseParticipantConnection @requiredAccess(scope: "`read_delivery_promises` access scope.") + + """ + Lookup a delivery promise provider. + """ + deliveryPromiseProvider( + """ + The ID of the location associated with the delivery promise provider. + """ + locationId: ID! @gidTypes(types: ["Location"]) + ): DeliveryPromiseProvider @requiredAccess(scope: "`read_delivery_promises` access scope.") + + """ + Represents the delivery promise settings for a shop. + """ + deliveryPromiseSettings: DeliveryPromiseSetting! @requiredAccess(scope: "`read_shipping` access scope or `read_shop_promise_program` access scope.") + + """ + The total number of discount codes for the shop. Limited to a maximum of 10000 by default. + """ + discountCodesCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | times_used | integer | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): Count @requiredAccess(scope: "`read_discounts` access scope.") + + """ + Returns a `DiscountNode` resource by ID. + """ + discountNode( + """ + The ID of the `DiscountNode` to return. + """ + id: ID! @gidTypes(types: ["DiscountNode"]) + ): DiscountNode + + """ + Returns a list of discounts. + """ + discountNodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | code | string | Filter by the discount code. Not supported for bulk discounts. | | | - `code:WELCOME10` | + | 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` | + | combines_with.product_discounts_with_tags_on_same_cart_line | string | + Filter by a combines with tag applied to discounts on the same cart line. + Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - + `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | + | context | string | Filter by the context type. Supports multiple values + separated by commas (e.g., context:all,market). When multiple values are + provided, results include discounts that match any of them. | - `all`
- + `customer`
- `segment`
- `market` | | - `context:segment`
- + `context:all,market` | + | 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'` | + | customer_ids | string | Filter by specific customer IDs that are eligible + for the discount. | | | - `customer_ids:123456789`
- + `customer_ids:123,456` | + | 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` | + | 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` | + | 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'` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | market_ids | string | Filter by specific market IDs that are eligible for + the discount. Supports multiple IDs separated by commas (e.g., + market_ids:123,456). | | | - `market_ids:123456789`
- + `market_ids:123,456` | + | 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` | + | segment_ids | string | Filter by specific segment IDs that are eligible + for the discount. Supports multiple IDs separated by commas (e.g., + segment_ids:123,456). | | | - `segment_ids:123456789`
- + `segment_ids:123,456` | + | 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'` | + | 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` | + | tag | string | Filter by a tag applied to the discount. Supports multiple + tags separated by commas (e.g., tag:loyalty,clearance). | | | - + `tag:loyalty`
- `tag:loyalty,clearance` | + | 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` | + | title | string | Filter by the discount name that displays to merchants in + the Shopify admin and to customers. | | | - `title:Black Friday Sale` | + | 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` | + | 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'` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): DiscountNodeConnection! @requiredAccess(scope: "Apps must have `read_discounts` access scope.") + + """ + The total number of discounts for the shop. Limited to a maximum of 10000 by default. + """ + discountNodesCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | code | string | Filter by the discount code. Not supported for bulk discounts. | | | - `code:WELCOME10` | + | 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` | + | combines_with.product_discounts_with_tags_on_same_cart_line | string | + Filter by a combines with tag applied to discounts on the same cart line. + Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - + `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | + | context | string | Filter by the context type. Supports multiple values + separated by commas (e.g., context:all,market). When multiple values are + provided, results include discounts that match any of them. | - `all`
- + `customer`
- `segment`
- `market` | | - `context:segment`
- + `context:all,market` | + | 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'` | + | customer_ids | string | Filter by specific customer IDs that are eligible + for the discount. | | | - `customer_ids:123456789`
- + `customer_ids:123,456` | + | 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` | + | 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` | + | 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'` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | market_ids | string | Filter by specific market IDs that are eligible for + the discount. Supports multiple IDs separated by commas (e.g., + market_ids:123,456). | | | - `market_ids:123456789`
- + `market_ids:123,456` | + | 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` | + | segment_ids | string | Filter by specific segment IDs that are eligible + for the discount. Supports multiple IDs separated by commas (e.g., + segment_ids:123,456). | | | - `segment_ids:123456789`
- + `segment_ids:123,456` | + | 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'` | + | 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` | + | tag | string | Filter by a tag applied to the discount. Supports multiple + tags separated by commas (e.g., tag:loyalty,clearance). | | | - + `tag:loyalty`
- `tag:loyalty,clearance` | + | 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` | + | title | string | Filter by the discount name that displays to merchants in + the Shopify admin and to customers. | | | - `title:Black Friday Sale` | + | 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` | + | 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'` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The ID of an existing saved search. + The search’s query string is used as the query argument. + Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): Count @requiredAccess(scope: "`read_discounts` access scope.") + + """ + Returns a `DiscountRedeemCodeBulkCreation` resource by ID. + """ + discountRedeemCodeBulkCreation( + """ + The ID of the `DiscountRedeemCodeBulkCreation` to return. + """ + id: ID! @gidTypes(types: ["DiscountRedeemCodeBulkCreation"]) + ): DiscountRedeemCodeBulkCreation + + """ + List of the shop's redeemed discount code saved searches. + """ + discountRedeemCodeSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | times_used | integer | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): SavedSearchConnection! @requiredAccess(scope: "`read_discounts` access scope.") + + """ + Returns the discount resource feedback for the currently authenticated app. + """ + discountResourceFeedback( + """ + The discount associated with the resource feedback. + """ + id: ID! @gidTypes(types: ["DiscountNode"]) + ): DiscountResourceFeedback @requiredAccess(scope: "`read_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") + + """ + List of tags associated to discounts. + """ + discountTags( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | title | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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: DiscountTagSortKeys = ID + ): StringConnection! @requiredAccess(scope: "Apps must have `read_discounts` access scope.") + + """ + Returns a `ShopifyPaymentsDispute` resource by ID. + """ + dispute( + """ + The ID of the `ShopifyPaymentsDispute` to return. + """ + id: ID! @gidTypes(types: ["Dispute"]) + ): ShopifyPaymentsDispute + + """ + Returns a `ShopifyPaymentsDisputeEvidence` resource by ID. + """ + disputeEvidence( + """ + The ID of the `ShopifyPaymentsDisputeEvidence` to return. + """ + id: ID! @gidTypes(types: ["DisputeEvidence"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | initiated_at | time | + | status | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ShopifyPaymentsDisputeConnection! + + """ + Returns a `Domain` resource by ID. + """ + domain( + """ + The ID of the `Domain` to return. + """ + id: ID! @gidTypes(types: ["Domain"]) + ): 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! @gidTypes(types: ["DraftOrder"]) + ): 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 number of local pickup options required. + """ + localPickupCount: Int + + """ + The offset for the local pickup options. + """ + localPickupFrom: Int + + """ + The search term for the delivery options. + """ + search: String + + """ + Unique token used to trace execution and help optimize the calculation. + """ + sessionToken: String + ): DraftOrderAvailableDeliveryOptions! @requiredAccess(scope: "`read_draft_orders` access scope.") + + """ + List of the shop's draft order saved searches. + """ + draftOrderSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SavedSearchConnection! @requiredAccess(scope: "`read_draft_orders` access scope.") + + """ + Returns a `DraftOrderTag` resource by ID. + """ + draftOrderTag( + """ + The ID of the `DraftOrderTag` to return. + """ + id: ID! @gidTypes(types: ["DraftOrderTag"]) + ): DraftOrderTag + + """ + List of saved draft orders. + """ + draftOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | customer_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | source | string | + | status | string | + | tag | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): DraftOrderConnection! + + """ + Returns the number of draft orders that match the query. Limited to a maximum of 10000 by default. + """ + draftOrdersCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | customer_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | ids | string | + | source | string | + | status | string | + | tag | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The ID of an existing saved search. + The search’s query string is used as the query argument. + Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): Count @requiredAccess(scope: "`read_draft_orders` access scope.") + + """ + 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! @gidTypes(types: ["Event"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): EventConnection + + """ + Count of events. Limited to a maximum of 10000. + """ + eventsCount( + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | action | string | The action that occured. | | | - `action:create` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): Count + + """ + A list of the shop's file saved searches. + """ + fileSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SavedSearchConnection! @requiredAccess(scope: "`read_files` access scope or `read_themes` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | filename | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | ids | string | + | media_type | string | + | 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` | + | product_id | string | + | status | string | + | updated_at | time | + | used_in | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): FileConnection! @requiredAccess(scope: "`read_files` access scope, `read_themes` access scope or `read_images` access scope.") + + """ + Returns the access policy for a finance app . + """ + financeAppAccessPolicy: FinanceAppAccessPolicy! @requiredAccess(scope: "User session and api client must be valid.") + + """ + 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! @gidTypes(types: ["Fulfillment"]) + ): Fulfillment @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope, `read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") + + """ + The fulfillment constraint rules that belong to a shop. + """ + fulfillmentConstraintRules: [FulfillmentConstraintRule!]! @requiredAccess(scope: "`read_fulfillment_constraint_rules` access scope.") + + """ + Returns a `FulfillmentOrder` resource by ID. + """ + fulfillmentOrder( + """ + The ID of the `FulfillmentOrder` to return. + """ + id: ID! @gidTypes(types: ["FulfillmentOrder"]) + ): 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Whether to include closed fulfillment orders. + """ + includeClosed: Boolean = false + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | assigned_location_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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! @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") + + """ + 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! @gidTypes(types: ["FulfillmentService"]) + ): 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! @gidTypes(types: ["GiftCard"]) + ): GiftCard @requiredAccess(scope: "`read_gift_cards` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document, including gift card codes. | | | - + `query=a5bh6h64b329j4k7`
- `query=Bob Norman` | + | balance_status | string | | - `full`
- `partial`
- `empty`
+ - `full_or_partial` | | - `balance_status:full` | + | created_at | time | | | | - `created_at:>=2020-01-01T12:00:00Z` | + | customer_id | id | + | expires_on | date | | | | - `expires_on:>=2020-01-01` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | initial_value | string | | | | - `initial_value:>=100` | + | recipient_id | id | + | source | string | | - `manual`
- `purchased`
- `api_client` | | - `source:manual` | + | status | string | | - `disabled`
- `enabled`
- `expired`
- + `expiring` | | - `status:disabled OR status:expired` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): GiftCardConnection! @requiredAccess(scope: "`read_gift_cards` access scope.") + + """ + 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( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document, including gift card codes. | | | - + `query=a5bh6h64b329j4k7`
- `query=Bob Norman` | + | balance_status | string | | - `full`
- `partial`
- `empty`
+ - `full_or_partial` | | - `balance_status:full` | + | created_at | time | | | | - `created_at:>=2020-01-01T12:00:00Z` | + | customer_id | id | + | expires_on | date | | | | - `expires_on:>=2020-01-01` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | initial_value | string | | | | - `initial_value:>=100` | + | recipient_id | id | + | source | string | | - `manual`
- `purchased`
- `api_client` | | - `source:manual` | + | status | string | | - `disabled`
- `enabled`
- `expired`
- + `expiring` | | - `status:disabled OR status:expired` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The ID of an existing saved search. + The search’s query string is used as the query argument. + Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): Count @requiredAccess(scope: "`read_gift_cards` access scope.") + + """ + Retrieves comprehensive details about a specific Hydrogen storefront by its + unique identifier. This query provides access to the complete storefront + configuration, deployment status, environment settings, and associated + metadata needed for development and management workflows. + + For example, when developers need to inspect a storefront's current deployment + state, environment variables, or customer account configuration before making + updates, this query returns all relevant information in a single request. + + Use the `hydrogenStorefront` query to: + - Fetch complete storefront configuration and status + - Retrieve deployment history and current version information + - Access environment-specific settings and variables + - Validate storefront setup before performing operations + - Monitor storefront health and deployment progress + + The query supports comprehensive filtering and returns detailed information + about storefront deployments, environment configurations, customer account + settings, and any associated background jobs. This makes it essential for + storefront management dashboards, CLI tools, and automated deployment systems. + + Background job tracking allows monitoring of asynchronous operations like + deployments or configuration updates, providing real-time status updates + through the job system. The response includes user error handling for cases + where the storefront doesn't exist or access is restricted. + + Environment variable access enables developers to verify configuration without + exposing sensitive values, while deployment information helps track version + history and rollback capabilities. + + Learn more about [managing Hydrogen storefronts](https://shopify.dev/docs/custom-storefronts/hydrogen/getting-started). + """ + hydrogenStorefront( + """ + The ID of the HydrogenStorefront to return. + """ + id: ID! + ): HydrogenStorefront! + + """ + Returns a HydrogenStorefrontJob by ID. + """ + hydrogenStorefrontJob( + """ + The ID of the HydrogenStorefrontJob to return. + """ + id: ID! + ): HydrogenStorefrontJob + + """ + Retrieves the complete collection of Hydrogen storefronts configured for a + merchant's shop, providing comprehensive access to custom storefront + implementations and their associated metadata. This query serves as the + primary entry point for managing multiple Hydrogen deployments within a single Shopify store. + + For example, a merchant running separate storefronts for different markets + (US, EU, Canada) or different brands under one Shopify account can query all + their Hydrogen implementations to monitor deployment status, manage + environment variables, or coordinate updates across multiple storefronts. + + Use the `HydrogenStorefronts` query to: + - Inventory all custom storefronts associated with a shop + - Monitor deployment status across multiple Hydrogen implementations + - Retrieve configuration details for storefront management operations + - Coordinate bulk operations across multiple storefront environments + - Access OAuth and authentication settings for each storefront + + This query supports comprehensive storefront portfolio management, enabling + developers to build CLI tools and dashboards that provide unified visibility + into complex multi-storefront architectures. The response includes detailed + configuration data, deployment information, and operational status for each + storefront instance. + + The query is particularly valuable for agencies or enterprise merchants + managing sophisticated headless commerce implementations where multiple + Hydrogen storefronts serve different customer segments, geographic regions, or + brand portfolios within a single Shopify backend. + + Learn more about [managing Hydrogen storefronts](https://shopify.dev/docs/custom-storefronts/hydrogen/getting-started). + """ + hydrogenStorefronts: [HydrogenStorefront!]! + + """ + A list of historical changes to inventory. Exactly one of `inventoryItemId` or `variantId` is required. + """ + inventoryHistory( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The ID of the inventory item. Only required if `variantId` is not supplied. + """ + inventoryItemId: ID @gidTypes(types: ["InventoryItem"]) + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The ID of the location. + """ + locationId: ID @gidTypes(types: ["Location"]) + + """ + 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: AdjustmentGroupSortKeys = CREATED_AT + + """ + The ID of the product variant. Only required if `inventoryItemId` is not supplied. + """ + variantId: ID @gidTypes(types: ["ProductVariant"]) + ): InventoryAdjustmentGroupConnection! + + """ + 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! @gidTypes(types: ["InventoryItem"]) + ): InventoryItem + + """ + Returns a list of inventory items. + """ + inventoryItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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! @gidTypes(types: ["InventoryLevel"]) + ): 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! @requiredAccess(scope: "`read_inventory` access scope.") + + """ + 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! @gidTypes(types: ["InventoryShipment"]) + ): InventoryShipment @requiredAccess(scope: "`read_inventory_shipments` access scope. Also: The user must have permission to view products.") + + """ + Returns a paginated list of [`InventoryShipment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryShipment) objects. + + Supports filtering by barcode (e.g. `barcode:"12345"`), status (e.g. + `status:"draft"` or `status:"in_transit"`), and destination (e.g. + `destination_id:12345`). + """ + inventoryShipments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | barcode | string | + | destination_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | + | tracking_number | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + 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: InventoryShipmentSortKeys = ID + ): InventoryShipmentConnection @requiredAccess(scope: "`read_inventory_shipments` access scope.") + + """ + 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! @gidTypes(types: ["InventoryTransfer"]) + ): InventoryTransfer @requiredAccess(scope: "`read_inventory_transfers` access scope. Also: The user must have permission to view products.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | destination_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | origin_id | id | + | product_id | id | + | product_variant_id | id | + | source_id | id | + | status | string | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): InventoryTransferConnection! @requiredAccess(scope: "`read_inventory_transfers` access scope. Also: The user must have permission to view products.") + + """ + 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! @gidTypes(types: ["Job"]) + ): 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 @gidTypes(types: ["Location"]) + ): Location + + """ + Return a location by an identifier. + """ + locationByIdentifier( + """ + The identifier of the location. + """ + identifier: LocationIdentifierInput! + ): Location @requiredAccess(scope: "`read_locations` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Whether to include the locations that are deactivated. + """ + includeInactive: Boolean = false + + """ + Whether to include the legacy locations of fulfillment services. + """ + includeLegacy: Boolean = false + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | active | string | + | address1 | string | + | address2 | string | + | city | string | + | country | string | + | created_at | time | + | geolocated | boolean | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | legacy | boolean | + | location_id | id | + | name | string | + | pickup_in_store | string | | - `enabled`
- `disabled` | + | province | string | + | zip | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | active | string | + | address1 | string | + | address2 | string | + | city | string | + | country | string | + | created_at | time | + | geolocated | boolean | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | legacy | boolean | + | location_id | id | + | name | string | + | pickup_in_store | string | | - `enabled`
- `disabled` | + | province | string | + | zip | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): Count + + """ + Returns a list of fulfillment orders that are on hold. + """ + manualHoldsFulfillmentOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The query conditions used to filter fulfillment orders. Only fulfillment + orders corresponding to orders matching the query will be counted. + Supported filter parameters: + - `order_financial_status` + - `order_risk_level` + - `shipping_address_coordinates_validated` + + See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) + for more information about using filters. + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): FulfillmentOrderConnection! @requiredAccess(scope: "`read_orders` access scope.") + + """ + Returns a `Market` resource by ID. + """ + market( + """ + The ID of the `Market` to return. + """ + id: ID! @gidTypes(types: ["Market"]) + ): 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.") @requiredAccess(scope: "The user must have markets API access.") + + """ + A resource that can have localized values for different markets. + """ + marketLocalizableResource( + """ + Find a market localizable resource by ID. + """ + resourceId: ID! @gidTypes(types: ["TranslatableMetafieldProxy", "Metaobject"]) + ): MarketLocalizableResource @requiredAccess(scope: "`read_translations` access scope.") + + """ + Resources that can have localized values for different markets. + """ + marketLocalizableResources( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Return only resources of a type. + """ + resourceType: MarketLocalizableResourceType! + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketLocalizableResourceConnection! @requiredAccess(scope: "`read_translations` access scope.") + + """ + Resources that can have localized values for different markets. + """ + marketLocalizableResourcesByIds( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Return only resources for given IDs. + """ + resourceIds: [ID!]! @gidTypes(types: ["TranslatableMetafieldProxy", "Metaobject"]) + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketLocalizableResourceConnection! @requiredAccess(scope: "`read_translations` access scope.") + + """ + A list of marketing activities associated with the marketing app. + """ + marketingActivities( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The list of marketing activity IDs to filter by. + """ + marketingActivityIds: [ID!] = [] @gidTypes(types: ["MarketingActivity"]) + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | app_id | id | + | app_name | string | A comma-separated list of app names. | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | marketing_campaign_id | id | + | scheduled_to_end_at | time | + | scheduled_to_start_at | time | + | tactic | string | + | title | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The list of remote IDs associated with marketing activities to filter by. + """ + remoteIds: [String!] = [] + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + + """ + The UTM parameters associated with marketing activities to filter by. + """ + utm: UTMInput + ): MarketingActivityConnection! + + """ + Returns a `MarketingActivity` resource by ID. + """ + marketingActivity( + """ + The ID of the `MarketingActivity` to return. + """ + id: ID! @gidTypes(types: ["MarketingActivity"]) + ): MarketingActivity + + """ + Returns a `MarketingEvent` resource by ID. + """ + marketingEvent( + """ + The ID of the `MarketingEvent` to return. + """ + id: ID! @gidTypes(types: ["MarketingEvent"]) + ): MarketingEvent + + """ + A list of marketing events associated with the marketing app. + """ + marketingEvents( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | app_id | id | + | description | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | started_at | time | + | type | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): MarketingEventConnection! + + """ + Returns the current payment configuration for a shop for a marketplace. + """ + marketplacePaymentsConfiguration: MarketplacePaymentsConfiguration @requiredAccess(scope: "`read_marketplace_payments_configurations` access scope.") @privatelyDocumented + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + Filters markets by enabled status. + """ + enabled: Boolean = null + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | market_condition_types | string | A comma-separated list of condition types. | + | market_type | string | + | name | string | + | status | string | | - `ACTIVE`
- `DRAFT` | + | wildcard_company_location_with_country_code | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + + """ + Filters markets by type. + """ + type: MarketType = null + ): MarketConnection! @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + 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! @gidTypes(types: ["Menu"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | title | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): MenuConnection! + + """ + Count of menus. + """ + menusCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | title | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): Count @requiredAccess(scope: "`read_online_store_navigation` access scope and Shopify approved scope.") + + """ + 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.") @gidTypes(types: ["MetafieldDefinition"]) + + """ + The identifier of the MetafieldDefinition to return. + """ + identifier: MetafieldDefinitionIdentifierInput + ): MetafieldDefinition @requiredAccess(scope: "API client to have access to the resource type associated with the metafield definition.\n") + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + Filter metafield definitions based on whether they are constrained. + """ + constraintStatus: MetafieldDefinitionConstraintStatus + + """ + Filter metafield definitions based on whether they apply to a given resource subtype. + """ + constraintSubtype: MetafieldDefinitionConstraintSubtypeIdentifier + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Filter metafield definition by key. + """ + key: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): MetafieldDefinitionConnection! + + """ + A paginated list of metafields. + """ + metafields( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafields by namespace. + """ + namespace: String + + """ + Filter metafields to a specific owner. + Recommend using the `metafields` connection from [HasMetafields](https://shopify.dev/api/admin/graphql/reference/common-objects/HasMetafields) + directly from the owner instead. + """ + owner: ID! @gidTypes(types: ["HasMetafields"]) + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + 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! @gidTypes(types: ["Metaobject"]) + ): Metaobject @requiredAccess(scope: "`read_metaobjects` access scope.") + + """ + 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 @requiredAccess(scope: "`read_metaobjects` access scope.") + + """ + 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! @gidTypes(types: ["MetaobjectDefinition"]) + ): MetaobjectDefinition @requiredAccess(scope: "`read_metaobject_definitions` access scope.") + + """ + 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 @requiredAccess(scope: "`read_metaobject_definitions` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetaobjectDefinitionConnection! @requiredAccess(scope: "`read_metaobject_definitions` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | display_name | string | + | 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` | + | handle | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The key of a field to sort with. Supports "id", "type", "updated_at", and "display_name". + """ + sortKey: String + + """ + The type of the metaobjects to query. + """ + type: String! + ): MetaobjectConnection! @requiredAccess(scope: "`read_metaobjects` access scope.") + + """ + Return a mobile platform application by its ID. + """ + mobilePlatformApplication( + """ + ID of the mobile platform app. + """ + id: ID! + ): MobilePlatformApplication @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") + + """ + List the mobile platform applications. + """ + mobilePlatformApplications( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MobilePlatformApplicationConnection! @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") + + """ + Determine if a shop is eligibile to sell NFTs. + """ + nftSalesEligibility: NftSalesEligibilityResult! + + """ + 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! @gidTypes(types: ["Node"]) + ): 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! @gidTypes(types: ["Order"]) + ): Order + + """ + Return an order by an identifier. + """ + orderByIdentifier( + """ + The identifier of the order. + """ + identifier: OrderIdentifierInput! + ): Order @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") + + """ + Returns a `OrderEditSession` resource by ID. + """ + orderEditSession( + """ + The ID of the `OrderEditSession` to return. + """ + id: ID! @gidTypes(types: ["OrderEditSession"]) + ): 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( + """ + ID of the order for which the payment was initiated. + """ + orderId: ID! @gidTypes(types: ["Order"]) + + """ + Unique identifier returned by orderCreatePayment. + """ + paymentReferenceId: String! + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SavedSearchConnection! @requiredAccess(scope: "`read_orders` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) + (`ChannelInformation.channelDefinition.handle`) field. | | | - + `channel:web`
- `channel:web,pos` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | 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"` | + | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) + field. | | | - `name:1001-A` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) + of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). + | - `has_issues`
- `no_issues`
- `not_validated` | | - + `shipping_address_validation_result_summary:no_issues` | + | 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` | + | 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` | + | 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` | + | status | string | Filter by the order's status to manage workflows or + analyze the order lifecycle. | - `open`
- `closed`
- + `cancelled`
- `not_closed` | | - `status:open` | + | 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` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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! + + """ + 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( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) + (`ChannelInformation.channelDefinition.handle`) field. | | | - + `channel:web`
- `channel:web,pos` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | 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"` | + | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) + field. | | | - `name:1001-A` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) + of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). + | - `has_issues`
- `no_issues`
- `not_validated` | | - + `shipping_address_validation_result_summary:no_issues` | + | 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` | + | 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` | + | 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` | + | status | string | Filter by the order's status to manage workflows or + analyze the order lifecycle. | - `open`
- `closed`
- + `cancelled`
- `not_closed` | | - `status:open` | + | 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` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The ID of an existing saved search. + The search’s query string is used as the query argument. + Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): Count @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") + + """ + Returns a `Page` resource by ID. + """ + page( + """ + The ID of the `Page` to return. + """ + id: ID! @gidTypes(types: ["Page"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | handle | string | Filter by the handle of the page. | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | published_status | string | Filter by published status | + | title | string | Filter by the title of the page. | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") + + """ + The payment customization. + """ + paymentCustomization( + """ + The ID of the payment customization. + """ + id: ID! @gidTypes(types: ["PaymentCustomization"]) + ): PaymentCustomization @requiredAccess(scope: "`read_payment_customizations` access scope.") + + """ + The payment customizations. + """ + paymentCustomizations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | enabled | boolean | + | function_id | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PaymentCustomizationConnection! @requiredAccess(scope: "`read_payment_customizations` access scope.") + + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") + + """ + Events that impact storefront performance, measured via RUM (Real User Monitoring). + """ + performanceEvents( + """ + Filters the RUM (Real User Monitoring) events for those created within the specified period. + """ + maxDays: Int = 90 + ): [PerformanceEvent!] + + """ + RUM (Real User Monitoring) performance metrics for a shop. + """ + performanceMetrics( + """ + Fetches RUM (Real User Monitoring) data for the specified aggregation level. + """ + aggregationLevel: PerformanceAggregationLevel = DAILY + + """ + Fetches RUM (Real User Monitoring) data for the specified device type. + """ + deviceTypes: [PerformanceDeviceType!] = [ALL] + + """ + Filters RUM (Real User Monitoring) data within the specified period. + """ + maxDays: Int = 90 + + """ + Specifies the storefront to return RUM (Real User Monitoring) data for. Can be a Hydrogen storefront ID + (e.g. `1234`) or `online_store` (defaults to `online_store`). + """ + storefrontId: String + ): [PerformanceMetrics!] + + """ + The set of features associated with a plan. + """ + planAddOnFeatureSet: [BillingPlanFeatureSection!]! + + """ + Returns a `PointOfSaleDevice` resource by ID. + """ + pointOfSaleDevice( + """ + The ID of the `PointOfSaleDevice` to return. + """ + id: ID! @gidTypes(types: ["PointOfSaleDevice"]) + ): PointOfSaleDevice + + """ + Lookup a point of sale device payment session by ID. + """ + pointOfSaleDevicePaymentSession( + """ + The ID of the point of sale device payment session. + """ + id: ID! @gidTypes(types: ["PointOfSaleDevicePaymentSession"]) + ): PointOfSaleDevicePaymentSession + + """ + A list of point of sale device payment sessions in the shop. + """ + pointOfSaleDevicePaymentSessions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | closing_date | date | + | closing_time | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | is_open | boolean | + | location_id | id | + | opening_date | date | + | opening_time | time | + | point_of_sale_device_id | id | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: PointOfSaleDevicePaymentSessionSortKeys = ID + ): PointOfSaleDevicePaymentSessionConnection! @requiredAccess(scope: "`read_cash_tracking` access scope.") + + """ + 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! @gidTypes(types: ["PriceList"]) + ): PriceList + + """ + All price lists for a shop. + """ + priceLists( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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.") @requiredAccess(scope: "The user must have markets API access.") + + """ + 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! @gidTypes(types: ["Product"]) + ): 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.") @requiredAccess(scope: "`read_products` access scope.") + + """ + Return a product by an identifier. + """ + productByIdentifier( + """ + The identifier of the product. + """ + identifier: ProductIdentifierInput! + ): Product @requiredAccess(scope: "`read_products` access scope.") + + """ + Returns the product duplicate job. + """ + productDuplicateJob( + """ + An ID of a product duplicate job to fetch. + """ + id: ID! @gidTypes(types: ["ProductDuplicateJob"]) + ): ProductDuplicateJob! + + """ + Returns a ProductFeed resource by ID. + """ + productFeed( + """ + The ID of the ProductFeed to return. + """ + id: ID! @gidTypes(types: ["ProductFeed"]) + ): ProductFeed @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + The product feeds for the shop. + """ + productFeeds( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductFeedConnection! @requiredAccess(scope: "`read_product_listings` access scope.") + + """ + 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! @gidTypes(types: ["ProductOperation"]) + ): 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 channel to filter resource feedback by. Use this when your app manages + multiple channels and each channel may have different feedback for the same product. + """ + channelId: ID @gidTypes(types: ["Channel"]) + + """ + The product associated with the resource feedback. + """ + id: ID! @gidTypes(types: ["Product"]) + ): ProductResourceFeedback @requiredAccess(scope: "`read_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") + + """ + Returns a list of the shop's product saved searches. + """ + productSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SavedSearchConnection! @requiredAccess(scope: "`read_products` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): StringConnection @requiredAccess(scope: "Requires `read_products` access scope.") + + """ + Returns the nodes of the product taxonomy based on the arguments provided. + If a `search` argument is provided, then all nodes that match the search query globally are returned. + If a `children_of` argument is provided, then all children of the specified node are returned. + If a `siblings_of` argument is provided, then all siblings of the specified node are returned. + If no arguments are provided, then all the top-level nodes of the taxonomy are returned. + """ + productTaxonomyNodes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The ID of the node associated with the child nodes to return. + """ + childrenOf: ID @gidTypes(types: ["ProductTaxonomyNode"]) + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Searches the product taxonomy for matching nodes. + """ + search: String + + """ + The ID of the node associated with the sibling nodes to return. + """ + siblingsOf: ID @gidTypes(types: ["ProductTaxonomyNode"]) + ): ProductTaxonomyNodeConnection! @deprecated(reason: "Use `taxonomy.categories` instead. This connection will be removed in the future.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): StringConnection @requiredAccess(scope: "Requires `read_products` access scope.") + + """ + 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! @gidTypes(types: ["ProductVariant"]) + ): ProductVariant + + """ + Return a product variant by an identifier. + """ + productVariantByIdentifier( + """ + The identifier of the product variant. + """ + identifier: ProductVariantIdentifierInput! + ): ProductVariant @requiredAccess(scope: "`read_products` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-123` | + | 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` | + | 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` | + | exclude_composite | boolean | Filter by product variants that aren't composites. | | | - `exclude_composite:true` | + | 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` | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_quantity | integer | Filter by an aggregate of inventory across + all locations where the product variant is stocked. | | | - + `inventory_quantity:10` | + | 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` | + | managed | boolean | Filter by whether there is fulfillment service + tracking associated with the product variants. | | | - `managed:true` | + | managed_by | string | Filter by the fulfillment service that tracks the + number of items in stock for the product variant. | | | - + `managed_by:shopify` | + | option1 | string | Filter by a custom property that a shop owner uses to + define product variants. | | | - `option1:small` | + | option2 | string | Filter by a custom property that a shop owner uses to + define product variants. | | | - `option2:medium` | + | option3 | string | Filter by a custom property that a shop owner uses to + define product variants. | | | - `option3:large` | + | product_id | id | Filter by the product [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-id) + field. | | | - `product_id:8474977763649` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | taxable | boolean | Filter by the product variant [`taxable`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-taxable) + field. | | | - `taxable:false` | + | title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) + field. | | | - `title:ice` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): ProductVariantConnection! + + """ + Count of product variants. Limited to a maximum of 10000 by default. + """ + productVariantsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + No supported search fields. + """ + query: String + ): Count @requiredAccess(scope: "`read_products` access scope.") + + """ + The list of vendors added to products. + The maximum page size is 1000. + """ + productVendors( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): StringConnection @requiredAccess(scope: "Requires `read_products` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-1234` | + | 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` | + | 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` | + | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) + field. | | | - `collection_id:108179161409` | + | 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` | + | 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'` | + | 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` | + | error_feedback | string | Filter by products with publishing errors. | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | 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` | + | has_only_composites | boolean | Filter by products that have only + composite variants. | | | - `has_only_composites:true` | + | 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` | + | has_variant_with_components | boolean | Filter by products that have + variants with associated components. | | | - + `has_variant_with_components:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_total | integer | Filter by inventory count. | | | - + `inventory_total:0`
- `inventory_total:>150`
- + `inventory_total:>=200` | + | 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` | + | 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"` | + | out_of_stock_somewhere | boolean | Filter by products that are out of + stock in at least one location. | | | - `out_of_stock_somewhere:true` | + | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) + field. | | | - `price:100.57` | + | 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` | + | 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` | + | product_type | string | Filter by a comma-separated list of [product + types](https://help.shopify.com/manual/products/details/product-type). | | | + - `product_type:snowboard` | + | publication_ids | string | Filter by a comma-separated list of publication + IDs that are associated with the product. | | | - + `publication_ids:184111530305,184111694145` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | `active` | - + `status:active,draft` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) + field. | | | - `title:The Minimal Snowboard` | + | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + enabled. | | | - `tracks_inventory:true` | + | 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'` | + | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) + field. | | | - `variant_id:45779434701121` | + | 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'` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): ProductConnection! + + """ + Count of products. Limited to a maximum of 10000 by default. + """ + productsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-1234` | + | 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` | + | 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` | + | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) + field. | | | - `collection_id:108179161409` | + | 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` | + | 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'` | + | 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` | + | error_feedback | string | Filter by products with publishing errors. | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | 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` | + | has_only_composites | boolean | Filter by products that have only + composite variants. | | | - `has_only_composites:true` | + | 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` | + | has_variant_with_components | boolean | Filter by products that have + variants with associated components. | | | - + `has_variant_with_components:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_total | integer | Filter by inventory count. | | | - + `inventory_total:0`
- `inventory_total:>150`
- + `inventory_total:>=200` | + | 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` | + | 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"` | + | out_of_stock_somewhere | boolean | Filter by products that are out of + stock in at least one location. | | | - `out_of_stock_somewhere:true` | + | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) + field. | | | - `price:100.57` | + | 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` | + | 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` | + | product_type | string | Filter by a comma-separated list of [product + types](https://help.shopify.com/manual/products/details/product-type). | | | + - `product_type:snowboard` | + | publication_ids | string | Filter by a comma-separated list of publication + IDs that are associated with the product. | | | - + `publication_ids:184111530305,184111694145` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | `active` | - + `status:active,draft` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) + field. | | | - `title:The Minimal Snowboard` | + | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + enabled. | | | - `tracks_inventory:true` | + | 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'` | + | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) + field. | | | - `variant_id:45779434701121` | + | 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'` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The ID of an existing saved search. + The search’s query string is used as the query argument. + Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): Count @requiredAccess(scope: "`read_products` access scope.") + + """ + 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! @gidTypes(types: ["Publication"]) + ): 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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 @requiredAccess(scope: "`read_publications` access scope.") + + """ + Returns a count of published products by publication ID. Limited to a maximum of 10000 by default. + """ + publishedProductsCount( + """ + The maximum number of products to count. + """ + limit: Int = 10000 + + """ + The ID of the publication that the products are published to. + """ + publicationId: ID! @gidTypes(types: ["Publication"]) + ): Count @requiredAccess(scope: "`read_publications` access scope.") + + """ + 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! @gidTypes(types: ["Refund"]) + ): Refund @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") + + """ + 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) + of the return to retrieve. + """ + id: ID! @gidTypes(types: ["Return"]) + ): Return @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") + + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + A list of return reason definition handles to filter by. + """ + handles: [String!] + + """ + A list of return reason definition IDs to filter by. + """ + ids: [ID!] @gidTypes(types: ["ReturnReasonDefinition"]) + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | deleted | boolean | Filter by whether the return reason has been removed from taxonomy. | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | name | string | Filter by name. | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): ReturnReasonDefinitionConnection! @requiredAccess(scope: "`read_returns` access scope.") + + """ + Returns a `ReturnableFulfillment` resource by ID. + """ + returnableFulfillment( + """ + The ID of the `ReturnableFulfillment` to return. + """ + id: ID! @gidTypes(types: ["ReturnableFulfillment"]) + ): ReturnableFulfillment + + """ + List of returnable fulfillments. + """ + returnableFulfillments( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Order ID that will scope all returnable fulfillments. + """ + orderId: ID! @gidTypes(types: ["Order"]) + + """ + 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! @gidTypes(types: ["ReverseDelivery"]) + ): ReverseDelivery @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") + + """ + Lookup a reverse fulfillment order by ID. + """ + reverseFulfillmentOrder( + """ + The ID of the reverse fulfillment order to return. + """ + id: ID! @gidTypes(types: ["ReverseFulfillmentOrder"]) + ): ReverseFulfillmentOrder @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") + + """ +

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! @gidTypes(types: ["ScriptTag"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | src | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + 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! @gidTypes(types: ["Segment"]) + ): Segment + + """ + A list of filter suggestions associated with a segment. A segment is a group + of members (commonly customers) that meet specific criteria. + """ + segmentFilterSuggestions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + + """ + Returns the elements of a list by keyword or term. + """ + search: String! + ): SegmentFilterConnection! + + """ + A list of filters. + """ + segmentFilters( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + ): SegmentFilterConnection! + + """ + A list of a shop's segment migrations. + """ + segmentMigrations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Search a segment migration by its saved search ID. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): SegmentMigrationConnection! + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + Returns the elements of a list by filter handle. + """ + filterQueryName: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Returns the elements of a list by filter parameter name. + """ + functionParameterQueryName: String + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Returns the elements of a list by keyword or term. + """ + search: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | name | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: SegmentSortKeys = CREATION_DATE + ): 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! @gidTypes(types: ["SellingPlanGroup"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | app_id | id | | - `CURRENT`
- `ALL`
- `* (numeric app ID)` | `CURRENT` | + | category | string | A comma-separated list of categories. | - + `SUBSCRIPTION`
- `PRE_ORDER`
- `TRY_BEFORE_YOU_BUY`
- `OTHER` | + | created_at | time | + | delivery_frequency | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | name | string | + | percentage_off | float | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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!]! @requiredAccess(scope: "`read_locales` access scope or `read_markets_home` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | source_identifier | string | Filter by the source identifier of the + payment request receipt. | | | - `source_identifier:1282823` | + | state | string | Filter by the state of the payment request receipt. + Options include: - COMPLETED - FAILED - PENDING - PROCESSING | | | - + `state:COMPLETED` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + Filter the functions by the API type. + """ + apiType: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Filter the functions by whether or not the function uses the creation UI in the Admin. + """ + useCreationUi: Boolean + ): 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 @accessRestricted(reason: "Requires the `read_shopify_payments` approval scope.") + + """ + 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 @requiredAccess(scope: "`read_reports` access scope. Also: Level 2 access to Customer data including name, address, phone, and email fields. Please refer to protected customer data [requirements](https:\/\/shopify.dev\/docs\/apps\/launch\/protected-customer-data).") + + """ + 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 @gidTypes(types: ["StaffMember"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | account_type | string | Filter by account type. | - `collaborator`
- + `collaborator_team_member`
- `invited`
- `regular`
- + `requested`
- `restricted`
- `saml` | + | email | string | Filter by email. | + | first_name | string | Filter by first name. | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | last_name | string | Filter by last name. | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + Filter standard metafield definitions based on whether they are constrained. + """ + constraintStatus: MetafieldDefinitionConstraintStatus + + """ + Filter standard metafield definitions based on whether they apply to a given resource subtype. + """ + constraintSubtype: MetafieldDefinitionConstraintSubtypeIdentifier + + """ + 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @gidTypes(types: ["StoreCreditAccount"]) + ): StoreCreditAccount + + """ + Returns the store credit configuration for a shop, including whether store + credit is enabled for customers at checkout. Use this to display the current + state of a merchant's store credit program or check eligibility before issuing + store credit to customers. + """ + storeCreditConfiguration: StoreCreditConfiguration! + + """ + Returns a `SubscriptionBillingAttempt` resource by ID. + """ + subscriptionBillingAttempt( + """ + The ID of the `SubscriptionBillingAttempt` to return. + """ + id: ID! @gidTypes(types: ["SubscriptionBillingAttempt"]) + ): SubscriptionBillingAttempt + + """ + Returns subscription billing attempts on a store. + """ + subscriptionBillingAttempts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | error_code | string | + | error_message | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The ID of the billing cycle bulk operation job. + """ + jobId: ID! @gidTypes(types: ["Job"]) + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionBillingCycleConnection! + + """ + Returns subscription billing cycles for a contract ID. + """ + subscriptionBillingCycles( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + Select subscription billing cycles within a date range. + """ + billingCyclesDateRangeSelector: SubscriptionBillingCyclesDateRangeSelector + + """ + Select subscription billing cycles within an index range. + """ + billingCyclesIndexRangeSelector: SubscriptionBillingCyclesIndexRangeSelector + + """ + The ID of the subscription contract to retrieve billing cycles for. + """ + contractId: ID! @gidTypes(types: ["SubscriptionContract"]) + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @gidTypes(types: ["SubscriptionContract"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | last_billing_attempt_error_type | string | + | status | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): SubscriptionContractConnection! + + """ + Returns a Subscription Draft resource by ID. + """ + subscriptionDraft( + """ + The ID of the Subscription Draft to return. + """ + id: ID! @gidTypes(types: ["SubscriptionDraft"]) + ): SubscriptionDraft + + """ + Returns the payment gateway currently used for subscription charges on the + shop. Subscription orders may use a dedicated gateway separate from the shop's + primary payment provider. + """ + subscriptionGateway: SubscriptionGateway @requiredAccess(scope: "`read_payment_settings` access scope or `read_customer_payment_methods` access scope.") + + """ + Returns the list of payment gateways available for subscription contract + migrations, allowing merchants to move existing subscriptions from one payment + gateway to another. + """ + subscriptionMigrationGateways: [SubscriptionMigrationGateway!]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | point_of_sale_device_id | id | + | processed_at | time | + | test | boolean | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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! @gidTypes(types: ["ThemeType"]) + ): OnlineStoreTheme @requiredAccess(scope: "`read_themes` access scope.") + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The theme names to filter by. Use '*' to match zero or more characters. + """ + names: [String!] + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The theme roles to filter by. + """ + roles: [ThemeRole!] + ): OnlineStoreThemeConnection @requiredAccess(scope: "`read_themes` access scope.") + + """ + Whether the top level menu is discoverable. + """ + topLevelMenuDiscoverable: Boolean! @requiredAccess(scope: "Access only available to authorized apps.") @privatelyDocumented + + """ + 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! @gidTypes(types: ["Article", "ArticleImage", "Blog", "Brand", "Collection", "CollectionImage", "CookieBanner", "MethodDefinition", "EmailTemplate", "FilterSetting", "FilterSettingGroup", "Link", "MediaImage", "Menu", "TranslatableMetafieldProxy", "Metaobject", "Article", "OnlineStoreBlog", "Menu", "OnlineStorePage", "ThemeType", "AppEmbed", "JsonTemplate", "ThemeLocaleContent", "SectionGroup", "ThemeSettingsCategory", "ThemeSettingsDataSections", "PackingSlipTemplate", "Page", "PaymentGateway", "Product", "ProductOption", "ProductOptionValue", "SellingPlan", "SellingPlanGroup", "Shop", "ShopPolicy", "SmsTemplate"]) + ): TranslatableResource @requiredAccess(scope: "`read_translations` access scope.") + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Return only resources of a type. + """ + resourceType: TranslatableResourceType! + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): TranslatableResourceConnection! @requiredAccess(scope: "`read_translations` access scope.") + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Return only resources for given IDs. + """ + resourceIds: [ID!]! @gidTypes(types: ["Article", "ArticleImage", "Blog", "Brand", "Collection", "CollectionImage", "CookieBanner", "MethodDefinition", "EmailTemplate", "FilterSetting", "FilterSettingGroup", "Link", "MediaImage", "Menu", "TranslatableMetafieldProxy", "Metaobject", "Article", "OnlineStoreBlog", "Menu", "OnlineStorePage", "ThemeType", "AppEmbed", "JsonTemplate", "ThemeLocaleContent", "SectionGroup", "ThemeSettingsCategory", "ThemeSettingsDataSections", "PackingSlipTemplate", "Page", "PaymentGateway", "Product", "ProductOption", "ProductOptionValue", "SellingPlan", "SellingPlanGroup", "Shop", "ShopPolicy", "SmsTemplate"]) + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): TranslatableResourceConnection! @requiredAccess(scope: "`read_translations` access scope.") + + """ + Returns a `UrlRedirect` resource by ID. + """ + urlRedirect( + """ + The ID of the `UrlRedirect` to return. + """ + id: ID! @gidTypes(types: ["UrlRedirect"]) + ): UrlRedirect + + """ + Returns a `UrlRedirectImport` resource by ID. + """ + urlRedirectImport( + """ + The ID of the `UrlRedirectImport` to return. + """ + id: ID! @gidTypes(types: ["UrlRedirectImport"]) + ): UrlRedirectImport + + """ + A list of the shop's URL redirect saved searches. + """ + urlRedirectSavedSearches( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SavedSearchConnection! @requiredAccess(scope: "`read_online_store_navigation` access scope.") + + """ + A list of redirects for a shop. + """ + urlRedirects( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | path | string | + | target | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): UrlRedirectConnection! + + """ + Count of redirects. Limited to a maximum of 10000 by default. + """ + urlRedirectsCount( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | path | string | + | target | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + The ID of an existing saved search. + The search’s query string is used as the query argument. + Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + ): Count @requiredAccess(scope: "`read_online_store_navigation` access scope.") + + """ + Validation available on the shop. + """ + validation( + """ + The ID of the validation. + """ + id: ID! @gidTypes(types: ["Validation"]) + ): Validation @requiredAccess(scope: "`read_validations` access scope.") + + """ + Validations available on the shop. + """ + validations( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @requiredAccess(scope: "`read_validations` access scope.") + + """ + 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 @gidTypes(types: ["WebPixel"]) + ): WebPixel + + """ + The web presences for the shop. + """ + webPresences( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketWebPresenceConnection @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") + + """ + 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! @gidTypes(types: ["WebhookSubscription"]) + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + Callback URL to filter by. + """ + callbackUrl: URL @deprecated(reason: "Use `uri` instead.") + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Response format to filter by. + """ + format: WebhookSubscriptionFormat + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + + """ + List of webhook subscription topics to filter by. + """ + topics: [WebhookSubscriptionTopic!] + + """ + 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 + ): 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( + """ + The upper bound on count value before returning a result. Use `null` to have no limit. + """ + limit: Int = 10000 + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | endpoint | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | topic | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + ): 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") @protectedObject(subject: "customer") { + """ + A list of the refunded additional fees as part of this refund. + """ + additionalFees: [RefundAdditionalFee!]! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): RefundLineItemConnection! + + """ + The `RefundShippingLine` resources attached to the refund. + """ + refundShippingLines( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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( + """ + Whether to include refund transactions which have not completed yet (e.g delayed refunds). + """ + includeIncompleteTransactions: Boolean = false + ): MoneyBag! + + """ + The transactions associated with the refund. + """ + transactions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): OrderTransactionConnection! + + """ + The date and time when the refund was updated. + """ + updatedAt: DateTime! +} + +""" +Represents a refunded additional fee. +""" +type RefundAdditionalFee @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "returns") { + """ + The monetary amount refunded in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The associated additional fee that was refunded. + """ + originalAdditionalFee: AdditionalFee +} + +""" +The input fields required to reimburse additional fees on a refund. +""" +input RefundAdditionalFeeInput @componentName(name: "returns") { + """ + The ID of the additional fee in the refund. + """ + additionalFeeId: ID! @gidTypes(types: ["AdditionalFee"]) +} + +""" +An agreement between the merchant and customer to refund all or a portion of the order. +""" +type RefundAgreement implements SalesAgreement @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + The ID of the duty in the refund. + """ + dutyId: ID! @gidTypes(types: ["Duty"]) + + """ + The type of refund for this duty. + """ + refundType: RefundDutyRefundType +} + +""" +The type of refund to perform for a particular refund duty. +""" +enum RefundDutyRefundType @componentName(name: "returns") { + """ + The duty is fully refunded. + """ + FULL + + """ + The duty is proportionally refunded based on the quantity of the refunded line item. + """ + PROPORTIONAL +} + +""" +An auto-generated type which holds one Refund and a cursor during pagination. +""" +type RefundEdge @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + Whether to allow the total refunded amount to surpass the amount paid for the order. + """ + allowOverRefunding: Boolean = false + + """ + 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 + + """ + An optional reason for a discrepancy between calculated and actual refund amounts. + """ + discrepancyReason: OrderAdjustmentInputDiscrepancyReason + + """ + An optional note that's attached to the refund. + """ + note: String + + """ + Whether to send a refund notification to the customer. + """ + notify: Boolean + + """ + The ID of the order that's being refunded. + """ + orderId: ID! @gidTypes(types: ["Order"]) + + """ + 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 additional fees to refund. + """ + refundAdditionalFees: [RefundAdditionalFeeInput!] + + """ + A list of duties to refund. + """ + refundDuties: [RefundDutyInput!] + + """ + A list of line items to refund. + """ + refundLineItems: [RefundLineItemInput!] + + """ + A list of instructions to process the financial outcome of the refund. + """ + refundMethods: [RefundMethodInput!] = [] + + """ + The input fields that are required to reimburse shipping costs. + """ + shipping: ShippingRefundInput + + """ + A list of transactions involved in the refund. + """ + transactions: [OrderTransactionInput!] +} + +""" +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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") @protectedObject(subject: "customer") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + The ID of the line item in the refund. + """ + lineItemId: ID! @gidTypes(types: ["LineItem"]) + + """ + The intended location for restocking. If the `restockType` is set to `NO_RESTOCK`, then this value is empty. + """ + locationId: ID @gidTypes(types: ["Location"]) + + """ + The quantity of the associated line item to be refunded. + """ + quantity: Int! + + """ + The type of restock for this line item. + """ + restockType: RefundLineItemRestockType +} + +""" +The type of restock performed for a particular refund line item. +""" +enum RefundLineItemRestockType @componentName(name: "returns") { + """ + 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 refund line item was returned. Use this when restocking line items that were fulfilled. + """ + RETURN +} + +""" +The different methods that a refund amount can be allocated to. +""" +enum RefundMethodAllocation @componentName(name: "sales") { + """ + 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 @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + Whether to refund the full shipping amount. + """ + fullRefund: Boolean = false + + """ + 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 +} + +""" +A shipping line item that's included in a refund. +""" +type RefundShippingLine implements Node @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + The application level for the condition. + """ + applicationLevel: MarketConditionApplicationType + + """ + The regions that comprise the market. + """ + regions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MarketRegionConnection! +} + +""" +The input fields for a remote Adyen customer payment method. +""" +input RemoteAdyenPaymentMethodInput @componentName(name: "payments") { + """ + The billing address. + """ + billingAddress: MailingAddressInput + + """ + The `shopper_reference` value from Adyen. + """ + shopperReference: String! + + """ + The `stored_payment_method_id` value from Adyen. + """ + storedPaymentMethodId: String! +} + +""" +The input fields for a remote Authorize.net customer payment profile. +""" +input RemoteAuthorizeNetCustomerPaymentProfileInput @componentName(name: "payments") { + """ + The billing address. + """ + billingAddress: MailingAddressInput + + """ + The customerPaymentProfileId value from the Authorize.net API. + """ + customerPaymentProfileId: String! + + """ + The customerProfileId value from the Authorize.net API. + """ + customerProfileId: String! +} + +""" +The input fields for a remote Braintree customer payment profile. +""" +input RemoteBraintreePaymentMethodInput @componentName(name: "payments") { + """ + The billing address. + """ + billingAddress: MailingAddressInput + + """ + The `customer_id` value from the Braintree API. + """ + customerId: String! + + """ + The `payment_method_token` value from the Braintree API. + """ + paymentMethodToken: String! +} + +""" +The input fields for a remote PayPal customer payment method. +""" +input RemotePaypalPaymentMethodInput @componentName(name: "payments") { + """ + The billing address. + """ + billingAddress: MailingAddressInput! + + """ + The billing agreement ID from PayPal that starts with 'B-' (for example, `B-1234XXXXX`). + """ + billingAgreementId: String! +} + +""" +The input fields for a remote stripe payment method. +""" +input RemoteStripePaymentMethodInput @componentName(name: "payments") { + """ + The billing address. + """ + billingAddress: MailingAddressInput + + """ + The customer_id value from the Stripe API. + """ + customerId: String! + + """ + The payment_method_id value from the Stripe API. + """ + paymentMethodId: String! +} + +""" +Return type for `removeFromReturn` mutation. +""" +type RemoveFromReturnPayload @componentName(name: "platform") { + """ + The modified return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +The resolved price inclusivity attributes. +""" +type ResolvedPriceInclusivity @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + A checkmark inside a circle. + """ + CHECKMARK_CIRCLE + + """ + A lowercase `i` inside a circle. + """ + INFORMATION_CIRCLE + + """ + A user behaviour indicator on nested circles in subdued color. + """ + MARKETING_MINOR_OFF + + """ + A user behaviour indicator on nested circles. + """ + MARKETING_MINOR_ON +} + +""" +The possible severity levels for a resource alert. +""" +enum ResourceAlertSeverity @componentName(name: "sales") { + """ + Indicates a critical alert. For example, a blocked app. + """ + CRITICAL + + """ + Indicates a neutral alert. For example, an accepted dispute. + """ + DEFAULT + ERROR @deprecated(reason: "`ERROR` severity is being deprecated in favour of `WARNING` or `CRITICAL` instead.") + + """ + Indicates an informative alert. For example, an escalated dispute. + """ + INFO + + """ + Indicates a success alert. For example, a winning a dispute. + """ + SUCCESS + + """ + Indicates an informative alert. For example, a new dispute. + """ + WARNING +} + +""" +Represents feedback from apps about a resource, and the steps required to set up the apps on the shop. +""" +type ResourceFeedback @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "apps") { + """ + 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 @componentName(name: "apps") { + """ + The ID of the channel that the feedback is for. Used to scope feedback to a + specific sales channel when the app has multiple channels. + """ + channelId: ID @gidTypes(types: ["Channel"]) + + """ + 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 @componentName(name: "apps") { + """ + 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 @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Operation is currently running. + """ + ACTIVE + + """ + Operation is complete. + """ + COMPLETE + + """ + Operation has been created. + """ + CREATED +} + +""" +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 @componentName(name: "merchandising") { + """ + 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 publication status of the resource on the channel. + """ + publicationStatusOnChannel: ResourcePublicationStatus! @deprecated(reason: "Publication status is no longer available and will be removed in a future release.") + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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! +} + +""" +The status of the resource publication on the channel. +""" +enum ResourcePublicationStatus @componentName(name: "merchandising") { + """ + Approved status. + """ + APPROVED + + """ + Not approved status. + """ + NOT_APPROVED + + """ + Pending status. + """ + PENDING + + """ + Unset status. + """ + UNSET +} + +""" +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 @componentName(name: "merchandising") { + """ + 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 publication status of the resource on the channel. + """ + publicationStatusOnChannel: ResourcePublicationStatus! @deprecated(reason: "Publication status is no longer available and will be removed in a future release.") + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + The value of the fee as a percentage. + """ + percentage: Float! +} + +""" +Information about product is restricted for a given resource. +""" +type RestrictedForResource @requiredAccess(scope: "`read_order_edits` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + 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 + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter exchange line items by processing status. + """ + processingStatus: ReturnProcessingStatusFilterInput + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter return line items by processing status. + """ + processingStatus: ReturnProcessingStatusFilterInput + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ReturnLineItemConnection! + + """ + The return shipping fees for the return. + """ + returnShippingFees: [ReturnShippingFee!]! + + """ + The list of reverse fulfillment orders for the return. + """ + reverseFulfillmentOrders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 exchange line items from the return to include in the outcome. + """ + exchangeLineItems: [SuggestedOutcomeExchangeLineItemInput!]! + + """ + The additional fees from the associated order to include as a refund. + """ + refundAdditionalFees: [RefundAdditionalFeeInput!] + + """ + 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 + + """ + The shipping amount from the associated order to include as a refund. + """ + refundShipping: RefundShippingInput + + """ + The line items from the return to include in the outcome. + """ + returnLineItems: [SuggestedOutcomeReturnLineItemInput!]! + + """ + ID of the tip line item. + """ + tipLineId: ID @gidTypes(types: ["LineItem"]) + ): SuggestedReturnFinancialOutcome + + """ + A suggested refund for the return. + """ + suggestedRefund( + """ + The additional fees from the associated order to include in the refund. + """ + refundAdditionalFees: [RefundAdditionalFeeInput!] + + """ + The duties from to associated order to include in the refund. + """ + refundDuties: [RefundDutyInput!] + + """ + The shipping amount from the associated order to include in the refund. + """ + refundShipping: RefundShippingInput + + """ + The line items from the return to include in the refund. + """ + returnRefundLineItems: [ReturnRefundLineItemInput!]! + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "returns") { + """ + The ID of the return that's being approved. + """ + id: ID! @gidTypes(types: ["Return"]) + + """ + 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 @componentName(name: "platform") { + """ + The approved return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnCancel` mutation. +""" +type ReturnCancelPayload @componentName(name: "platform") { + """ + The canceled return. + """ + return: Return + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnClose` mutation. +""" +type ReturnClosePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + The return contains final sale items. + """ + FINAL_SALE + + """ + The return is declined for another reason. + """ + OTHER + + """ + The return period has ended. + """ + RETURN_PERIOD_ENDED +} + +""" +The input fields for declining a customer's return request. +""" +input ReturnDeclineRequestInput @componentName(name: "returns") { + """ + The notification message that's sent to a customer about their declined return request. + Maximum length: 500 characters. + """ + declineNote: String + + """ + The reason why the merchant declined the customer's return request. + """ + declineReason: ReturnDeclineReason! + + """ + The ID of the return that's being declined. + """ + id: ID! @gidTypes(types: ["Return"]) + + """ + Notify the customer when a return request is declined. + The customer will only receive a notification if `Order.email` is present. + """ + notifyCustomer: Boolean = false +} + +""" +Return type for `returnDeclineRequest` mutation. +""" +type ReturnDeclineRequestPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + The requested resource already exists. + """ + ALREADY_EXISTS + + """ + The input value is blank. + """ + BLANK + + """ + A requested resource could not be created. + """ + CREATION_FAILED + + """ + The input value should be equal to the value allowed. + """ + EQUAL_TO + + """ + A required feature is not enabled. + """ + FEATURE_NOT_ENABLED + + """ + 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 + + """ + Unexpected internal error happened. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + A resource was not in the correct state for the operation to succeed. + """ + INVALID_STATE + + """ + 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 user does not have permission to perform the operation. + """ + MISSING_PERMISSION + + """ + A requested notification could not be sent. + """ + NOTIFICATION_FAILED + + """ + The input value is not a number. + """ + NOT_A_NUMBER + + """ + A requested item is not editable. + """ + NOT_EDITABLE + + """ + A requested item could not 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 + + """ + Too many arguments provided. + """ + TOO_MANY_ARGUMENTS + + """ + The input value is too short. + """ + TOO_SHORT + + """ + The input value is the wrong length. + """ + WRONG_LENGTH +} + +""" +The input fields for a return. +""" +input ReturnInput @componentName(name: "returns") { + """ + The new line items to be added to the order. + """ + exchangeLineItems: [ExchangeLineItemInput!] + + """ + 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.") + + """ + The ID of the order to be returned. + """ + orderId: ID! @gidTypes(types: ["Order"]) + + """ + The UTC date and time when the return was first solicited by the customer. + """ + requestedAt: DateTime + + """ + The return line items list to be handled. + """ + returnLineItems: [ReturnLineItemInput!]! + + """ + The return shipping fee to capture. + """ + returnShippingFee: ReturnShippingFeeInput + + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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! +} + +""" +An auto-generated type for paginating through multiple ReturnLineItems. +""" +type ReturnLineItemConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ReturnLineItemEdge!]! + + """ + A list of nodes that are contained in ReturnLineItemEdge. 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: [ReturnLineItem!]! + + """ + 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 ReturnLineItem and a cursor during pagination. +""" +type ReturnLineItemEdge @componentName(name: "returns") { + """ + 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 ReturnLineItemEdge. + """ + node: ReturnLineItem! +} + +""" +The input fields for a return line item. +""" +input ReturnLineItemInput @componentName(name: "returns") { + """ + The ID of the fulfillment line item to be returned. + Specifically, this field expects a `FulfillmentLineItem.id`. + """ + fulfillmentLineItemId: ID! @gidTypes(types: ["FulfillmentLineItem"]) + + """ + The quantity of the item to be returned. + """ + quantity: Int! + + """ + The restocking fee to capture. + """ + restockingFee: RestockingFeeInput + + """ + 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 @gidTypes(types: ["ReturnReasonDefinition"]) + + """ + A note about the reason that the item is being returned. + Maximum length: 255 characters. + """ + returnReasonNote: String = "" +} + +""" +The input fields for a removing a return line item from a return. +""" +input ReturnLineItemRemoveFromReturnInput @componentName(name: "returns") { + """ + The quantity of the associated return line item to be removed. + """ + quantity: Int! + + """ + The ID of the return line item to remove. + """ + returnLineItemId: ID! @gidTypes(types: ["ReturnLineItem"]) +} + +""" +Return type for `returnLineItemRemoveFromReturn` mutation. +""" +type ReturnLineItemRemoveFromReturnPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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! +} + +""" +The financial transfer details for the return outcome. +""" +union ReturnOutcomeFinancialTransfer @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") = InvoiceReturnOutcome | RefundReturnOutcome + +""" +The input fields for an exchange line item. +""" +input ReturnProcessExchangeLineItemInput @componentName(name: "returns") { + """ + The ID of the exchange line item. + """ + id: ID! @gidTypes(types: ["ExchangeLineItem"]) + + """ + The quantity of the exchange line item. + """ + quantity: Int! +} + +""" +The input fields for the financial transfer for the return. +""" +input ReturnProcessFinancialTransferInput @oneOf @componentName(name: "returns") { + """ + Issue a refund for the return. + """ + issueRefund: ReturnProcessRefundInput +} + +""" +The input fields for processing a return. +""" +input ReturnProcessInput @componentName(name: "returns") { + """ + The exchange line items list to be handled. + """ + exchangeLineItems: [ReturnProcessExchangeLineItemInput!] = [] + + """ + The financial transfer for the return. + """ + financialTransfer: ReturnProcessFinancialTransferInput + + """ + The note for the return. + """ + note: String + + """ + Whether to notify the customer about the return. + """ + notifyCustomer: Boolean = false + + """ + The refund duties list to be handled. + """ + refundDuties: [RefundDutyInput!] = [] + + """ + The shipping cost to refund. + """ + refundShipping: RefundShippingInput + + """ + The ID of the return to be processed. + """ + returnId: ID! @gidTypes(types: ["Return"]) + + """ + The return line items list to be handled. + """ + returnLineItems: [ReturnProcessReturnLineItemInput!] = [] + + """ + ID of the tip line item. + """ + tipLineId: ID @gidTypes(types: ["LineItem"]) +} + +""" +Return type for `returnProcess` mutation. +""" +type ReturnProcessPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + The dispositions for the return line item. + """ + dispositions: [ReverseFulfillmentOrderDisposeInput!] + + """ + The ID of the return line item. + """ + id: ID! @gidTypes(types: ["ReturnLineItem"]) + + """ + The quantity of the return line item. + """ + quantity: Int! +} + +""" +Filter line items based on processing status. +""" +enum ReturnProcessingStatusFilterInput @componentName(name: "returns") { + """ + Only include line items that have some processable quantity. + """ + PROCESSABLE + + """ + Only include line items that have been processed. + """ + PROCESSED +} + +""" +The reason for returning the return line item. +""" +enum ReturnReason @componentName(name: "returns") { + """ + The item is returned because the buyer did not like the color. Displays as **Color**. + """ + COLOR + + """ + The item is returned because it is damaged or defective. Displays as **Damaged or defective**. + """ + DEFECTIVE + + """ + The item is returned because it was not as described. Displays as **Item not as described**. + """ + NOT_AS_DESCRIBED + + """ + 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 the size was too large. Displays as **Size was too large**. + """ + SIZE_TOO_LARGE + + """ + 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 buyer did not like the style. Displays as **Style**. + """ + STYLE + + """ + The item is returned because of an unknown reason. Displays as **Unknown**. + """ + UNKNOWN + + """ + The item is returned because the customer changed their mind. Displays as **Customer changed their mind**. + """ + UNWANTED + + """ + The item is returned because the customer received the wrong one. Displays as **Received the wrong item**. + """ + WRONG_ITEM +} + +""" +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 @requiredAccess(scope: "`read_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + An optional note that's attached to the refund. + """ + note: String + + """ + Whether to send a refund notification to the customer. + """ + notifyCustomer: Boolean = false + + """ + A list of transactions involved in refunding the return. + """ + orderTransactions: [ReturnRefundOrderTransactionInput!] = [] + + """ + A list of duties to refund. + """ + refundDuties: [RefundDutyInput!] + + """ + The shipping amount to refund. + """ + refundShipping: RefundShippingInput + + """ + The ID of the return. + """ + returnId: ID! @gidTypes(types: ["Return"]) + + """ + A list of return line items to refund. + """ + returnRefundLineItems: [ReturnRefundLineItemInput!]! +} + +""" +The input fields for a return refund line item. +""" +input ReturnRefundLineItemInput @componentName(name: "returns") { + """ + The quantity of the return line item to be refunded. + """ + quantity: Int! + + """ + The ID of the return line item to be refunded. + """ + returnLineItemId: ID! @gidTypes(types: ["ReturnLineItem"]) +} + +""" +The input fields to create order transactions when refunding a return. +""" +input ReturnRefundOrderTransactionInput @componentName(name: "returns") { + """ + The ID of the parent order transaction. The transaction must be of kind `CAPTURE` or a `SALE`. + """ + parentId: ID! @gidTypes(types: ["OrderTransaction"]) + + """ + The amount of money for the transaction in the presentment currency of the order. + """ + transactionAmount: MoneyInput! +} + +""" +Return type for `returnRefund` mutation. +""" +type ReturnRefundPayload @componentName(name: "platform") { + """ + The created refund. + """ + refund: Refund + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ReturnUserError!]! +} + +""" +Return type for `returnReopen` mutation. +""" +type ReturnReopenPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + The ID of the order that's being returned. + """ + orderId: ID! @gidTypes(types: ["Order"]) + + """ + 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 @componentName(name: "returns") { + """ + 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 + + """ + The ID of the fulfillment line item to be returned. + Specifically, this field expects a `FulfillmentLineItem.id`. + """ + fulfillmentLineItemId: ID! @gidTypes(types: ["FulfillmentLineItem"]) + + """ + 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 @gidTypes(types: ["ReturnReasonDefinition"]) +} + +""" +Return type for `returnRequest` mutation. +""" +type ReturnRequestPayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + The return has been canceled. + """ + CANCELED + + """ + The return has been completed. + """ + CLOSED + + """ + The return was declined. + """ + DECLINED + + """ + The return is in progress. + """ + OPEN + + """ + The return was requested. + """ + REQUESTED +} + +""" +An error that occurs during the execution of a return mutation. +""" +type ReturnUserError implements DisplayableError @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope. Also: Requires the `read_returns` access scope.") @componentName(name: "returns") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ReturnableFulfillmentLineItemConnection! +} + +""" +An auto-generated type for paginating through multiple ReturnableFulfillments. +""" +type ReturnableFulfillmentConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope. Also: Requires the `read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") = ReverseDeliveryShippingDeliverable + +""" +An auto-generated type which holds one ReverseDelivery and a cursor during pagination. +""" +type ReverseDeliveryEdge @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") @protectedObject(subject: "customer") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + The quantity of the item to be included in the delivery. + """ + quantity: Int! + + """ + The ID of the related reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItemId: ID! @gidTypes(types: ["ReverseFulfillmentOrderLineItem"]) +} + +""" +A reverse shipping deliverable that may include a label and tracking information. +""" +type ReverseDeliveryShippingDeliverable @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") @protectedObject(subject: "customer") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + A globally-unique ID. + """ + id: ID! + + """ + The list of reverse fulfillment order line items for the reverse fulfillment order. + """ + lineItems( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + The final arrangement for the reverse fulfillment order line item. + """ + dispositionType: ReverseFulfillmentOrderDispositionType! + + """ + 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 @gidTypes(types: ["Location"]) + + """ + The quantity of the reverse fulfillment order line item to dispose. + """ + quantity: Int! + + """ + The ID of the reverse fulfillment order line item. + """ + reverseFulfillmentOrderLineItemId: ID! @gidTypes(types: ["ReverseFulfillmentOrderLineItem"]) +} + +""" +Return type for `reverseFulfillmentOrderDispose` mutation. +""" +type ReverseFulfillmentOrderDisposePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + An item that was expected but absent. + """ + MISSING + + """ + An item that wasn't restocked. + """ + NOT_RESTOCKED + + """ + An item that requires further processing before being restocked or discarded. + """ + PROCESSING_REQUIRED + + """ + An item that was restocked. + """ + RESTOCKED +} + +""" +An auto-generated type which holds one ReverseFulfillmentOrder and a cursor during pagination. +""" +type ReverseFulfillmentOrderEdge @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + The status of the reverse fulfillment order third-party confirmation. + """ + status: ReverseFulfillmentOrderThirdPartyConfirmationStatus! +} + +""" +The status of a reverse fulfillment order third-party confirmation. +""" +enum ReverseFulfillmentOrderThirdPartyConfirmationStatus @componentName(name: "returns") { + """ + 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 @componentName(name: "reviews") { + """ + Indicates a high likelihood that the order is fraudulent. + """ + HIGH + + """ + Indicates a low likelihood that the order is fraudulent. + """ + LOW + + """ + Indicates a medium likelihood that the order is fraudulent. + """ + MEDIUM + + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { + """ + 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 @componentName(name: "reviews") { + """ + A negative contributor that increases the risk. + """ + NEGATIVE + + """ + A neutral contributor with regards to risk. + """ + NEUTRAL + + """ + A positive contributor that lowers the risk. + """ + POSITIVE +} + +""" +A row count represents rows on background operation. +""" +type RowCount @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + SEO Description. + """ + description: String + + """ + SEO Title. + """ + title: String +} + +""" +The input fields for SEO information. +""" +input SEOInput @componentName(name: "platform") { + """ + SEO description of the product. + """ + description: String + + """ + SEO title of the product. + """ + title: 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + A purchase or charge. + """ + ORDER + + """ + A removal or return. + """ + RETURN + + """ + An unknown order action. Represents new actions that may be added in future versions. + """ + UNKNOWN + + """ + A change to the price, taxes, or discounts for a prior purchase. + """ + UPDATE +} + +""" +The additional fee details for a line item. +""" +type SaleAdditionalFee implements Node @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "sales") { + """ + An additional fee. + """ + ADDITIONAL_FEE + + """ + A sale adjustment. + """ + ADJUSTMENT + + """ + A duty charge. + """ + DUTY + + """ + A fee charge. + """ + FEE + + """ + A gift card. + """ + GIFT_CARD + + """ + A product purchased, returned or exchanged. + """ + PRODUCT + + """ + A shipping cost. + """ + SHIPPING + + """ + A tip added by the customer. + """ + TIP + + """ + An unknown sale line. Represents new types that may be added in future versions. + """ + UNKNOWN +} + +""" +The tax allocated to a sale from a single tax line. +""" +type SaleTax @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + A descriptive name of the 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! +} + +""" +Return type for `savedSearchCreate` mutation. +""" +type SavedSearchCreatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + ID of the saved search to delete. + """ + id: ID! @gidTypes(types: ["SavedSearch"]) +} + +""" +Return type for `savedSearchDelete` mutation. +""" +type SavedSearchDeletePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + ID of the saved search to update. + """ + id: ID! @gidTypes(types: ["SavedSearch"]) + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @requiredAccess(scope: "`read_script_tags` access scope. Also: Requires access to script tags.") @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 web storefront. + """ + ONLINE_STORE + + """ + Include the script only on the Order status page. + """ + ORDER_STATUS @deprecated(reason: "`ORDER_STATUS` is deprecated and unavailable as a mutation input.\n") +} + +""" +An auto-generated type which holds one ScriptTag and a cursor during pagination. +""" +type ScriptTagEdge @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 + + """ + The page or pages on the online store where the script should be included. + """ + displayScope: ScriptTagDisplayScope + + """ + The URL of the remote script. For example: `https://example.com/path/to/script.js`. + """ + src: URL +} + +""" +Return type for `scriptTagUpdate` mutation. +""" +type ScriptTagUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + A list of options that can be use to filter product availability. + """ + productAvailability: [FilterOption!]! +} + +""" +Represents an individual result returned from a search. +""" +type SearchResult @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + An article. + """ + ARTICLE + + """ + A balance transaction. + """ + BALANCE_TRANSACTION + + """ + A blog. + """ + BLOG + COLLECTION + CUSTOMER + + """ + A code discount redeem code. + """ + DISCOUNT_REDEEM_CODE + DRAFT_ORDER + + """ + A file. + """ + FILE + + """ + An inventory transfer. + """ + INVENTORY_TRANSFER + ORDER + + """ + A page. + """ + PAGE + PRICE_RULE + PRODUCT + + """ + A URL redirect. + """ + URL_REDIRECT +} + +""" +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 @requiredAccess(scope: "`read_customers` access scope. Also: The user must not have restricted access.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 + + """ + A list of parameters that are mutually exclusive with the parameter. + """ + mutuallyExclusiveWith: [String!]! + + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "customers") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The metaobject value of the linked metafield. + """ + linkedMetafieldValue: String + + """ + The name of the parent product's option. + """ + name: String! + + """ + The selected option value of the parent product's option. + """ + value: 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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 @gidTypes(types: ["Market"]) + ): [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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 + + """ + 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, must be one of WEEKDAY, MONTHDAY, YEARDAY. + """ + type: SellingPlanAnchorType +} + +""" +Represents the anchor type. +""" +enum SellingPlanAnchorType @componentName(name: "merchandising") { + """ + Which day of the month, between 1-31. + """ + MONTHDAY + + """ + Which day of the week, between 1-7. + """ + WEEKDAY + + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = SellingPlanFixedBillingPolicy | SellingPlanRecurringBillingPolicy + +""" +The input fields that are required to create or update a billing policy type. +""" +input SellingPlanBillingPolicyInput @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = MoneyV2 | SellingPlanCheckoutChargePercentageValue + +""" +The input fields required to create or update an checkout charge value. +""" +input SellingPlanCheckoutChargeValueInput @componentName(name: "merchandising") { + """ + The fixed value for an checkout charge. + """ + fixedValue: Decimal + + """ + The percentage value. + """ + percentage: Float +} + +""" +An auto-generated type for paginating through multiple SellingPlans. +""" +type SellingPlanConnection @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = SellingPlanFixedDeliveryPolicy | SellingPlanRecurringDeliveryPolicy + +""" +The input fields that are required to create or update a delivery policy. +""" +input SellingPlanDeliveryPolicyInput @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + The checkout charge policy for the selling plan. + """ + checkoutCharge: SellingPlanCheckoutChargeInput + + """ + 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 + + """ + When to capture the payment for the amount due. + """ + remainingBalanceChargeTrigger: SellingPlanRemainingBalanceChargeTrigger +} + +""" +Represents a fixed selling plan delivery policy. +""" +type SellingPlanFixedDeliveryPolicy @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 + + """ + The date and time when the fulfillment should trigger. + """ + fulfillmentExactTime: DateTime + + """ + What triggers the fulfillment. + """ + fulfillmentTrigger: SellingPlanFulfillmentTrigger + + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Price adjustment type defined by the policy. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType + + """ + Price adjustment value defined by the policy. + """ + adjustmentValue: SellingPlanPricingPolicyValueInput + + """ + ID of the pricing policy. + """ + id: ID @gidTypes(types: ["SellingPlanRecurringPricingPolicy"]) +} + +""" +Describes what triggers fulfillment. +""" +enum SellingPlanFulfillmentTrigger @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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! @gidTypes(types: ["Product"]) + ): Boolean! + + """ + Whether the given product variant is directly associated to the selling plan group. + """ + appliesToProductVariant( + """ + The ID of the product. + """ + productVariantId: ID! @gidTypes(types: ["ProductVariant"]) + ): 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! @gidTypes(types: ["Product"]) + ): 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filters the product variants by a product ID. + """ + productId: ID @gidTypes(types: ["Product"]) + + """ + 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 @gidTypes(types: ["Product"]) + ): Count + + """ + Products associated to the selling plan group. + """ + products( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @gidTypes(types: ["Market"]) + ): [Translation!]! +} + +""" +Return type for `sellingPlanGroupAddProductVariants` mutation. +""" +type SellingPlanGroupAddProductVariantsPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + ID for app, exposed in Liquid and product JSON. + """ + appId: String + + """ + Merchant facing description of the selling plan group. + """ + description: String + + """ + Merchant facing label of the selling plan group. + """ + merchantCode: String + + """ + 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!] + + """ + Relative value for display purposes of the selling plan group. A lower position will be displayed before a higher one. + """ + position: Int + + """ + List of selling plans to create. + """ + sellingPlansToCreate: [SellingPlanInput!] + + """ + List of selling plans ids to delete. + """ + sellingPlansToDelete: [ID!] @gidTypes(types: ["SellingPlan"]) + + """ + List of selling plans to update. + """ + sellingPlansToUpdate: [SellingPlanInput!] +} + +""" +Return type for `sellingPlanGroupRemoveProductVariants` mutation. +""" +type SellingPlanGroupRemoveProductVariantsPayload @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + The IDs of the Products to add to the Selling Plan Group. + """ + productIds: [ID!] @gidTypes(types: ["Product"]) + + """ + The IDs of the Variants to add to the Selling Plan Group. + """ + productVariantIds: [ID!] @gidTypes(types: ["ProductVariant"]) +} + +""" +The set of valid sort keys for the SellingPlanGroup query. +""" +enum SellingPlanGroupSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @componentName(name: "platform") { + """ + Billing and delivery policy types must be the same. + """ + BILLING_AND_DELIVERY_POLICY_TYPES_MUST_BE_THE_SAME + + """ + Billing policy's interval is too large. + """ + BILLING_POLICY_INTERVAL_TOO_LARGE + + """ + The input value is blank. + """ + BLANK + + """ + A fixed billing policy's checkout charge value and type must match. + """ + CHECKOUT_CHARGE_VALUE_AND_TYPE_MUST_MATCH + + """ + Delivery policy's interval is too large. + """ + DELIVERY_POLICY_INTERVAL_TOO_LARGE + + """ + The input value should be equal to the value allowed. + """ + EQUAL_TO + + """ + Could not add the resource to the selling plan group. + """ + ERROR_ADDING_RESOURCE_TO_GROUP + + """ + 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 billing policy's fulfillment_exact_time can't be blank when the fulfillment_trigger is EXACT_TIME. + """ + FULFILLMENT_EXACT_TIME_REQUIRED + + """ + 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 + + """ + Selling plan group could not be deleted. + """ + GROUP_COULD_NOT_BE_DELETED + + """ + Selling plan group does not exist. + """ + GROUP_DOES_NOT_EXIST + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + The input value is invalid. + """ + INVALID + + """ + The input submitted is invalid. + """ + INVALID_INPUT + + """ + 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 + + """ + Only one billing policy type can be defined. + """ + ONLY_NEED_ONE_BILLING_POLICY_TYPE + + """ + A fixed billing policy's checkout charge can have at most one value. + """ + ONLY_NEED_ONE_CHECKOUT_CHARGE_VALUE + + """ + 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 + + """ + Only one pricing policy adjustment value type can be defined. + """ + ONLY_NEED_ONE_PRICING_POLICY_VALUE + + """ + 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 + + """ + Selling plan does not exist. + """ + PLAN_DOES_NOT_EXIST + + """ + Selling plan ID must be specified to update. + """ + PLAN_ID_MUST_BE_SPECIFIED_TO_UPDATE + + """ + The input value needs to be blank. + """ + PRESENT + + """ + Pricing policy's adjustment value and adjustment type must match. + """ + PRICING_POLICY_ADJUSTMENT_VALUE_AND_TYPE_MUST_MATCH + + """ + Product does not exist. + """ + PRODUCT_DOES_NOT_EXIST + + """ + Product variant does not exist. + """ + PRODUCT_VARIANT_DOES_NOT_EXIST + + """ + 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_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 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 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 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 + + """ + The selling plan list provided contains 1 or more invalid IDs. + """ + RESOURCE_LIST_CONTAINS_INVALID_IDS + + """ + 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 + + """ + 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 + + """ + Missing billing policy. + """ + SELLING_PLAN_BILLING_POLICY_MISSING + + """ + Must include at least one selling plan. + """ + SELLING_PLAN_COUNT_LOWER_BOUND + + """ + Exceeded the selling plan limit (31). + """ + SELLING_PLAN_COUNT_UPPER_BOUND + + """ + Missing delivery policy. + """ + SELLING_PLAN_DELIVERY_POLICY_MISSING + + """ + 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 + + """ + Selling plan's billing policy max cycles must be greater than min cycles. + """ + SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES + + """ + 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 + + """ + Selling plan's pricing policies must contain one fixed pricing policy. + """ + SELLING_PLAN_PRICING_POLICIES_MUST_CONTAIN_A_FIXED_PRICING_POLICY + + """ + 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 input fields to create or update a selling plan. +""" +input SellingPlanInput @componentName(name: "merchandising") { + """ + Selling plan policy which describes the billing details. + """ + billingPolicy: SellingPlanBillingPolicyInput + + """ + The category used to classify this selling plan for reporting purposes. + """ + category: SellingPlanCategory + + """ + A selling plan policy which describes the delivery details. + """ + deliveryPolicy: SellingPlanDeliveryPolicyInput + + """ + Buyer facing string which describes the selling plan commitment. + """ + description: String + + """ + ID of the selling plan. + """ + id: ID @gidTypes(types: ["SellingPlan"]) + + """ + A selling plan policy which describes the inventory details. + """ + inventoryPolicy: SellingPlanInventoryPolicyInput + + """ + Additional customizable information to associate with the SellingPlan. + """ + metafields: [MetafieldInput!] + + """ + Buyer facing string which describes the selling plan content. + """ + 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 value for display purposes of this plan. A lower position will be displayed before a higher one. + """ + position: Int + + """ + The pricing policies which describe the pricing details. Each selling plan + can only contain a maximum of 2 pricing policies. + """ + pricingPolicies: [SellingPlanPricingPolicyInput!] +} + +""" +Represents valid selling plan interval. +""" +enum SellingPlanInterval @componentName(name: "merchandising") { + """ + Day interval. + """ + DAY + + """ + Month interval. + """ + MONTH + + """ + Week interval. + """ + WEEK + + """ + Year interval. + """ + YEAR +} + +""" +The selling plan inventory policy. +""" +type SellingPlanInventoryPolicy @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + When to reserve inventory for the order. + """ + reserve: SellingPlanReserve! +} + +""" +The input fields required to create or update an inventory policy. +""" +input SellingPlanInventoryPolicyInput @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = SellingPlanFixedPricingPolicy | SellingPlanRecurringPricingPolicy + +""" +Represents a selling plan pricing policy adjustment type. +""" +enum SellingPlanPricingPolicyAdjustmentType @componentName(name: "merchandising") { + """ + Fixed amount off adjustment. + """ + FIXED_AMOUNT + + """ + Percentage off adjustment. + """ + PERCENTAGE + + """ + Price of the policy. + """ + PRICE +} + +""" +Represents a selling plan pricing policy adjustment value type. +""" +union SellingPlanPricingPolicyAdjustmentValue @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = MoneyV2 | SellingPlanPricingPolicyPercentageValue + +""" +Represents selling plan pricing policy common fields. +""" +interface SellingPlanPricingPolicyBase @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Fixed pricing policy details. + """ + fixed: SellingPlanFixedPricingPolicyInput + + """ + Recurring pricing policy details. + """ + recurring: SellingPlanRecurringPricingPolicyInput +} + +""" +The percentage value of a selling plan pricing policy percentage type. +""" +type SellingPlanPricingPolicyPercentageValue @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The percentage value. + """ + percentage: Float! +} + +""" +The input fields required to create or update a pricing policy adjustment value. +""" +input SellingPlanPricingPolicyValueInput @componentName(name: "merchandising") { + """ + The fixed value for an fixed amount off or a new policy price. + """ + fixedValue: Decimal + + """ + The percentage value. + """ + percentage: Float +} + +""" +Represents a recurring selling plan billing policy. +""" +type SellingPlanRecurringBillingPolicy @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Specific anchor dates upon which the billing interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] + + """ + 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 +} + +""" +Represents a recurring selling plan delivery policy. +""" +type SellingPlanRecurringDeliveryPolicy @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 delivery frequency, it can be either: day, week, month or year. + """ + interval: SellingPlanInterval + + """ + The number of intervals between deliveries. + """ + intervalCount: Int + + """ + The pre-anchor behavior. It can be either: asap or next. + """ + preAnchorBehavior: SellingPlanRecurringDeliveryPolicyPreAnchorBehavior +} + +""" +Whether the delivery policy is merchant or buyer-centric. +""" +enum SellingPlanRecurringDeliveryPolicyIntent @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + 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! + + """ + ID of the pricing policy. + """ + id: ID @gidTypes(types: ["SellingPlanRecurringPricingPolicy"]) +} + +""" +When to capture the payment for the remaining amount due. +""" +enum SellingPlanRemainingBalanceChargeTrigger @componentName(name: "merchandising") { + """ + At an exact time defined by the remaining_balance_charge_exact_time field. + """ + EXACT_TIME + + """ + When there's no remaining balance to be charged after checkout. + """ + NO_REMAINING_BALANCE + + """ + When the order is fulfilled. + """ + ON_FULFILLMENT + + """ + After the duration defined by the remaining_balance_charge_time_after_checkout field. + """ + TIME_AFTER_CHECKOUT +} + +""" +When to reserve inventory for a selling plan. +""" +enum SellingPlanReserve @componentName(name: "merchandising") { + """ + 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 @requiredAccess(scope: "`read_pixels` access scope. Also: The app must have the read_server_pixels access scope.") @componentName(name: "merchant_marketing") { + """ + The current data sharing state of the pixel. + """ + dataSharingState: PixelDataSharingState! + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "merchant_marketing") { + """ + This server pixel is connected: it will stream customer events to the endpoint if it is configured properly. + """ + CONNECTED + + """ + 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 + + """ + 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 +} + +""" +The set of valid sort keys for the ShipmentLineItem query. +""" +enum ShipmentLineItemSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "pricing") { + """ + 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 @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + 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 @protectedField(subject: "customer", content: "phone") + + """ + Returns the price of the shipping line. + """ + price: Money! @deprecated(reason: "Use `originalPriceSet` instead.") + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "sales") { + """ + 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 @componentName(name: "draft_orders") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Type of a shipping package. +""" +enum ShippingPackageType @componentName(name: "delivery") { + """ + A shipping box. + """ + BOX + + """ + An envelope. + """ + ENVELOPE + + """ + A flat rate packaging supplied by a carrier. + """ + FLAT_RATE + + """ + A soft-pack, bubble-wrap or vinyl envelope. + """ + SOFT_PACK +} + +""" +Return type for `shippingPackageUpdate` mutation. +""" +type ShippingPackageUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "Any of `draft_orders`, `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { + """ + 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 @componentName(name: "returns") { + """ + 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 @componentName(name: "shop_identity") { + """ + 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.") + + """ + Whether the shop is eligible for app trials offered by third-party apps. + """ + appTrialEligible: Boolean! + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The assigment status of the fulfillment orders that should be returned. + If `assignmentStatus` argument is not provided, then + the query will return all assigned fulfillment orders, + except those that have the `CLOSED` status. + """ + assignmentStatus: FulfillmentOrderAssignmentStatus + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Returns fulfillment orders only for certain locations, specified by a list of location IDs. + """ + locationIds: [ID!] @gidTypes(types: ["Location"]) + + """ + 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") @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope.") + + """ + The list of sales channels not currently installed on the shop. + """ + availableChannelApps( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | collection_type | string | | - `custom`
- `smart` | + | handle | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | product_id | id | Filter by collections containing a product by its ID. | + | 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` | + | 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` | + | published_at | time | Filter by the date and time when the collection was published to the Online Store. | + | 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` | + | title | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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! @requiredAccess(scope: "`read_customers` access scope.") + + """ + Customer accounts associated to the shop. + """ + customers( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | accepts_marketing | boolean | Filter by whether a customer has consented + to receive marketing material. | | | - `accepts_marketing:true` | + | 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` | + | 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'` | + | 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:*` | + | first_name | string | Filter by the customer's first name. | | | - `first_name:Jane` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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'` | + | last_name | string | Filter by the customer's last name. | | | - `last_name:Reeves` | + | 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'` | + | orders_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` | + | 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:*` | + | 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` | + | 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'` | + | 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'` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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.") + + """ + The domains configured for the shop. + """ + domainsPaginated( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | host | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): DomainConnection! + + """ + 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! @requiredAccess(scope: "`read_draft_orders` access scope.") + + """ + The shop owner's email address. + Shopify will use this email address to communicate with the shop owner. + """ + email: String! + + """ + The configuration for the shop email sender. + """ + emailSenderConfiguration: EmailSenderConfiguration! + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Whether to include closed fulfillment orders. + """ + includeClosed: Boolean = false + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | assigned_location_id | id | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | status | string | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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.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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | created_at | time | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | updated_at | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Whether to include the locations that are deactivated. + """ + includeInactive: Boolean = false + + """ + Whether to include the legacy locations of fulfillment services. + """ + includeLegacy: Boolean = false + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | active | string | + | address1 | string | + | address2 | string | + | city | string | + | country | string | + | created_at | time | + | geolocated | boolean | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | legacy | boolean | + | location_id | id | + | name | string | + | pickup_in_store | string | | - `enabled`
- `disabled` | + | province | string | + | zip | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): LocationConnection! @deprecated(reason: "Use `QueryRoot.locations` instead.") + + """ + Whether SMS marketing has been enabled on the shop's checkout configuration settings. + """ + marketingSmsConsentEnabledAtCheckout: Boolean! + + """ + Merchant signals for apps. + """ + merchantAppSignals: MerchantAppSignals + + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + 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! @requiredAccess(scope: "`read_orders` access scope.") + + """ + A list of the shop's orders. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) + (`ChannelInformation.channelDefinition.handle`) field. | | | - + `channel:web`
- `channel:web,pos` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | 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` | + | 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"` | + | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) + field. | | | - `name:1001-A` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) + of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). + | - `has_issues`
- `no_issues`
- `not_validated` | | - + `shipping_address_validation_result_summary:no_issues` | + | 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` | + | 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` | + | 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` | + | status | string | Filter by the order's status to manage workflows or + analyze the order lifecycle. | - `open`
- `closed`
- + `cancelled`
- `not_closed` | | - `status:open` | + | 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` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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! @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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + Crops the image according to the specified region. + """ + crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Image height in pixels between 1 and 2048. + """ + maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") + + """ + Image width in pixels between 1 and 2048. + """ + maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead.") + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + 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.") + + """ + 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.") @requiredAccess(scope: "`read_products` access scope.") + + """ + 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.") @requiredAccess(scope: "`read_products` access scope.") + + """ + List of the shop's product variants. + """ + productVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-123` | + | 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` | + | 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` | + | exclude_composite | boolean | Filter by product variants that aren't composites. | | | - `exclude_composite:true` | + | 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` | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_quantity | integer | Filter by an aggregate of inventory across + all locations where the product variant is stocked. | | | - + `inventory_quantity:10` | + | 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` | + | managed | boolean | Filter by whether there is fulfillment service + tracking associated with the product variants. | | | - `managed:true` | + | managed_by | string | Filter by the fulfillment service that tracks the + number of items in stock for the product variant. | | | - + `managed_by:shopify` | + | option1 | string | Filter by a custom property that a shop owner uses to + define product variants. | | | - `option1:small` | + | option2 | string | Filter by a custom property that a shop owner uses to + define product variants. | | | - `option2:medium` | + | option3 | string | Filter by a custom property that a shop owner uses to + define product variants. | | | - `option3:large` | + | product_id | id | Filter by the product [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-id) + field. | | | - `product_id:8474977763649` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | taxable | boolean | Filter by the product variant [`taxable`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-taxable) + field. | | | - `taxable:false` | + | title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) + field. | | | - `title:ice` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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.") @requiredAccess(scope: "`read_products` access scope.") + + """ + List of the shop's products. + """ + products( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) + field. | | | - `barcode:ABC-abc-1234` | + | 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` | + | 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` | + | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) + field. | | | - `collection_id:108179161409` | + | 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` | + | 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'` | + | 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` | + | error_feedback | string | Filter by products with publishing errors. | + | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) + field. | | | - `gift_card:true` | + | 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` | + | has_only_composites | boolean | Filter by products that have only + composite variants. | | | - `has_only_composites:true` | + | 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` | + | has_variant_with_components | boolean | Filter by products that have + variants with associated components. | | | - + `has_variant_with_components:true` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | inventory_total | integer | Filter by inventory count. | | | - + `inventory_total:0`
- `inventory_total:>150`
- + `inventory_total:>=200` | + | 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` | + | 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"` | + | out_of_stock_somewhere | boolean | Filter by products that are out of + stock in at least one location. | | | - `out_of_stock_somewhere:true` | + | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) + field. | | | - `price:100.57` | + | 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` | + | 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` | + | product_type | string | Filter by a comma-separated list of [product + types](https://help.shopify.com/manual/products/details/product-type). | | | + - `product_type:snowboard` | + | publication_ids | string | Filter by a comma-separated list of publication + IDs that are associated with the product. | | | - + `publication_ids:184111530305,184111694145` | + | 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` | + | 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` | + | 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` | + | 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` | + | 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` | `active` | - + `status:active,draft` | + | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | + | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | + | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) + field. | | | - `title:The Minimal Snowboard` | + | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) + enabled. | | | - `tracks_inventory:true` | + | 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'` | + | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) + field. | | | - `variant_id:45779434701121` | + | 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'` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int! + + """ + The search query to filter by. + """ + query: String! + + """ + The search result types to filter by. + """ + types: [SearchResultType!] + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 @gidTypes(types: ["Market"]) + ): [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 @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "billing") { + """ + 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 @componentName(name: "shop_identity") { + """ + Shop has Rogers branding. + """ + ROGERS + + """ + Shop has Shopify branding. + """ + SHOPIFY + + """ + Shop has Shopify Gold branding. + """ + SHOPIFY_GOLD + + """ + Shop has Shopify Plus branding. + """ + SHOPIFY_PLUS +} + +""" +Represents the shop's customer account requirement preference. +""" +enum ShopCustomerAccountsSetting @componentName(name: "shop_identity") { + DISABLED + OPTIONAL + REQUIRED +} + +""" +The name of a Shop app feature for a given shop. +""" +enum ShopFeatureName @componentName(name: "shop_identity") { + """ + The lead capture feature. + """ + LEAD_CAPTURE +} + +""" +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 @componentName(name: "shop_identity") { + """ + 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 the shop and app can use the Login With Shop feature. + """ + eligibleForLoginWithShop: Boolean! + + """ + Whether the shop is eligible for the given shop app feature. + """ + eligibleForShopFeature( + """ + The name of the shop app feature to check eligibility for. + """ + feature: ShopFeatureName! + ): 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 Sub Country Markets. + """ + subCountryMarketsEnabled: 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 @requiredAccess(scope: "`read_locales` access scope or `read_markets_home` access scope.") @componentName(name: "markets") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "apps") { + """ + 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!] @gidTypes(types: ["WebPresence"]) + + """ + Whether the locale is published. Only published locales are visible to the buyer. + """ + published: Boolean +} + +""" +Return type for `shopLocaleUpdate` mutation. +""" +type ShopLocaleUpdatePayload @componentName(name: "platform") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { + """ + The name of payment method used by the buyer. + """ + paymentMethodName: String +} + +""" +Represents a Shop Pay payment request. +""" +type ShopPayPaymentRequest @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The delivery method type is pickup. + """ + PICKUP + + """ + The delivery method type is shipping. + """ + SHIPPING +} + +""" +Represents a discount for a Shop Pay payment request. +""" +type ShopPayPaymentRequestDiscount @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + The amount is too small. + """ + AMOUNT_TOO_SMALL + + """ + Call the card issuer. + """ + CALL_ISSUER + + """ + The card was declined. + """ + CARD_DECLINED + + """ + There is an error in the gateway or merchant configuration. + """ + CONFIG_ERROR + + """ + Too many failed CVV verification attempts. + """ + CVV_ATTEMPTS_EXCEEDED + + """ + The card is expired. + """ + EXPIRED_CARD + + """ + The card issuer has flagged the transaction as potentially fraudulent. + """ + FRAUD_SUSPECTED + + """ + There was an unknown error with processing the payment. + """ + GENERIC_ERROR + + """ + The address does not match the card number. + """ + INCORRECT_ADDRESS + + """ + The CVC does not match the card number. + """ + INCORRECT_CVC + + """ + The card number is incorrect. + """ + INCORRECT_NUMBER + + """ + The entered PIN is incorrect. + """ + INCORRECT_PIN + + """ + The ZIP or postal code does not match the card number. + """ + INCORRECT_ZIP + + """ + The amount is either too high or too low for the provider. + """ + INVALID_AMOUNT + + """ + The payment method is not available in the customer's country. + """ + INVALID_COUNTRY + + """ + The format of the CVC is incorrect. + """ + INVALID_CVC + + """ + The format of the expiry date is incorrect. + """ + INVALID_EXPIRY_DATE + + """ + The format of the card number is incorrect. + """ + INVALID_NUMBER + + """ + The payment method is momentarily unavailable. + """ + PAYMENT_METHOD_UNAVAILABLE + + """ + 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 was an error while processing the payment. + """ + PROCESSING_ERROR + + """ + A real card was used but the gateway was in test mode. + """ + TEST_MODE_LIVE_CARD + + """ + The 3D Secure check failed. + """ + THREE_D_SECURE_FAILED + + """ + The gateway or merchant configuration doesn't support a feature, such as network tokenization. + """ + UNSUPPORTED_FEATURE +} + +""" +The state of the payment request receipt. +""" +enum ShopPayPaymentRequestReceiptProcessingStatusState @componentName(name: "checkouts") { + """ + The payment request requires action from the buyer. + """ + ACTION_REQUIRED + + """ + The payment request processing completed successfully. + """ + COMPLETED + + """ + The payment request processing failed. + """ + FAILED + + """ + The payment request currently being processed. + """ + PROCESSING + + """ + The payment request is ready and queued to be processed. + """ + READY +} + +""" +The set of valid sort keys for the ShopPayPaymentRequestReceipts query. +""" +enum ShopPayPaymentRequestReceiptsSortKeys @componentName(name: "platform") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "checkouts") { + """ + 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 @componentName(name: "shop_identity") { + """ + 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 @requiredAccess(scope: "`read_legal_policies` access scope.") @componentName(name: "shop_identity") { + """ + 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: DateTime! + + """ + 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 @gidTypes(types: ["Market"]) + ): [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: DateTime! + + """ + The public URL of the policy. + """ + url: URL! +} + +""" +Possible error codes that can be returned by `ShopPolicyUserError`. +""" +enum ShopPolicyErrorCode @componentName(name: "platform") { + """ + The input value is too big. + """ + TOO_BIG +} + +""" +The input fields required to update a policy. +""" +input ShopPolicyInput @componentName(name: "shop_identity") { + """ + Policy text, maximum size of 512kb. + """ + body: String! + + """ + The shop policy type. + """ + type: ShopPolicyType! +} + +""" +Available shop policy types. +""" +enum ShopPolicyType @componentName(name: "shop_identity") { + """ + The contact information. + """ + CONTACT_INFORMATION + + """ + The legal notice. + """ + LEGAL_NOTICE + + """ + The privacy policy. + """ + PRIVACY_POLICY + + """ + The refund policy. + """ + REFUND_POLICY + + """ + The shipping policy. + """ + SHIPPING_POLICY + + """ + The cancellation policy. + """ + SUBSCRIPTION_POLICY + + """ + The terms of sale. + """ + TERMS_OF_SALE + + """ + The terms of service. + """ + TERMS_OF_SERVICE +} + +""" +Return type for `shopPolicyUpdate` mutation. +""" +type ShopPolicyUpdatePayload @componentName(name: "platform") { + """ + 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 @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + The feedback date cannot be set in the future. + """ + FEEDBACK_DATE_IN_FUTURE + + """ + The input value is invalid. + """ + INVALID + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + The feedback for a later version of the resource was already accepted. + """ + OUTDATED_FEEDBACK + + """ + The input value needs to be blank. + """ + PRESENT +} + +""" +Resource limits of a shop. +""" +type ShopResourceLimits @componentName(name: "shop_identity") { + """ + 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 @componentName(name: "shop_identity") { + """ + Alphabetical sort. + """ + ALPHABETICAL + + """ + Popularity sort. + """ + POPULAR +} + +""" +Return type for `shopUserAccessTokenCreate` mutation. +""" +type ShopUserAccessTokenCreatePayload @componentName(name: "platform") { + """ + An access token for the Shop Users API for a specific Shop user. + """ + accessToken: String + + """ + The number of seconds until the access token expires. + """ + expiresIn: Int + + """ + A refresh token to request a new access token directly from the Shop token endpoint once the access token expires. + """ + refreshToken: String + + """ + The type of token. + """ + tokenType: String + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +A Shopify Function. +""" +type ShopifyFunction @componentName(name: "apps") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "apps") { + """ + 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 @accessRestricted(reason: "Requires the `read_shopify_payments` or `read_shopify_payments_accounts` approval scope.") @requiredAccess(scope: "the `read_shopify_payments` or the `read_shopify_payments_accounts` access scope.") @componentName(name: "shopify_payments") { + """ + The name of the account opener. + """ + accountOpenerName: String @requiredAccess(scope: "`read_shopify_payments_accounts_sensitive` access scope.") + + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + Determines if returned transactions contain transaction type transfer. + """ + hideTransfers: Boolean = false + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | available_on | time | + | credit_card_last4 | string | + | currency | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | payment_method_name | string | + | payments_transfer_id | id | + | payout_date | time | + | payout_status | string | + | processed_at | time | + | tax_reporting_exempt | boolean | + | transaction_type | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + ): ShopifyPaymentsBalanceTransactionConnection! + + """ + All bank accounts configured for the Shopify Payments account. + """ + bankAccounts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | initiated_at | time | + | status | string | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | amount | float | + | bank_account | string | + | currency | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | issued_at | time | + | ledger_type | string | + | status | string | + | transaction_dates | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + + """ + Filter the direction of the payout. + """ + transactionType: ShopifyPaymentsPayoutTransactionType + ): ShopifyPaymentsPayoutConnection! +} + +""" +A Shopify Payments address. +""" +type ShopifyPaymentsAddressBasic @requiredAccess(scope: "`read_shopify_payments_legal_entities` access scope or `read_financial_kyc_information` access scope. Also: The app must have the Shopify Payments Legal Entities or Financial KYC Information permission.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { + """ + The metadata for the adjustment that's associated with the transaction. + If the source_type isn't an adjustment, the value will be null. + """ + adjustmentMetadata: JSON + + """ + 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 user-friendly display name for the transaction type. + This matches the Type column in the transaction CSV export + from Finance > Transactions in the Shopify Admin. + """ + displayType: String! + + """ + 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "shopify_payments") { + """ + 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 @componentName(name: "shopify_payments") { + """ + The transaction requires action before it can be paid out. + """ + ACTION_REQUIRED + + """ + The payout has been canceled by Shopify. + """ + CANCELED + + """ + The payout has been declined by the bank. + """ + FAILED + + """ + 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 transaction has not been assigned a payout yet. + """ + PENDING + + """ + The payout has been created and had transactions assigned to it, but + it has not yet been submitted to the bank. + """ + SCHEDULED +} + +""" +A bank account that can receive payouts. +""" +type ShopifyPaymentsBankAccount implements Node @requiredAccess(scope: "`read_shopify_payments_bank_accounts` access scope.") @componentName(name: "shopify_payments") { + """ + 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( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | amount | float | + | bank_account | string | + | currency | string | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | issued_at | time | + | ledger_type | string | + | status | string | + | transaction_dates | time | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). + The search’s query string is used as the query argument. + """ + savedSearchId: ID @gidTypes(types: ["SavedSearch"]) + + """ + 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 + + """ + Filter the direction of the payout. + """ + transactionType: ShopifyPaymentsPayoutTransactionType + ): ShopifyPaymentsPayoutConnection! + + """ + The status of the bank account. + """ + status: ShopifyPaymentsBankAccountStatus! +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsBankAccounts. +""" +type ShopifyPaymentsBankAccountConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "shopify_payments") { + """ + 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 @componentName(name: "shopify_payments") { + """ + A payout to the bank account failed. + """ + ERRORED + + """ + 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 +} + +""" +The business type of a Shopify Payments account. +""" +enum ShopifyPaymentsBusinessType @componentName(name: "shopify_payments") { + """ + The business type is a corporation. + """ + CORPORATION + + """ + 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 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 (registered charity). + """ + NON_PROFIT_REGISTERED_CHARITY + + """ + 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 not set. This is usually because onboarding is incomplete. + """ + NOT_SET + + """ + The business type is a partnership. + """ + PARTNERSHIP + + """ + The business type is a private corporation. + """ + PRIVATE_CORPORATION + + """ + The business type is a private multi member LLC. + """ + PRIVATE_MULTI_MEMBER_LLC + + """ + The business type is a private partnership. + """ + PRIVATE_PARTNERSHIP + + """ + 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 public company. + """ + PUBLIC_COMPANY + + """ + The business type is a public corporation. + """ + PUBLIC_CORPORATION + + """ + The business type is a public partnership. + """ + PUBLIC_PARTNERSHIP + + """ + The business type is a sole establishment. + """ + SOLE_ESTABLISHMENT + + """ + The business type is a sole proprietorship. + """ + SOLE_PROP + + """ + The business type is an unincorporated partnership. + """ + UNINCORPORATED_PARTNERSHIP +} + +""" +The charge descriptors for a payments account. +""" +interface ShopifyPaymentsChargeStatementDescriptor @requiredAccess(scope: "`read_shopify_payments` access scope.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "`read_shopify_payments` access scope.") @componentName(name: "shopify_payments") { + """ + The default charge statement descriptor. + """ + default: String + + """ + The prefix of the statement descriptor. + """ + prefix: String! +} + +""" +A destination or bank account that can receive payouts. +""" +type ShopifyPaymentsDestinationAccount @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { + """ + The name of the bank. + """ + bankName: String + + """ + The currency of the bank account. + """ + currency: CurrencyCode + + """ + The last digits of the account number (the rest is redacted). + """ + lastDigits: String +} + +""" +A dispute occurs when a buyer questions the legitimacy of a charge with their financial institution. +""" +type ShopifyPaymentsDispute implements LegacyInteroperability & Node @requiredAccess(scope: "User must have `read_shopify_payments_disputes` access.") @componentName(name: "shopify_payments") @protectedObject(subject: "customer") { + """ + The total amount disputed by the cardholder. + """ + amount: MoneyV2! + + """ + The evidence associated with the dispute. + """ + disputeEvidence: ShopifyPaymentsDisputeEvidence! + + """ + The deadline for evidence submission. + """ + evidenceDueBy: DateTime + + """ + The date when evidence was sent. Returns null if evidence hasn't yet been sent. + """ + evidenceSentOn: DateTime + + """ + The date when this dispute was resolved. Returns null if the dispute isn't yet resolved. + """ + finalizedOn: DateTime + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "`read_shopify_payments_dispute_evidences` access scope.") @componentName(name: "shopify_payments") @protectedObject(subject: "customer") { + """ + 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 @protectedField(subject: "customer", content: "email") + + """ + The customer's first name. + """ + customerFirstName: String @protectedField(subject: "customer", content: "name") + + """ + The customer's last name. + """ + customerLastName: String @protectedField(subject: "customer", content: "name") + + """ + 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 @componentName(name: "shopify_payments") { + """ + Cancellation Policy File. + """ + CANCELLATION_POLICY_FILE + + """ + Customer Communication File. + """ + CUSTOMER_COMMUNICATION_FILE + + """ + Refund Policy File. + """ + REFUND_POLICY_FILE + + """ + Response Summary File. + """ + RESPONSE_SUMMARY_FILE + + """ + Service Documentation File. + """ + SERVICE_DOCUMENTATION_FILE + + """ + Shipping Documentation File. + """ + SHIPPING_DOCUMENTATION_FILE + + """ + Uncategorized File. + """ + UNCATEGORIZED_FILE +} + +""" +The input fields required to update a dispute evidence object. +""" +input ShopifyPaymentsDisputeEvidenceUpdateInput @componentName(name: "shopify_payments") { + """ + Activity logs. + """ + accessActivityLog: String + + """ + Cancellation policy disclosure. + """ + cancellationPolicyDisclosure: String + + """ + Cancellation policy file. + """ + cancellationPolicyFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Cancellation rebuttal. + """ + cancellationRebuttal: String + + """ + Customer communication file. + """ + customerCommunicationFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Customer email address. + """ + customerEmailAddress: String + + """ + Customer first name. + """ + customerFirstName: String + + """ + Customer last name. + """ + customerLastName: String + + """ + Refund policy disclosure. + """ + refundPolicyDisclosure: String + + """ + Refund policy file. + """ + refundPolicyFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Refund refusal explanation. + """ + refundRefusalExplanation: String + + """ + Service documentation file. + """ + serviceDocumentationFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + The shipping address associated with the dispute evidence. + """ + shippingAddress: MailingAddressInput + + """ + Shipping documentation file. + """ + shippingDocumentationFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Whether to submit the evidence. + """ + submitEvidence: Boolean = false + + """ + Uncategorized file. + """ + uncategorizedFile: ShopifyPaymentsDisputeFileUploadUpdateInput + + """ + Uncategorized text. + """ + uncategorizedText: String +} + +""" +The file upload associated with the dispute evidence. +""" +type ShopifyPaymentsDisputeFileUpload implements Node @requiredAccess(scope: "`read_shopify_payments_dispute_evidences` access scope.") @componentName(name: "shopify_payments") @protectedObject(subject: "customer") { + """ + 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 @componentName(name: "shopify_payments") { + """ + Whether to delete this file upload. + """ + destroy: Boolean = false + + """ + The ID of the file upload to be updated. + """ + id: ID! @gidTypes(types: ["DisputeFileUpload"]) +} + +""" +The fulfillment associated with dispute evidence. +""" +type ShopifyPaymentsDisputeFulfillment implements Node @requiredAccess(scope: "`read_shopify_payments_dispute_evidences` access scope.") @componentName(name: "shopify_payments") { + """ + 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 @componentName(name: "shopify_payments") { + """ + The customer's bank can't process the charge. + """ + BANK_CANNOT_PROCESS + + """ + 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 initiated the dispute. Contact the customer for additional details on why the payment was disputed. + """ + CUSTOMER_INITIATED + + """ + The customer's bank can't proceed with the debit since it hasn't been authorized. + """ + DEBIT_NOT_AUTHORIZED + + """ + The customer claims they were charged multiple times for the same product or service. + """ + DUPLICATE + + """ + 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 account associated with the purchase is incorrect. + """ + INCORRECT_ACCOUNT_DETAILS + + """ + The customer's bank account has insufficient funds. + """ + INSUFFICIENT_FUNDS + + """ + 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 + + """ + The customer claims they did not receive the products or services purchased. + """ + PRODUCT_NOT_RECEIVED + + """ + The product or service was received but was defective, damaged, or not as described. + """ + PRODUCT_UNACCEPTABLE + + """ + The customer claims that you continued to charge them after a subscription was canceled. + """ + SUBSCRIPTION_CANCELLED + + """ + The customer doesn’t recognize the payment appearing on their card statement. + """ + UNRECOGNIZED +} + +""" +Details regarding a dispute reason. +""" +type ShopifyPaymentsDisputeReasonDetails @requiredAccess(scope: "User must have `read_shopify_payments_disputes` access.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") { + """ + 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 @requiredAccess(scope: "`read_shopify_payments` access scope.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "`read_shopify_payments` access scope or `read_financial_kyc_information` access scope. Also: The app must have the Shopify Payments or Financial KYC Information permission.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { + """ + The bank account for the payout. + """ + bankAccount: ShopifyPaymentsBankAccount @deprecated(reason: "Use `destinationAccount` instead.") + + """ + The business entity associated with the payout. + """ + businessEntity: BusinessEntity! + + """ + The destination account for the payout. + """ + destinationAccount: ShopifyPaymentsDestinationAccount + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "platform") { + """ + Failed to create payout, there is no eligible balance in this currency. + """ + ALTERNATE_CURRENCY_PAYOUT_FAILED_NO_ELIGIBLE_BALANCE + + """ + Failed to create payout due to an error from Stripe. + """ + ALTERNATE_CURRENCY_PAYOUT_FAILED_STRIPE_ERROR + + """ + No Stripe provider account was found. + """ + MISSING_PROVIDER_ACCOUNT + + """ + Failed to create payout due to an error from Shopify Core. + """ + UNKNOWN_CORE_ERROR +} + +""" +An auto-generated type for paginating through multiple ShopifyPaymentsPayouts. +""" +type ShopifyPaymentsPayoutConnection @componentName(name: "platform") { + """ + 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 @componentName(name: "shopify_payments") { + """ + 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 @componentName(name: "shopify_payments") { + """ + Each business day. + """ + DAILY + + """ + Payouts will not be automatically made. + """ + MANUAL + + """ + Each month, on the day of month specified by monthlyAnchor. + """ + MONTHLY + + """ + Each week, on the day of week specified by weeklyAnchor. + """ + WEEKLY +} + +""" +The payment schedule for a payments account. +""" +type ShopifyPaymentsPayoutSchedule @requiredAccess(scope: "`read_shopify_payments` access scope, `read_shopify_payments_accounts` access scope or `read_shopify_payments_payouts` access scope. Also: The user must have access to `shopify_payments`, `shopify_payments_accounts`, or `shopify_payments_payouts` scopes or the `shopify_payments_transfers`\/`view_payouts` user permission.") @componentName(name: "shopify_payments") { + """ + 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 @componentName(name: "shopify_payments") { + """ + The payout has been canceled by Shopify. + """ + CANCELED + + """ + The payout has been declined by the bank. + """ + FAILED + + """ + 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 created and had transactions assigned to it, but + it has not yet been submitted to the bank. + """ + SCHEDULED +} + +""" +Breakdown of the total fees and gross of each of the different types of transactions associated +with the payout. +""" +type ShopifyPaymentsPayoutSummary @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { + """ + 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 amount for all lending capital remittance balance adjustments. + """ + capitalRemittanceAmount: MoneyV2! + + """ + Total fees for all charges. + """ + chargesFee: MoneyV2! + + """ + Total gross amount for all charges. + """ + chargesGross: MoneyV2! + + """ + Total amount for all lending credit remittance balance adjustments. + """ + creditRemittanceAmount: MoneyV2! + + """ + Sum amount for all marketplace tax balance adjustments regardless of their type. + """ + marketplaceTaxAdjustmentAmount: MoneyV2! + + """ + Total amount for all marketplace tax credit balance adjustments. + """ + marketplaceTaxCreditAdjustmentAmount: MoneyV2! + + """ + Total amount for all marketplace tax debit balance adjustments. + """ + marketplaceTaxDebitAdjustmentAmount: 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 @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { + """ + The acquirer reference number (ARN) code generated for Visa/Mastercard transactions. + """ + acquirerReferenceNumber: String +} + +""" +The possible source types for a balance transaction. +""" +enum ShopifyPaymentsSourceType @componentName(name: "shopify_payments") { + """ + The adjustment source type. + """ + ADJUSTMENT + + """ + The adjustment_reversal source type. + """ + ADJUSTMENT_REVERSAL + + """ + The charge source type. + """ + CHARGE + + """ + The dispute source type. + """ + DISPUTE + + """ + The refund source type. + """ + REFUND + + """ + The system_adjustment source type. + """ + SYSTEM_ADJUSTMENT + + """ + The transfer source type. + """ + TRANSFER +} + +""" +A typed identifier that represents an individual within a tax jurisdiction. +""" +type ShopifyPaymentsTaxIdentification @requiredAccess(scope: "`read_capital` access scope, `read_financial_kyc_information` access scope or `read_shopify_payments_legal_entities` access scope. Also: The app must have the Capital or Financial KYC Information or Shopify Payments Legal Entities permission.") @componentName(name: "shopify_payments") { + """ + The type of the identification. + """ + taxIdentificationType: ShopifyPaymentsTaxIdentificationType! + + """ + The value of the identification. + """ + value: String! +} + +""" +The type of tax identification field. +""" +enum ShopifyPaymentsTaxIdentificationType @componentName(name: "shopify_payments") { + """ + Business EIN. + """ + EIN + + """ + Full SSN. + """ + FULL_SSN + + """ + The last 4 digits of the SSN. + """ + SSN_LAST4_DIGITS +} + +""" +Relevant reference information for an alternate currency payout. +""" +type ShopifyPaymentsToolingProviderPayout @requiredAccess(scope: "`read_shopify_payments_tooling` access scope.") @componentName(name: "shopify_payments") { + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") { + """ + 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 @componentName(name: "shopify_payments") { + """ + 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 adjustment transaction type. + """ + ADJUSTMENT + + """ + The ads_publisher_credit transaction type. + """ + ADS_PUBLISHER_CREDIT + + """ + The ads_publisher_credit_reversal transaction type. + """ + ADS_PUBLISHER_CREDIT_REVERSAL + + """ + The advance transaction type. + """ + ADVANCE + + """ + The advance funding transaction type. + """ + ADVANCE_FUNDING + + """ + 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 application_fee_refund transaction type. + """ + APPLICATION_FEE_REFUND + + """ + The balance_transfer_inbound transaction type. + """ + BALANCE_TRANSFER_INBOUND + + """ + The balance_transfer_outbound transaction type. + """ + BALANCE_TRANSFER_OUTBOUND + + """ + The billing_debit transaction type. + """ + BILLING_DEBIT + + """ + The billing_debit_reversal transaction type. + """ + BILLING_DEBIT_REVERSAL + + """ + The channel_credit transaction type. + """ + CHANNEL_CREDIT + + """ + The channel_credit_reversal transaction type. + """ + CHANNEL_CREDIT_REVERSAL + + """ + The channel_promotion_credit transaction type. + """ + CHANNEL_PROMOTION_CREDIT + + """ + The channel_promotion_credit_reversal transaction type. + """ + CHANNEL_PROMOTION_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 charge transaction type. + """ + CHARGE + + """ + The chargeback_fee transaction type. + """ + CHARGEBACK_FEE + + """ + The chargeback_fee_refund transaction type. + """ + CHARGEBACK_FEE_REFUND + + """ + The chargeback_hold transaction type. + """ + CHARGEBACK_HOLD + + """ + The chargeback_hold_release transaction type. + """ + CHARGEBACK_HOLD_RELEASE + + """ + 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 charge_adjustment transaction type. + """ + CHARGE_ADJUSTMENT + + """ + The collections_credit transaction type. + """ + COLLECTIONS_CREDIT + + """ + The collections_credit_reversal transaction type. + """ + COLLECTIONS_CREDIT_REVERSAL + + """ + The customs_duty transaction type. + """ + CUSTOMS_DUTY + + """ + The customs_duty_adjustment transaction type. + """ + CUSTOMS_DUTY_ADJUSTMENT + + """ + The dispute_reversal transaction type. + """ + DISPUTE_REVERSAL + + """ + The dispute_withdrawal transaction type. + """ + DISPUTE_WITHDRAWAL + + """ + The import_tax transaction type. + """ + IMPORT_TAX + + """ + The import_tax_adjustment transaction type. + """ + IMPORT_TAX_ADJUSTMENT + + """ + The tax refund transaction type. + """ + IMPORT_TAX_REFUND + + """ + The installments_balance_recovery_credit transaction type. + """ + INSTALLMENTS_BALANCE_RECOVERY_CREDIT + + """ + The installments_balance_recovery_credit_reversal transaction type. + """ + INSTALLMENTS_BALANCE_RECOVERY_CREDIT_REVERSAL + + """ + The installments_balance_recovery_debit transaction type. + """ + INSTALLMENTS_BALANCE_RECOVERY_DEBIT + + """ + The installments_balance_recovery_debit_reversal transaction type. + """ + INSTALLMENTS_BALANCE_RECOVERY_DEBIT_REVERSAL + + """ + The lending_capital_refund transaction type. + """ + LENDING_CAPITAL_REFUND + + """ + The lending_capital_refund_reversal transaction type. + """ + LENDING_CAPITAL_REFUND_REVERSAL + + """ + The lending_capital_remittance transaction type. + """ + LENDING_CAPITAL_REMITTANCE + + """ + The lending_capital_remittance_reversal transaction type. + """ + LENDING_CAPITAL_REMITTANCE_REVERSAL + + """ + The lending_credit transaction type. + """ + LENDING_CREDIT + + """ + The lending_credit_refund transaction type. + """ + LENDING_CREDIT_REFUND + + """ + The lending_credit_refund_reversal transaction type. + """ + LENDING_CREDIT_REFUND_REVERSAL + + """ + The lending_credit_remittance transaction type. + """ + LENDING_CREDIT_REMITTANCE + + """ + The lending_credit_remittance_reversal transaction type. + """ + LENDING_CREDIT_REMITTANCE_REVERSAL + + """ + The lending_credit_reversal transaction type. + """ + LENDING_CREDIT_REVERSAL + + """ + The lending_debit transaction type. + """ + LENDING_DEBIT + + """ + The lending_debit_reversal transaction type. + """ + LENDING_DEBIT_REVERSAL + + """ + The managed_markets_b2b_domestic_taxes_adjustment_credit transaction type. + """ + MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_CREDIT + + """ + The managed_markets_b2b_domestic_taxes_adjustment_credit_reversal transaction type. + """ + MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_CREDIT_REVERSAL + + """ + The managed_markets_b2b_domestic_taxes_adjustment_debit transaction type. + """ + MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_DEBIT + + """ + The managed_markets_b2b_domestic_taxes_adjustment_debit_reversal transaction type. + """ + MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_DEBIT_REVERSAL + + """ + The managed_markets_b2b_domestic_taxes_adjustment_platform_credit transaction type. + """ + MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_PLATFORM_CREDIT + + """ + The managed_markets_b2b_domestic_taxes_adjustment_platform_credit_reversal transaction type. + """ + MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_PLATFORM_CREDIT_REVERSAL + + """ + The managed_markets_b2b_domestic_taxes_adjustment_platform_debit transaction type. + """ + MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_PLATFORM_DEBIT + + """ + The managed_markets_b2b_domestic_taxes_adjustment_platform_debit_reversal transaction type. + """ + MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_PLATFORM_DEBIT_REVERSAL + + """ + The managed_markets_charge_credit transaction type. + """ + MANAGED_MARKETS_CHARGE_CREDIT + + """ + The managed_markets_charge_credit_reversal transaction type. + """ + MANAGED_MARKETS_CHARGE_CREDIT_REVERSAL + + """ + The managed_markets_disputed_amount_debit transaction type. + """ + MANAGED_MARKETS_DISPUTED_AMOUNT_DEBIT + + """ + The managed_markets_disputed_amount_debit_reversal transaction type. + """ + MANAGED_MARKETS_DISPUTED_AMOUNT_DEBIT_REVERSAL + + """ + The managed_markets_dispute_fee_credit transaction type. + """ + MANAGED_MARKETS_DISPUTE_FEE_CREDIT + + """ + The managed_markets_dispute_fee_credit_reversal transaction type. + """ + MANAGED_MARKETS_DISPUTE_FEE_CREDIT_REVERSAL + + """ + The managed_markets_dispute_fee_debit transaction type. + """ + MANAGED_MARKETS_DISPUTE_FEE_DEBIT + + """ + The managed_markets_dispute_fee_debit_reversal transaction type. + """ + MANAGED_MARKETS_DISPUTE_FEE_DEBIT_REVERSAL + + """ + The managed_markets_dispute_won_amount_credit transaction type. + """ + MANAGED_MARKETS_DISPUTE_WON_AMOUNT_CREDIT + + """ + The managed_markets_dispute_won_amount_credit_reversal transaction type. + """ + MANAGED_MARKETS_DISPUTE_WON_AMOUNT_CREDIT_REVERSAL + + """ + The managed_markets_duties_and_taxes_adjustment_credit transaction type. + """ + MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_CREDIT + + """ + The managed_markets_duties_and_taxes_adjustment_credit_reversal transaction type. + """ + MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_CREDIT_REVERSAL + + """ + The managed_markets_duties_and_taxes_adjustment_debit transaction type. + """ + MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_DEBIT + + """ + The managed_markets_duties_and_taxes_adjustment_debit_reversal transaction type. + """ + MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_DEBIT_REVERSAL + + """ + The managed_markets_duties_and_taxes_adjustment_platform_credit transaction type. + """ + MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_PLATFORM_CREDIT + + """ + The managed_markets_duties_and_taxes_adjustment_platform_credit_reversal transaction type. + """ + MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_PLATFORM_CREDIT_REVERSAL + + """ + The managed_markets_duties_and_taxes_adjustment_platform_debit transaction type. + """ + MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_PLATFORM_DEBIT + + """ + The managed_markets_duties_and_taxes_adjustment_platform_debit_reversal transaction type. + """ + MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_PLATFORM_DEBIT_REVERSAL + + """ + The managed_markets_merchant_of_record_account_fx_drift_credit transaction type. + """ + MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_FX_DRIFT_CREDIT + + """ + The managed_markets_merchant_of_record_account_fx_drift_credit_reversal transaction type. + """ + MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_FX_DRIFT_CREDIT_REVERSAL + + """ + The managed_markets_merchant_of_record_account_fx_drift_debit transaction type. + """ + MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_FX_DRIFT_DEBIT + + """ + The managed_markets_merchant_of_record_account_fx_drift_debit_reversal transaction type. + """ + MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_FX_DRIFT_DEBIT_REVERSAL + + """ + The managed_markets_merchant_of_record_account_netting_credit transaction type. + """ + MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_NETTING_CREDIT + + """ + The managed_markets_merchant_of_record_account_netting_credit_reversal transaction type. + """ + MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_NETTING_CREDIT_REVERSAL + + """ + The managed_markets_merchant_of_record_account_netting_debit transaction type. + """ + MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_NETTING_DEBIT + + """ + The managed_markets_merchant_of_record_account_netting_debit_reversal transaction type. + """ + MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_NETTING_DEBIT_REVERSAL + + """ + The managed_markets_non_target_revenue_adjustment_credit transaction type. + """ + MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_CREDIT + + """ + The managed_markets_non_target_revenue_adjustment_credit_reversal transaction type. + """ + MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_CREDIT_REVERSAL + + """ + The managed_markets_non_target_revenue_adjustment_debit transaction type. + """ + MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_DEBIT + + """ + The managed_markets_non_target_revenue_adjustment_debit_reversal transaction type. + """ + MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_DEBIT_REVERSAL + + """ + The managed_markets_non_target_revenue_adjustment_platform_credit transaction type. + """ + MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_PLATFORM_CREDIT + + """ + The managed_markets_non_target_revenue_adjustment_platform_credit_reversal transaction type. + """ + MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_PLATFORM_CREDIT_REVERSAL + + """ + The managed_markets_non_target_revenue_adjustment_platform_debit transaction type. + """ + MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_PLATFORM_DEBIT + + """ + The managed_markets_non_target_revenue_adjustment_platform_debit_reversal transaction type. + """ + MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_PLATFORM_DEBIT_REVERSAL + + """ + The managed_markets_refund_debit transaction type. + """ + MANAGED_MARKETS_REFUND_DEBIT + + """ + The managed_markets_refund_debit_reversal transaction type. + """ + MANAGED_MARKETS_REFUND_DEBIT_REVERSAL + + """ + The managed_markets_webhook_adjustment_credit transaction type. + """ + MANAGED_MARKETS_WEBHOOK_ADJUSTMENT_CREDIT + + """ + The managed_markets_webhook_adjustment_credit_reversal transaction type. + """ + MANAGED_MARKETS_WEBHOOK_ADJUSTMENT_CREDIT_REVERSAL + + """ + The managed_markets_webhook_adjustment_debit transaction type. + """ + MANAGED_MARKETS_WEBHOOK_ADJUSTMENT_DEBIT + + """ + The managed_markets_webhook_adjustment_debit_reversal transaction type. + """ + MANAGED_MARKETS_WEBHOOK_ADJUSTMENT_DEBIT_REVERSAL + + """ + The marketplace_fee_credit transaction type. + """ + MARKETPLACE_FEE_CREDIT + + """ + The marketplace_fee_credit_reversal transaction type. + """ + MARKETPLACE_FEE_CREDIT_REVERSAL + + """ + The markets_pro_credit transaction type. + """ + MARKETS_PRO_CREDIT + + """ + The merchant_goodwill_credit transaction type. + """ + MERCHANT_GOODWILL_CREDIT + + """ + The merchant_goodwill_credit_reversal transaction type. + """ + MERCHANT_GOODWILL_CREDIT_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 merchant_to_merchant_debit transaction type. + """ + MERCHANT_TO_MERCHANT_DEBIT + + """ + The merchant_to_merchant_debit_reversal transaction type. + """ + MERCHANT_TO_MERCHANT_DEBIT_REVERSAL + + """ + The mobilepay_service_fee transaction type. + """ + MOBILEPAY_SERVICE_FEE + + """ + The mobilepay_service_fee_refund transaction type. + """ + MOBILEPAY_SERVICE_FEE_REFUND + + """ + The promotion_credit transaction type. + """ + PROMOTION_CREDIT + + """ + The promotion_credit_reversal transaction type. + """ + PROMOTION_CREDIT_REVERSAL + + """ + The referral_fee transaction type. + """ + REFERRAL_FEE + + """ + The referral_fee_tax transaction type. + """ + REFERRAL_FEE_TAX + + """ + The refund transaction type. + """ + REFUND + + """ + The refund_adjustment transaction type. + """ + REFUND_ADJUSTMENT + + """ + The refund_failure transaction type. + """ + REFUND_FAILURE + + """ + The reserved_funds transaction type. + """ + RESERVED_FUNDS + + """ + The reserved_funds_reversal transaction type. + """ + RESERVED_FUNDS_REVERSAL + + """ + The reserved_funds_withdrawal transaction type. + """ + RESERVED_FUNDS_WITHDRAWAL + + """ + The risk_reversal transaction type. + """ + RISK_REVERSAL + + """ + The risk_withdrawal transaction type. + """ + RISK_WITHDRAWAL + + """ + The seller_protection_credit transaction type. + """ + SELLER_PROTECTION_CREDIT + + """ + The seller_protection_credit_reversal transaction type. + """ + SELLER_PROTECTION_CREDIT_REVERSAL + + """ + The shipping_label transaction type. + """ + SHIPPING_LABEL + + """ + 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_other_carrier_charge_adjustment transaction type. + """ + SHIPPING_OTHER_CARRIER_CHARGE_ADJUSTMENT + + """ + The shipping_return_to_origin_adjustment transaction type. + """ + SHIPPING_RETURN_TO_ORIGIN_ADJUSTMENT + + """ + The shopify_collective_credit transaction type. + """ + SHOPIFY_COLLECTIVE_CREDIT + + """ + The shopify_collective_credit_reversal transaction type. + """ + SHOPIFY_COLLECTIVE_CREDIT_REVERSAL + + """ + The shopify_collective_debit transaction type. + """ + SHOPIFY_COLLECTIVE_DEBIT + + """ + The shopify_collective_debit_reversal transaction type. + """ + SHOPIFY_COLLECTIVE_DEBIT_REVERSAL + + """ + The shopify_source_credit transaction type. + """ + SHOPIFY_SOURCE_CREDIT + + """ + The shopify_source_credit_reversal transaction type. + """ + SHOPIFY_SOURCE_CREDIT_REVERSAL + + """ + The shopify_source_debit transaction type. + """ + SHOPIFY_SOURCE_DEBIT + + """ + The shopify_source_debit_reversal transaction type. + """ + SHOPIFY_SOURCE_DEBIT_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_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 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_credit transaction type. + """ + SHOP_CASH_CREDIT + + """ + The shop_cash_credit_reversal transaction type. + """ + SHOP_CASH_CREDIT_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 stripe_fee transaction type. + """ + STRIPE_FEE + + """ + The tax_adjustment_credit transaction type. + """ + TAX_ADJUSTMENT_CREDIT + + """ + The tax_adjustment_credit_reversal transaction type. + """ + TAX_ADJUSTMENT_CREDIT_REVERSAL + + """ + The tax_adjustment_debit transaction type. + """ + TAX_ADJUSTMENT_DEBIT + + """ + The tax_adjustment_debit_reversal transaction type. + """ + TAX_ADJUSTMENT_DEBIT_REVERSAL + + """ + The transfer transaction type. + """ + TRANSFER + + """ + The transfer_cancel transaction type. + """ + TRANSFER_CANCEL + + """ + The transfer_failure transaction type. + """ + TRANSFER_FAILURE + + """ + The transfer_refund transaction type. + """ + TRANSFER_REFUND + + """ + The vat_refund_credit transaction type. + """ + VAT_REFUND_CREDIT + + """ + The vat_refund_credit_reversal transaction type. + """ + VAT_REFUND_CREDIT_REVERSAL +} + +""" +The status of an order's eligibility for protection against fraudulent chargebacks by Shopify Protect. +""" +enum ShopifyProtectEligibilityStatus @componentName(name: "reviews") { + """ + 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. + """ + ELIGIBLE + + """ + The order isn't eligible for protection against fraudulent chargebacks. + """ + NOT_ELIGIBLE + + """ + The eligibility of the order is pending and has not yet been determined. + """ + PENDING +} + +""" +The eligibility details of an order's protection against fraudulent chargebacks by Shopify Protect. +""" +type ShopifyProtectOrderEligibility @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { + """ + The status of whether an order is eligible for protection against fraudulent chargebacks. + """ + status: ShopifyProtectEligibilityStatus! +} + +""" +A summary of Shopify Protect details for an order. +""" +type ShopifyProtectOrderSummary @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { + """ + The eligibility details of an order's protection against fraudulent chargebacks. + """ + eligibility: ShopifyProtectOrderEligibility! + + """ + The status of the order's protection against fraudulent chargebacks. + """ + status: ShopifyProtectStatus! +} + +""" +The status of an order's protection with Shopify Protect. +""" +enum ShopifyProtectStatus @componentName(name: "reviews") { + """ + 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. + """ + ACTIVE + + """ + The protection for an order isn't active because the order didn't meet eligibility requirements. + """ + INACTIVE + + """ + The order received a chargeback but the order wasn't protected because it didn't meet coverage requirements. + """ + NOT_PROTECTED + + """ + The protection for the order is pending and has not yet been determined. + """ + PENDING + + """ + The order received a fraudulent chargeback and it was protected. + """ + PROTECTED +} + +""" +A response to a ShopifyQL query. +""" +type ShopifyqlQueryResponse @requiredAccess(scope: "`read_reports` access scope.") @componentName(name: "reporting") { + """ + A list of analytics targets that match the ShopifyQL query. + For target gauge queries, returns the matching target if one exists. + For `COMPARE TO targets` queries, returns matching targets for visualized metrics in `VISUALIZE` order. + Returns an empty list when no targets match or the ShopifyQL query cannot be matched. + Query `parseErrors` to detect invalid ShopifyQL. + """ + analyticsTargets: [AnalyticsTarget!]! + + """ + A list of parse errors, if parsing fails. + """ + parseErrors: [String!]! + + """ + The result in a tabular format with column and row data. + """ + tableData: ShopifyqlTableData +} + +""" +The result of a ShopifyQL query. +""" +type ShopifyqlTableData @requiredAccess(scope: "`read_reports` access scope.") @componentName(name: "reporting") { + """ + The columns of the table. + """ + columns: [ShopifyqlTableDataColumn!]! + + """ + The rows of the table. + """ + rows: JSON! +} + +""" +Represents a column in a ShopifyQL query response. +""" +type ShopifyqlTableDataColumn @requiredAccess(scope: "`read_reports` access scope.") @componentName(name: "reporting") { + """ + The data type of the column. + """ + dataType: ColumnDataType! + + """ + The human-readable display name of the column. + """ + displayName: String! + + """ + The name of the column. + """ + name: String! + + """ + The sub type of an array column. + """ + 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 @requiredAccess(scope: "`read_users` access scope. Also: The app must be a finance embedded app or installed on a Shopify Plus or Advanced store. Contact Shopify Support to enable this scope for your app.") @componentName(name: "user_management") { + """ + The type of account the staff member has. + """ + accountType: AccountType + + """ + Whether the staff member is active. + """ + active: Boolean! + + """ + The image used as the staff member's avatar in the Shopify admin. + """ + avatar( + """ + The default image returned if the staff member has no avatar. + """ + fallback: StaffMemberDefaultImage = DEFAULT + + """ + The image height in pixels between 1 and 2048. + """ + maxHeight: Int @deprecated(reason: "Use `maxHeight` argument on `image` instead.") + + """ + The image width in pixels between 1 and 2048. + """ + maxWidth: Int @deprecated(reason: "Use `maxWidth` on argument `image` instead.") + ): Image! + + """ + The staff member's email address. + """ + email: String! + + """ + Whether the staff member's account exists. + """ + exists: Boolean! + + """ + The staff member's first name. + """ + firstName: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + The Identity account details for the staff member. + """ + identityAccount: IdentityAccount + + """ + The account settings page URL for the staff member. + """ + identityAccountUrl: URL @deprecated(reason: "Use `identityAccount` instead.") + + """ + 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 @componentName(name: "platform") { + """ + 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 @componentName(name: "user_management") { + """ + Returns a default avatar image for the staff member. + """ + DEFAULT + + """ + Returns a URL that returns a 404 error if the image is not present. + """ + NOT_FOUND + + """ + Returns a transparent avatar image for the staff member. + """ + TRANSPARENT +} + +""" +An auto-generated type which holds one StaffMember and a cursor during pagination. +""" +type StaffMemberEdge @componentName(name: "user_management") { + """ + 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 @componentName(name: "user_management") { + """ + The staff member can manage and install apps and channels. + """ + APPLICATIONS + + """ + The staff member can export store data via bulk data operations. + """ + BULK_DATA_EXPORT + + """ + The staff member can import store data via bulk data operations. + """ + BULK_DATA_IMPORT + + """ + 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 create and edit markets. + """ + CREATE_AND_EDIT_MARKETS + + """ + 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 delete markets. + """ + DELETE_MARKETS + + """ + 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 edit theme code. + """ + EDIT_THEME_CODE + + """ + 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 manage shipping and delivery. + """ + MANAGE_DELIVERY_SETTINGS + + """ + The staff member can manage policy pages. + """ + MANAGE_POLICIES + + """ + The staff member can manage taxes and duties. + """ + MANAGE_TAXES_SETTINGS + + """ + 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 a draft order by manually entering a credit card number. + """ + PAY_DRAFT_ORDERS_BY_CREDIT_CARD + + """ + The staff member can pay for an order by manually entering a credit card number. + """ + PAY_ORDERS_BY_CREDIT_CARD + + """ + 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 refund orders. + """ + REFUND_ORDERS + + """ + 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.") + + """ + The staff member can view markets. + """ + VIEW_MARKETS +} + +""" +Represents the data used to customize the Shopify admin experience for a logged-in staff member. +""" +type StaffMemberPrivateData @componentName(name: "user_management") { + """ + 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 @componentName(name: "user_management") { + """ + Sort by the `email` value. + """ + EMAIL + + """ + Sort by the `first_name` value. + """ + FIRST_NAME + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `last_name` value. + """ + 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 @componentName(name: "platform") { + """ + The image filename. + """ + filename: String! + + """ + HTTP method to be used by the staged upload. + """ + httpMethod: StagedUploadHttpMethodType = PUT + + """ + The image MIME type. + """ + mimeType: String! + + """ + The image resource. + """ + resource: StagedUploadTargetGenerateUploadResource! +} + +""" +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 @componentName(name: "platform") { + """ + Parameters needed to authenticate a request to upload the file. + """ + parameters: [StagedUploadParameter!]! + + """ + 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. + """ + resourceUrl: URL + + """ + The URL to use when sending an request to upload the file. Should be used in conjunction with + the parameters field. + """ + 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 @componentName(name: "platform") { + """ + The POST HTTP method. + """ + POST + + """ + The PUT HTTP method. + """ + PUT +} + +""" +The input fields for generating staged upload targets. +""" +input StagedUploadInput @componentName(name: "platform") { + """ + 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). + """ + fileSize: UnsignedInt64 + + """ + The file's name and extension. + """ + filename: String! + + """ + The HTTP method to be used when sending a request to upload the file using the returned staged + upload target. + """ + httpMethod: StagedUploadHttpMethodType = PUT + + """ + The file's MIME type. + """ + mimeType: String! + + """ + The file's intended Shopify resource type. + """ + resource: StagedUploadTargetGenerateUploadResource! +} + +""" +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 @componentName(name: "platform") { + """ + The parameter's name. + """ + name: String! + + """ + The parameter's value. + """ + 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 @componentName(name: "platform") { + """ + The parameters of an image to be uploaded. + """ + parameters: [ImageUploadParameter!]! + + """ + The image URL. + """ + 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 @componentName(name: "platform") { + """ + The size of the file to upload, in bytes. + """ + fileSize: UnsignedInt64 + + """ + The filename of the asset being uploaded. + """ + filename: String! + + """ + The HTTP method to be used by the staged upload. + """ + httpMethod: StagedUploadHttpMethodType = PUT + + """ + The MIME type of the asset being uploaded. + """ + mimeType: String! + + """ + The resource type being uploaded. + """ + resource: StagedUploadTargetGenerateUploadResource! +} + +""" +Return type for `stagedUploadTargetGenerate` mutation. +""" +type StagedUploadTargetGeneratePayload @componentName(name: "platform") { + """ + The signed parameters that can be used to upload the asset. + """ + parameters: [MutationsStagedUploadTargetGenerateUploadParameter!]! + + """ + The signed URL where the asset can be uploaded. + """ + url: String! + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The resource type to receive. +""" +enum StagedUploadTargetGenerateUploadResource @componentName(name: "platform") { + """ + 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). + """ + BULK_MUTATION_VARIABLES + + """ + 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. + """ + COLLECTION_IMAGE + + """ + 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). + """ + DISPUTE_FILE_UPLOAD + + """ + 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). + """ + FILE + + """ + 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). + """ + IMAGE + + """ + 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). + """ + MODEL_3D + + """ + 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). + """ + PRODUCT_IMAGE @deprecated(reason: "Use IMAGE instead. This resource type will be removed in a future version.") + + """ + 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). + """ + RETURN_LABEL + + """ + 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). + """ + SHOP_IMAGE + + """ + 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). + """ + URL_REDIRECT_IMPORT + + """ + 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). + """ + VIDEO +} + +""" +Return type for `stagedUploadTargetsGenerate` mutation. +""" +type StagedUploadTargetsGeneratePayload @componentName(name: "platform") { + """ + The staged upload targets that were generated. + """ + urls: [StagedUploadTarget!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `stagedUploadsCreate` mutation. +""" +type StagedUploadsCreatePayload @componentName(name: "platform") { + """ + The staged upload targets that were generated. + """ + stagedTargets: [StagedMediaUploadTarget!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields for the access settings for the metafields under the standard definition. +""" +input StandardMetafieldDefinitionAccessInput @componentName(name: "content") { + """ + The Admin API access setting to use for the metafields under this definition. + """ + admin: MetafieldAdminAccessInput + + """ + The Customer Account API access setting to use for the metafields under this definition. + """ + customerAccount: MetafieldCustomerAccountAccessInput + + """ + The Storefront API access setting to use for the metafields under this definition. + """ + storefront: MetafieldStorefrontAccessInput +} + +""" +Return type for `standardMetafieldDefinitionEnable` mutation. +""" +type StandardMetafieldDefinitionEnablePayload @componentName(name: "platform") { + """ + The metafield definition that was created. + """ + createdDefinition: MetafieldDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [StandardMetafieldDefinitionEnableUserError!]! +} + +""" +An error that occurs during the execution of `StandardMetafieldDefinitionEnable`. +""" +type StandardMetafieldDefinitionEnableUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: StandardMetafieldDefinitionEnableUserErrorCode + + """ + 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 `StandardMetafieldDefinitionEnableUserError`. +""" +enum StandardMetafieldDefinitionEnableUserErrorCode @componentName(name: "platform") { + """ + Admin access can only be specified for app-owned metafield definitions. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED + + """ + The metafield definition capability cannot be disabled. + """ + CAPABILITY_CANNOT_BE_DISABLED + + """ + The input value is invalid. + """ + INVALID + + """ + The metafield definition capability is invalid. + """ + INVALID_CAPABILITY + + """ + The input combination is invalid. + """ + INVALID_INPUT_COMBINATION + + """ + The maximum number of definitions per owner type has been exceeded. + """ + LIMIT_EXCEEDED + + """ + You have reached the maximum allowed definitions to be used as admin filters. + """ + OWNER_TYPE_LIMIT_EXCEEDED_FOR_USE_AS_ADMIN_FILTERS + + """ + The input value is already taken. + """ + TAKEN + + """ + The standard metafield definition template was not found. + """ + TEMPLATE_NOT_FOUND + + """ + The definition type is not eligible to be used as collection condition. + """ + TYPE_NOT_ALLOWED_FOR_CONDITIONS + + """ + The namespace and key is already in use for a set of your metafields. + """ + UNSTRUCTURED_ALREADY_EXISTS + + """ + The metafield definition does not support pinning. + """ + UNSUPPORTED_PINNING +} + +""" +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 @componentName(name: "content") { + """ + 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. + """ + name: String! + + """ + The namespace owned by the definition after the definition has been activated. + """ + namespace: String! + + """ + The list of resource types that the standard metafield definition can be applied to. + """ + ownerTypes: [MetafieldOwnerType!]! + + """ + The associated [metafield definition + type](https://shopify.dev/apps/metafields/definitions/types) that the + metafield stores. + """ + type: MetafieldDefinitionType! + + """ + The configured validations for the standard metafield definition. + """ + validations: [MetafieldDefinitionValidation!]! + + """ + Whether metafields for the definition are by default visible using the Storefront API. + """ + visibleToStorefrontApi: Boolean! +} + +""" +An auto-generated type for paginating through multiple StandardMetafieldDefinitionTemplates. +""" +type StandardMetafieldDefinitionTemplateConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [StandardMetafieldDefinitionTemplateEdge!]! + + """ + 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. + """ + nodes: [StandardMetafieldDefinitionTemplate!]! + + """ + 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 StandardMetafieldDefinitionTemplate and a cursor during pagination. +""" +type StandardMetafieldDefinitionTemplateEdge @componentName(name: "content") { + """ + 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 StandardMetafieldDefinitionTemplateEdge. + """ + node: StandardMetafieldDefinitionTemplate! +} + +""" +The input fields for enabling a standard metafield definition. +""" +input StandardMetafieldDefinitionsEnableInput @componentName(name: "content") { + """ + The access settings that apply to each of the metafields that belong to the metafield definition. + """ + access: StandardMetafieldDefinitionAccessInput + + """ + The capabilities of the metafield definition. + """ + capabilities: MetafieldCapabilityCreateInput + + """ + The key of the standard metafield to enable. Used in combination with `namespace`. + """ + key: String! + + """ + The namespace of the standard metafield to enable. Used in combination with `key`. + """ + namespace: String! + + """ + The resource type that the metafield definition is scoped to. + """ + ownerType: MetafieldOwnerType! + + """ + 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.") +} + +""" +Return type for `standardMetafieldDefinitionsEnable` mutation. +""" +type StandardMetafieldDefinitionsEnablePayload @componentName(name: "platform") { + """ + The list of definitions that were enabled. + """ + definitions: [MetafieldDefinition!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [StandardMetafieldDefinitionsEnableUserError!]! +} + +""" +An error that occurs during the execution of `StandardMetafieldDefinitionsEnable`. +""" +type StandardMetafieldDefinitionsEnableUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: StandardMetafieldDefinitionsEnableUserErrorCode + + """ + 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 `StandardMetafieldDefinitionsEnableUserError`. +""" +enum StandardMetafieldDefinitionsEnableUserErrorCode @componentName(name: "platform") { + """ + Admin access can only be specified for app-owned metafield definitions. + """ + ADMIN_ACCESS_INPUT_NOT_ALLOWED + + """ + The input value is invalid. + """ + INVALID + + """ + The metafield definition capability is invalid. + """ + INVALID_CAPABILITY + + """ + The input combination is invalid. + """ + INVALID_INPUT_COMBINATION + + """ + Too many standard definitions were provided. + """ + LESS_THAN_OR_EQUAL_TO + + """ + The maximum number of definitions per owner type has been exceeded. + """ + LIMIT_EXCEEDED + + """ + The input value is already taken. + """ + TAKEN + + """ + The standard metafield definition template was not found. + """ + TEMPLATE_NOT_FOUND + + """ + The definition type is not eligible to be used as collection condition. + """ + TYPE_NOT_ALLOWED_FOR_CONDITIONS + + """ + The namespace and key is already in use for a set of your metafields. + """ + UNSTRUCTURED_ALREADY_EXISTS + + """ + The metafield definition does not support pinning. + """ + UNSUPPORTED_PINNING +} + +""" +Describes a capability that is enabled on a Metaobject Definition. +""" +type StandardMetaobjectCapabilityTemplate @componentName(name: "content") { + """ + The type of capability that's enabled for the metaobject definition. + """ + capabilityType: MetaobjectCapabilityType! +} + +""" +Return type for `standardMetaobjectDefinitionEnable` mutation. +""" +type StandardMetaobjectDefinitionEnablePayload @componentName(name: "platform") { + """ + The metaobject definition that was enabled using the standard template. + """ + metaobjectDefinition: MetaobjectDefinition + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MetaobjectUserError!]! +} + +""" +A preset field definition on a standard metaobject definition template. +""" +type StandardMetaobjectDefinitionFieldTemplate @componentName(name: "content") { + """ + The administrative description. + """ + description: String + + """ + The key owned by the definition after the definition has been enabled. + """ + key: String! + + """ + The human-readable name. + """ + name: String! + + """ + The required status of the field within the object composition. + """ + required: Boolean! + + """ + The associated [metafield definition + type](https://shopify.dev/apps/metafields/definitions/types) that the + metafield stores. + """ + type: MetafieldDefinitionType! + + """ + The configured validations for the standard metafield definition. + """ + validations: [MetafieldDefinitionValidation!]! + + """ + Whether metafields for the definition are by default visible using the Storefront API. + """ + visibleToStorefrontApi: Boolean! +} + +""" +Standard metaobject definition templates provide preset configurations to create metaobject definitions. +""" +type StandardMetaobjectDefinitionTemplate @componentName(name: "content") { + """ + Access configuration for the standard metaobject definition template. + """ + access: MetaobjectAccess! + + """ + The administrative description. + """ + description: String + + """ + The key of a field to reference as the display name for each object. + """ + displayNameKey: String + + """ + The capabilities of the metaobject definition. + """ + enabledCapabilities: [StandardMetaobjectCapabilityTemplate!]! + + """ + Templates for the associated field definitions. + """ + fieldDefinitions: [StandardMetaobjectDefinitionFieldTemplate!]! + + """ + The human-readable name. + """ + name: String! + + """ + The namespace owned by the definition after the definition has been enabled. + """ + 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The product taxonomy node associated with the standardized product type. + """ + productTaxonomyNode: ProductTaxonomyNode +} + +""" +The status of a Balance bank account. +""" +enum Status @componentName(name: "banking") { + """ + Active. + """ + ACTIVE + + """ + Closed. + """ + CLOSED + + """ + Inactive. + """ + INACTIVE +} + +""" +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 @requiredAccess(scope: "`read_store_credit_accounts` access scope.") @componentName(name: "stored_value_instruments") @protectedObject(subject: "customer") { + """ + The current balance of the store credit account. + """ + balance: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The owner of the store credit account. + """ + owner: HasStoreCreditAccounts! @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope.") + + """ + The transaction history of the store credit account. + """ + transactions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | 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'` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | remaining_amount | float | Filter transactions by remaining amount. Only + applicable to StoreCreditAccountCreditTransaction objects. All other objects + are handled as if they have a null remaining amount. | | | - + `remaining_amount:0`
- `remaining_amount:1.60`
- + `remaining_amount:>5.00` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + + """ + Sort the underlying list by the given key. + """ + sortKey: TransactionSortKeys = CREATED_AT + ): StoreCreditAccountTransactionConnection! +} + +""" +An auto-generated type for paginating through multiple StoreCreditAccounts. +""" +type StoreCreditAccountConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [StoreCreditAccountEdge!]! + + """ + 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. + """ + nodes: [StoreCreditAccount!]! + + """ + 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 a store credit account credit transaction. +""" +input StoreCreditAccountCreditInput @componentName(name: "stored_value_instruments") { + """ + The amount to credit the store credit account. + """ + creditAmount: MoneyInput! + + """ + The date and time when the credit expires. + """ + expiresAt: DateTime + + """ + Whether to send a notification to the account owner when the store credit is issued. + Defaults to `false`. + """ + notify: Boolean = false +} + +""" +Return type for `storeCreditAccountCredit` mutation. +""" +type StoreCreditAccountCreditPayload @componentName(name: "platform") { + """ + The store credit account transaction that was created. + """ + storeCreditAccountTransaction: StoreCreditAccountCreditTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [StoreCreditAccountCreditUserError!]! +} + +""" +A credit transaction which increases the store credit account balance. +""" +type StoreCreditAccountCreditTransaction implements Node & StoreCreditAccountTransaction @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { + """ + The store credit account that the transaction belongs to. + """ + account: StoreCreditAccount! + + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The balance of the account after the transaction. + """ + balanceAfterTransaction: MoneyV2! + + """ + The date and time when the transaction was created. + """ + createdAt: DateTime! + + """ + The event that caused the store credit account transaction. + """ + event: StoreCreditSystemEvent! + + """ + The time at which the transaction expires. + Debit transactions will always spend the soonest expiring credit first. + """ + expiresAt: DateTime + + """ + A globally-unique ID. + """ + id: ID! + + """ + The origin of the store credit account transaction. + """ + origin: StoreCreditAccountTransactionOrigin + + """ + 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. + """ + remainingAmount: MoneyV2! +} + +""" +An error that occurs during the execution of `StoreCreditAccountCredit`. +""" +type StoreCreditAccountCreditUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: StoreCreditAccountCreditUserErrorCode + + """ + 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 `StoreCreditAccountCreditUserError`. +""" +enum StoreCreditAccountCreditUserErrorCode @componentName(name: "platform") { + """ + The store credit account could not be found. + """ + ACCOUNT_NOT_FOUND + + """ + The operation would cause the account's credit limit to be exceeded. + """ + CREDIT_LIMIT_EXCEEDED + + """ + The expiry date must be in the future. + """ + EXPIRES_AT_IN_PAST + + """ + The currency provided does not match the currency of the store credit account. + """ + MISMATCHING_CURRENCY + + """ + A positive amount must be used to credit a store credit account. + """ + NEGATIVE_OR_ZERO_AMOUNT + + """ + Owner does not exist. + """ + OWNER_NOT_FOUND + + """ + The currency provided is not currently supported. + """ + UNSUPPORTED_CURRENCY +} + +""" +The input fields for a store credit account debit transaction. +""" +input StoreCreditAccountDebitInput @componentName(name: "stored_value_instruments") { + """ + The amount to debit the store credit account. + """ + debitAmount: MoneyInput! +} + +""" +Return type for `storeCreditAccountDebit` mutation. +""" +type StoreCreditAccountDebitPayload @componentName(name: "platform") { + """ + The store credit account transaction that was created. + """ + storeCreditAccountTransaction: StoreCreditAccountDebitTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + 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 @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { + """ + The store credit account that the transaction belongs to. + """ + account: StoreCreditAccount! + + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The balance of the account after the transaction. + """ + balanceAfterTransaction: MoneyV2! + + """ + The date and time when the transaction was created. + """ + createdAt: DateTime! + + """ + The reverted debit transaction. + """ + debitTransaction: StoreCreditAccountDebitTransaction! + + """ + The event that caused the store credit account transaction. + """ + event: StoreCreditSystemEvent! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The origin of the store credit account transaction. + """ + origin: StoreCreditAccountTransactionOrigin +} + +""" +A debit transaction which decreases the store credit account balance. +""" +type StoreCreditAccountDebitTransaction implements Node & StoreCreditAccountTransaction @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { + """ + The store credit account that the transaction belongs to. + """ + account: StoreCreditAccount! + + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The balance of the account after the transaction. + """ + balanceAfterTransaction: MoneyV2! + + """ + The date and time when the transaction was created. + """ + createdAt: DateTime! + + """ + The event that caused the store credit account transaction. + """ + event: StoreCreditSystemEvent! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The origin of the store credit account transaction. + """ + origin: StoreCreditAccountTransactionOrigin +} + +""" +An error that occurs during the execution of `StoreCreditAccountDebit`. +""" +type StoreCreditAccountDebitUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: StoreCreditAccountDebitUserErrorCode + + """ + 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 `StoreCreditAccountDebitUserError`. +""" +enum StoreCreditAccountDebitUserErrorCode @componentName(name: "platform") { + """ + The store credit account could not be found. + """ + ACCOUNT_NOT_FOUND + + """ + The store credit account does not have sufficient funds to satisfy the request. + """ + INSUFFICIENT_FUNDS + + """ + The currency provided does not match the currency of the store credit account. + """ + MISMATCHING_CURRENCY + + """ + A positive amount must be used to debit a store credit account. + """ + NEGATIVE_OR_ZERO_AMOUNT +} + +""" +An auto-generated type which holds one StoreCreditAccount and a cursor during pagination. +""" +type StoreCreditAccountEdge @componentName(name: "stored_value_instruments") { + """ + 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 StoreCreditAccountEdge. + """ + node: StoreCreditAccount! +} + +""" +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. +""" +type StoreCreditAccountExpirationTransaction implements StoreCreditAccountTransaction @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { + """ + The store credit account that the transaction belongs to. + """ + account: StoreCreditAccount! + + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The balance of the account after the transaction. + """ + balanceAfterTransaction: MoneyV2! + + """ + The date and time when the transaction was created. + """ + createdAt: DateTime! + + """ + The credit transaction which expired. + """ + creditTransaction: StoreCreditAccountCreditTransaction! + + """ + The event that caused the store credit account transaction. + """ + event: StoreCreditSystemEvent! + + """ + The origin of the store credit account transaction. + """ + origin: StoreCreditAccountTransactionOrigin +} + +""" +Interface for a store credit account transaction. +""" +interface StoreCreditAccountTransaction @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { + """ + The store credit account that the transaction belongs to. + """ + account: StoreCreditAccount! + + """ + The amount of the transaction. + """ + amount: MoneyV2! + + """ + The balance of the account after the transaction. + """ + balanceAfterTransaction: MoneyV2! + + """ + The date and time when the transaction was created. + """ + createdAt: DateTime! + + """ + The event that caused the store credit account transaction. + """ + event: StoreCreditSystemEvent! + + """ + The origin of the store credit account transaction. + """ + origin: StoreCreditAccountTransactionOrigin +} + +""" +An auto-generated type for paginating through multiple StoreCreditAccountTransactions. +""" +type StoreCreditAccountTransactionConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [StoreCreditAccountTransactionEdge!]! + + """ + 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. + """ + nodes: [StoreCreditAccountTransaction!]! + + """ + 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 StoreCreditAccountTransaction and a cursor during pagination. +""" +type StoreCreditAccountTransactionEdge @componentName(name: "stored_value_instruments") { + """ + 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 StoreCreditAccountTransactionEdge. + """ + node: StoreCreditAccountTransaction! +} + +""" +The origin of a store credit account transaction. +""" +union StoreCreditAccountTransactionOrigin @componentName(name: "stored_value_instruments") = OrderTransaction + +""" +The store credit configuration for a shop. +""" +type StoreCreditConfiguration @componentName(name: "stored_value_instruments") { + """ + Whether store credit is enabled for customers on checkout. + """ + storeCreditEnabled: Boolean! +} + +""" +The input fields to process a refund to store credit. +""" +input StoreCreditRefundInput @componentName(name: "returns") { + """ + The amount to be issued as store credit. + """ + amount: MoneyInput! + + """ + An optional expiration date for the store credit being issued. + """ + expiresAt: DateTime +} + +""" +The event that caused the store credit account transaction. +""" +enum StoreCreditSystemEvent @componentName(name: "stored_value_instruments") { + """ + An adjustment was made to the store credit account. + """ + ADJUSTMENT + + """ + Store credit was returned when an authorized payment was voided. + """ + ORDER_CANCELLATION + + """ + Store credit was used as payment for an order. + """ + ORDER_PAYMENT + + """ + Store credit was refunded from an order. + """ + ORDER_REFUND + + """ + A store credit payment was reverted due to another payment method failing. + """ + PAYMENT_FAILURE + + """ + A smaller amount of store credit was captured than was originally authorized. + """ + PAYMENT_RETURNED + + """ + Tax finalization affected the store credit payment. + """ + 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 @componentName(name: "apps") { + """ + List of permissions associated with the token. + """ + accessScopes: [AccessScope!]! + + """ + The issued public access token. + """ + accessToken: String! + + """ + The date and time when the public access token was created. + """ + createdAt: DateTime! + + """ + A globally-unique ID. + """ + id: ID! + + """ + An arbitrary title for each token determined by the developer, used for reference purposes. + """ + title: String! + + """ + The date and time when the storefront access token was updated. + """ + updatedAt: DateTime! +} + +""" +An auto-generated type for paginating through multiple StorefrontAccessTokens. +""" +type StorefrontAccessTokenConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [StorefrontAccessTokenEdge!]! + + """ + 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. + """ + nodes: [StorefrontAccessToken!]! + + """ + 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 `storefrontAccessTokenCreate` mutation. +""" +type StorefrontAccessTokenCreatePayload @componentName(name: "platform") { + """ + The user's shop. + """ + shop: Shop! + + """ + The storefront access token. + """ + storefrontAccessToken: StorefrontAccessToken + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +The input fields to delete a storefront access token. +""" +input StorefrontAccessTokenDeleteInput @componentName(name: "apps") { + """ + The ID of the storefront access token to delete. + """ + id: ID! @gidTypes(types: ["StorefrontAccessToken"]) +} + +""" +Return type for `storefrontAccessTokenDelete` mutation. +""" +type StorefrontAccessTokenDeletePayload @componentName(name: "platform") { + """ + The ID of the deleted storefront access token. + """ + deletedStorefrontAccessTokenId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one StorefrontAccessToken and a cursor during pagination. +""" +type StorefrontAccessTokenEdge @componentName(name: "apps") { + """ + 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 StorefrontAccessTokenEdge. + """ + node: StorefrontAccessToken! +} + +""" +The input fields for a storefront access token. +""" +input StorefrontAccessTokenInput @componentName(name: "apps") { + """ + A title for the storefront access token. + """ + 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 + +""" +An auto-generated type for paginating through multiple Strings. +""" +type StringConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [StringEdge!]! + + """ + 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. + """ + nodes: [String!]! + + """ + 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 String and a cursor during pagination. +""" +type StringEdge { + """ + 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 StringEdge. + """ + node: String! +} + +""" +The actor who initiated a subscription action. +""" +enum SubscriptionActor @componentName(name: "sales") { + """ + The subscription action was initiated by a customer. + """ + CUSTOMER + + """ + The subscription action was initiated by a merchant. + """ + MERCHANT + + """ + The subscription action was initiated by a partner. + """ + PARTNER +} + +""" +Represents an applied code discount. +""" +type SubscriptionAppliedCodeDiscount @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The unique ID. + """ + id: ID! + + """ + The redeem code of the discount that applies on the subscription. + """ + redeemCode: String! + + """ + The reason that the discount on the subscription draft is rejected. + """ + rejectionReason: SubscriptionDiscountRejectionReason +} + +""" +The input fields for mapping a subscription line to a discount. +""" +input SubscriptionAtomicLineInput @componentName(name: "sales") { + """ + The discount to be added to the subscription line. + """ + discounts: [SubscriptionAtomicManualDiscountInput!] + + """ + The new subscription line. + """ + line: SubscriptionLineInput! +} + +""" +The input fields for mapping a subscription line to a discount. +""" +input SubscriptionAtomicManualDiscountInput @componentName(name: "sales") { + """ + The maximum number of times the subscription discount will be applied on orders. + """ + recurringCycleLimit: Int + + """ + The title associated with the subscription discount. + """ + title: String + + """ + Percentage or fixed amount value of the discount. + """ + value: SubscriptionManualDiscountValueInput +} + +""" +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 @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + The date and time when the billing attempt was completed. + """ + completedAt: DateTime + + """ + The date and time when the billing attempt was created. + """ + createdAt: DateTime! + + """ + A code corresponding to a payment error during processing. + """ + errorCode: SubscriptionBillingAttemptErrorCode @deprecated(reason: "Use `state` instead.") + + """ + A message describing a payment error during processing. + """ + errorMessage: String @deprecated(reason: "Use `state` instead.") + + """ + A globally-unique ID. + """ + id: ID! + + """ + A unique key generated by the client to avoid duplicate payments. + """ + idempotencyKey: String! + + """ + The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow. + """ + nextActionUrl: URL @deprecated(reason: "Use `state` instead.") + + """ + The result of this billing attempt if completed successfully. + """ + order: Order @deprecated(reason: "Use `state` instead.") + + """ + 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. + """ + originTime: DateTime + + """ + The reference shared between retried payment attempts. + """ + paymentGroupId: String + + """ + The reference shared between payment attempts with similar payment details. + """ + paymentSessionId: String + + """ + Error information from processing the billing attempt. + """ + processingError: SubscriptionBillingAttemptProcessingError @deprecated(reason: "Use `state` instead.") + + """ + Whether the billing attempt is still processing. + """ + ready: Boolean! @deprecated(reason: "Use `state` instead.") + + """ + Whether the billing attempt respects the merchant's inventory policy. + """ + respectInventoryPolicy: Boolean! + + """ + The state of the billing attempt with state-specific data. + """ + state: SubscriptionBillingAttemptState! + + """ + The subscription contract. + """ + subscriptionContract: SubscriptionContract! + + """ + The transactions created by the billing attempt. + """ + transactions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): OrderTransactionConnection! +} + +""" +The action required to continue processing the billing attempt. +""" +union SubscriptionBillingAttemptAction @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") = SubscriptionBillingAttemptPaymentChallenge + +""" +The billing attempt state that requires an action to resolve. +Must complete the action required for the billing attempt to continue being processed. +""" +type SubscriptionBillingAttemptActionRequiredState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The action required to resolve the billing attempt. + """ + action: SubscriptionBillingAttemptAction! +} + +""" +An auto-generated type for paginating through multiple SubscriptionBillingAttempts. +""" +type SubscriptionBillingAttemptConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SubscriptionBillingAttemptEdge!]! + + """ + 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. + """ + nodes: [SubscriptionBillingAttempt!]! + + """ + 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 `subscriptionBillingAttemptCreate` mutation. +""" +type SubscriptionBillingAttemptCreatePayload @componentName(name: "platform") { + """ + The subscription billing attempt. + """ + subscriptionBillingAttempt: SubscriptionBillingAttempt + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BillingAttemptUserError!]! +} + +""" +An auto-generated type which holds one SubscriptionBillingAttempt and a cursor during pagination. +""" +type SubscriptionBillingAttemptEdge @componentName(name: "sales") { + """ + 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 SubscriptionBillingAttemptEdge. + """ + node: SubscriptionBillingAttempt! +} + +""" +Possible error types for a subscription billing attempt. +""" +union SubscriptionBillingAttemptError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") = SubscriptionBillingAttemptGeneralError | SubscriptionBillingAttemptInventoryError | SubscriptionBillingAttemptPaymentError | SubscriptionBillingAttemptUnexpectedError + +""" +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 @componentName(name: "sales") { + """ + The amount exceeds the limit for this payment method. + """ + AMOUNT_TOO_LARGE + + """ + The amount is too small. + """ + AMOUNT_TOO_SMALL + + """ + There was an error during the payment authentication. + """ + AUTHENTICATION_ERROR + + """ + Authentication failed during payment processing. + """ + AUTHENTICATION_FAILED + + """ + Additional authentication is required to complete the payment. + """ + AUTHENTICATION_REQUIRED + + """ + Payment method was canceled by buyer. + """ + BUYER_CANCELED_PAYMENT_METHOD + + """ + The card issuer requires the cardholder to call them. + """ + CALL_ISSUER + + """ + The payment was cancelled. + """ + CANCELLED_PAYMENT + + """ + The card was declined by the payment processor. + """ + CARD_DECLINED + + """ + Card number was incorrect. + """ + CARD_NUMBER_INCORRECT + + """ + The payment confirmation was rejected. + """ + CONFIRMATION_REJECTED + + """ + Customer is invalid. + """ + CUSTOMER_INVALID + + """ + Customer was not found. + """ + CUSTOMER_NOT_FOUND + + """ + The card issuer declined the transaction with a 'do not honor' response. + """ + DO_NOT_HONOR + + """ + The required buyer action has expired. + """ + EXPIRED_BUYER_ACTION + + """ + The card has expired. + """ + EXPIRED_CARD + + """ + Payment method is expired. + """ + EXPIRED_PAYMENT_METHOD + + """ + Fraud was suspected. + """ + FRAUD_SUSPECTED + + """ + Gift cards must have a price greater than zero. + """ + FREE_GIFT_CARD_NOT_ALLOWED + + """ + A generic payment error occurred. + """ + GENERIC_ERROR + + """ + The billing address provided is incorrect. + """ + INCORRECT_ADDRESS + + """ + The card number entered is incorrect. + """ + INCORRECT_NUMBER + + """ + The postal/ZIP code provided is incorrect. + """ + INCORRECT_ZIP + + """ + Insufficient funds. + """ + INSUFFICIENT_FUNDS + + """ + Not enough inventory found. + """ + INSUFFICIENT_INVENTORY + + """ + The billing address is invalid. + """ + INVALID_BILLING_ADDRESS + + """ + The currency is not supported for this payment method. + """ + INVALID_CURRENCY + + """ + The billing agreement ID or the transaction ID for the customer's payment method is invalid. + """ + INVALID_CUSTOMER_BILLING_AGREEMENT + + """ + The expiry date of the card provided is invalid. + """ + INVALID_EXPIRY_DATE + + """ + The card number is invalid. + """ + INVALID_NUMBER + + """ + Payment method is invalid. Please update or create a new payment method. + """ + INVALID_PAYMENT_METHOD + + """ + The purchase type is invalid for this payment method. + """ + INVALID_PURCHASE_TYPE + + """ + The shipping address is either missing or invalid. + """ + INVALID_SHIPPING_ADDRESS + + """ + No inventory location found or enabled. + """ + INVENTORY_ALLOCATIONS_NOT_FOUND + + """ + A payment has already been made for this invoice. + """ + INVOICE_ALREADY_PAID + + """ + Merchant account configuration error. + """ + MERCHANT_ACCOUNT_ERROR + + """ + The transaction was declined due to a merchant-defined rule. + """ + MERCHANT_RULE + + """ + Non-test order limit reached. Use a test payment gateway to place another order. + """ + NON_TEST_ORDER_LIMIT_REACHED + + """ + The off-session payment was rejected and requires customer action. + """ + OFF_SESSION_REJECTED + + """ + Payment method was declined by processor. + """ + PAYMENT_METHOD_DECLINED + + """ + Payment method cannot be used with the current payment gateway test mode configuration. + """ + PAYMENT_METHOD_INCOMPATIBLE_WITH_GATEWAY_CONFIG + + """ + Payment method was not found. + """ + PAYMENT_METHOD_NOT_FOUND + + """ + Payment method is not specified on subscription contract. + """ + PAYMENT_METHOD_NOT_SPECIFIED + + """ + The payment method type is not supported. + """ + PAYMENT_METHOD_UNSUPPORTED + + """ + An exception occurred with the payment provider. + """ + PAYMENT_PROVIDER_ERROR + + """ + Payment provider is not enabled. + """ + PAYMENT_PROVIDER_IS_NOT_ENABLED + + """ + Paypal Error General. + """ + PAYPAL_ERROR_GENERAL + + """ + A processing error occurred with the payment provider. + """ + PROCESSING_ERROR + + """ + Purchase Type is not supported. + """ + PURCHASE_TYPE_NOT_SUPPORTED + + """ + The payment retry was declined. + """ + RETRY_DECLINED + + """ + Gateway is in test mode and attempted to bill a live payment method. + """ + TEST_MODE + + """ + The transaction exceeds the cardholder's limit. + """ + TRANSACTION_LIMIT_EXCEEDED + + """ + Transient error, try again later. + """ + TRANSIENT_ERROR + + """ + There was an unexpected error during the billing attempt. + """ + UNEXPECTED_ERROR +} + +""" +The billing attempt failed due to an error. +""" +type SubscriptionBillingAttemptFailedState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error that caused the billing attempt to fail. + """ + error: SubscriptionBillingAttemptError! +} + +""" +An error that occurred during a subscription billing attempt that doesn't fit other categories. +""" +type SubscriptionBillingAttemptGeneralError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error code for the failure. + """ + code: SubscriptionBillingAttemptGeneralErrorCode! +} + +""" +Error codes for other billing attempt failures. +""" +enum SubscriptionBillingAttemptGeneralErrorCode @componentName(name: "sales") { + """ + Customer is invalid. + """ + CUSTOMER_INVALID + + """ + Customer was not found. + """ + CUSTOMER_NOT_FOUND + + """ + Free gift cards are not allowed. + """ + FREE_GIFT_CARD_NOT_ALLOWED + + """ + Billing address is invalid. + """ + INVALID_BILLING_ADDRESS + + """ + Merchant account error. + """ + MERCHANT_ACCOUNT_ERROR + + """ + Non-test order limit reached. + """ + NON_TEST_ORDER_LIMIT_REACHED + + """ + Payment method test mode incompatible with gateway. + """ + PAYMENT_METHOD_INCOMPATIBLE_WITH_GATEWAY_CONFIG + + """ + Payment method was not found. + """ + PAYMENT_METHOD_NOT_FOUND + + """ + Payment method not specified. + """ + PAYMENT_METHOD_NOT_SPECIFIED + + """ + Payment provider is not enabled. + """ + PAYMENT_PROVIDER_IS_NOT_ENABLED +} + +""" +A base error type that applies to all uncategorized error classes. +""" +type SubscriptionBillingAttemptGenericError implements SubscriptionBillingAttemptProcessingError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The code for the error. + """ + code: SubscriptionBillingAttemptErrorCode! + + """ + An explanation of the error. + """ + message: String! +} + +""" +The input fields required to complete a subscription billing attempt. +""" +input SubscriptionBillingAttemptInput @componentName(name: "sales") { + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + Select the specific billing cycle to be billed. + Default to bill the current billing cycle if not specified. + """ + billingCycleSelector: SubscriptionBillingCycleSelector + + """ + 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). + """ + idempotencyKey: String! + + """ + The behaviour to follow when creating an order for a product variant + when it's out of stock. + """ + inventoryPolicy: SubscriptionBillingAttemptInventoryPolicy = PRODUCT_VARIANT_INVENTORY_POLICY + + """ + 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. + """ + originTime: DateTime + + """ + Select payment processing policy for the billing attempt. Defaults to FAIL_UNLESS_VALID_PAYMENT_METHOD. + """ + paymentProcessingPolicy: SubscriptionBillingAttemptPaymentProcessingPolicy = FAIL_UNLESS_VALID_PAYMENT_METHOD +} + +""" +An inventory error caused by an issue with one or more of the contract merchandise lines. +""" +type SubscriptionBillingAttemptInsufficientStockProductVariantsError implements SubscriptionBillingAttemptProcessingError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The code for the error. + """ + code: SubscriptionBillingAttemptErrorCode! + + """ + A list of product variants that caused the insufficient inventory error. + """ + insufficientStockProductVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductVariantConnection! + + """ + An explanation of the error. + """ + message: String! +} + +""" +An inventory-related error that occurred during a subscription billing attempt. +""" +type SubscriptionBillingAttemptInventoryError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error code for the inventory-related failure. + """ + code: SubscriptionBillingAttemptInventoryErrorCode! + + """ + A list of product variants that caused the insufficient inventory error. + """ + insufficientStockProductVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductVariantConnection +} + +""" +Error codes for inventory-related billing attempt failures. +""" +enum SubscriptionBillingAttemptInventoryErrorCode @componentName(name: "sales") { + """ + Insufficient inventory. + """ + INSUFFICIENT_INVENTORY + + """ + No inventory location found or enabled. + """ + INVENTORY_ALLOCATIONS_NOT_FOUND +} + +""" +The inventory policy for a billing attempt. +""" +enum SubscriptionBillingAttemptInventoryPolicy @componentName(name: "sales") { + """ + Override the merchant's product variant + inventory policy and allow overselling for this billing attempt. + """ + ALLOW_OVERSELLING + + """ + Respect the merchant's product variant + inventory policy for this billing attempt. + """ + PRODUCT_VARIANT_INVENTORY_POLICY +} + +""" +An inventory error caused by an issue with one or more of the contract merchandise lines. +""" +type SubscriptionBillingAttemptOutOfStockProductVariantsError implements SubscriptionBillingAttemptProcessingError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The code for the error. + """ + code: SubscriptionBillingAttemptErrorCode! + + """ + An explanation of the error. + """ + message: String! + + """ + A list of responsible product variants. + """ + outOfStockProductVariants( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): ProductVariantConnection! @deprecated(reason: "Use `subscriptionBillingAttemptInsufficientStockProductVariantsError` type instead.") +} + +""" +A payment challenge that the customer must complete. +""" +type SubscriptionBillingAttemptPaymentChallenge @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + URL to redirect the customer for authentication. + """ + nextActionUrl: URL! + + """ + The status of the payment challenge. + """ + status: SubscriptionBillingAttemptPaymentChallengeStatus! +} + +""" +The status of the billing attempt authentication process. +""" +enum SubscriptionBillingAttemptPaymentChallengeStatus @componentName(name: "sales") { + """ + The billing attempt is rejected because the customer action was required. The + customer has not yet attempted to complete the challenge. + """ + OFF_SESSION_REJECTED + + """ + The customer was brought on session and challenged. + """ + ON_SESSION_CHALLENGED +} + +""" +A payment-related error that occurred during a subscription billing attempt. +""" +type SubscriptionBillingAttemptPaymentError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error code for the payment failure. + """ + code: SubscriptionBillingAttemptPaymentErrorCode! +} + +""" +Error codes for payment-related billing attempt failures. +""" +enum SubscriptionBillingAttemptPaymentErrorCode @componentName(name: "sales") { + """ + The transaction amount is too large. + """ + AMOUNT_TOO_LARGE + + """ + The transaction amount is too small. + """ + AMOUNT_TOO_SMALL + + """ + There was an error during the authentication. + """ + AUTHENTICATION_ERROR + + """ + Authentication failed during the payment processing. + """ + AUTHENTICATION_FAILED + + """ + Additional authentication is required for this payment. + """ + AUTHENTICATION_REQUIRED + + """ + The buyer canceled the payment method. + """ + BUYER_CANCELED_PAYMENT_METHOD + + """ + The card issuer requires the cardholder to call. + """ + CALL_ISSUER + + """ + The payment was cancelled. + """ + CANCELLED_PAYMENT + + """ + The card was declined. + """ + CARD_DECLINED + + """ + The card number is incorrect. + """ + CARD_NUMBER_INCORRECT + + """ + The payment confirmation was rejected. + """ + CONFIRMATION_REJECTED + + """ + The card issuer returned 'do not honor'. The customer should reach out to their card-issuing bank for more information. + """ + DO_NOT_HONOR + + """ + The required buyer action has expired. + """ + EXPIRED_BUYER_ACTION + + """ + The card has expired. + """ + EXPIRED_CARD + + """ + Payment method has expired. + """ + EXPIRED_PAYMENT_METHOD + + """ + Fraud was suspected on this transaction. + """ + FRAUD_SUSPECTED + + """ + A generic payment error occurred. + """ + GENERIC_ERROR + + """ + The billing address is incorrect. + """ + INCORRECT_ADDRESS + + """ + The card number is incorrect. + """ + INCORRECT_NUMBER + + """ + The postal/ZIP code is incorrect. + """ + INCORRECT_ZIP + + """ + The payment method has insufficient funds to complete the payment. + """ + INSUFFICIENT_FUNDS + + """ + The currency is not supported. + """ + INVALID_CURRENCY + + """ + The customer billing agreement is invalid. + """ + INVALID_CUSTOMER_BILLING_AGREEMENT + + """ + The expiry date is invalid. + """ + INVALID_EXPIRY_DATE + + """ + The card number is invalid. + """ + INVALID_NUMBER + + """ + Payment method is invalid. + """ + INVALID_PAYMENT_METHOD + + """ + The purchase type is invalid. + """ + INVALID_PURCHASE_TYPE + + """ + The shipping address is invalid. + """ + INVALID_SHIPPING_ADDRESS + + """ + The invoice has already been paid. + """ + INVOICE_ALREADY_PAID + + """ + The payment was declined due to a merchant rule. + """ + MERCHANT_RULE + + """ + The off-session payment was rejected. + """ + OFF_SESSION_REJECTED + + """ + Payment method was declined. + """ + PAYMENT_METHOD_DECLINED + + """ + The payment method type is not supported. + """ + PAYMENT_METHOD_UNSUPPORTED + + """ + An exception occurred with the payment provider. + """ + PAYMENT_PROVIDER_ERROR + + """ + A general PayPal error occurred. + """ + PAYPAL_ERROR_GENERAL + + """ + A processing error occurred. + """ + PROCESSING_ERROR + + """ + Purchase type is not supported. + """ + PURCHASE_TYPE_NOT_SUPPORTED + + """ + The payment retry was declined. + """ + RETRY_DECLINED + + """ + A test mode error occurred. + """ + TEST_MODE + + """ + The transaction exceeded the limit. + """ + TRANSACTION_LIMIT_EXCEEDED + + """ + A transient error occurred, try again later. + """ + TRANSIENT_ERROR +} + +""" +The payment processing policy for a billing attempt. +""" +enum SubscriptionBillingAttemptPaymentProcessingPolicy @componentName(name: "sales") { + """ + Attempt to process payment on the billing attempt and fail the billing attempt if + the payment method is not valid or if a payment method does not exist. + """ + FAIL_UNLESS_VALID_PAYMENT_METHOD + + """ + Skip payment processing on the billing attempt and create an unpaid order. + """ + SKIP_PAYMENT_AND_CREATE_UNPAID_ORDER +} + +""" +The billing attempt is currently being processed. +""" +type SubscriptionBillingAttemptPendingState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + Always true when the billing attempt is pending. + """ + processing: Boolean! +} + +""" +An error that prevented a billing attempt. +""" +interface SubscriptionBillingAttemptProcessingError @componentName(name: "sales") { + """ + The code for the error. + """ + code: SubscriptionBillingAttemptErrorCode! + + """ + An explanation of the error. + """ + message: String! +} + +""" +The state of a subscription billing attempt with state-specific data. +""" +union SubscriptionBillingAttemptState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") = SubscriptionBillingAttemptActionRequiredState | SubscriptionBillingAttemptFailedState | SubscriptionBillingAttemptPendingState | SubscriptionBillingAttemptSuccessState + +""" +The billing attempt completed successfully and created an order. +""" +type SubscriptionBillingAttemptSuccessState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The order created by the successful billing attempt. May be null if the order was deleted. + """ + order: Order +} + +""" +An unexpected error that occurred during a subscription billing attempt. +""" +type SubscriptionBillingAttemptUnexpectedError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + A message describing the unexpected error. + """ + message: String! +} + +""" +The set of valid sort keys for the SubscriptionBillingAttempts query. +""" +enum SubscriptionBillingAttemptsSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +A subscription billing cycle. +""" +type SubscriptionBillingCycle @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The date on which the billing attempt is expected to be made. + """ + billingAttemptExpectedDate: DateTime! + + """ + The list of billing attempts associated with the billing cycle. + """ + billingAttempts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionBillingAttemptConnection! + + """ + The end date of the billing cycle. + """ + cycleEndAt: DateTime! + + """ + The index of the billing cycle. + """ + cycleIndex: Int! + + """ + The start date of the billing cycle. + """ + cycleStartAt: DateTime! + + """ + Whether this billing cycle was edited. + """ + edited: Boolean! + + """ + The active edited contract for the billing cycle. + """ + editedContract: SubscriptionBillingCycleEditedContract + + """ + Whether this billing cycle was skipped. + """ + skipped: Boolean! + + """ + The subscription contract that the billing cycle belongs to. + """ + sourceContract: SubscriptionContract! + + """ + The status of the billing cycle. + """ + status: SubscriptionBillingCycleBillingCycleStatus! +} + +""" +The presence of billing attempts on Billing Cycles. +""" +enum SubscriptionBillingCycleBillingAttemptStatus @componentName(name: "sales") { + """ + Billing cycle has any number of billing attempts. + """ + ANY + + """ + Billing cycle has at least one billing attempt. + """ + HAS_ATTEMPT + + """ + Billing cycle has no billing attempts. + """ + NO_ATTEMPT +} + +""" +The possible status values of a subscription billing cycle. +""" +enum SubscriptionBillingCycleBillingCycleStatus @componentName(name: "sales") { + """ + The billing cycle is billed. + """ + BILLED + + """ + The billing cycle hasn't been billed. + """ + UNBILLED +} + +""" +Return type for `subscriptionBillingCycleBulkCharge` mutation. +""" +type SubscriptionBillingCycleBulkChargePayload @componentName(name: "platform") { + """ + The asynchronous job that performs the action on the targeted billing cycles. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionBillingCycleBulkUserError!]! +} + +""" +The input fields for filtering subscription billing cycles in bulk actions. +""" +input SubscriptionBillingCycleBulkFilters @componentName(name: "sales") { + """ + Filters the billing cycles based on the presence of billing attempts. + """ + billingAttemptStatus: SubscriptionBillingCycleBillingAttemptStatus = ANY + + """ + Filters the billing cycles based on their status. + """ + billingCycleStatus: [SubscriptionBillingCycleBillingCycleStatus!] + + """ + Filters the billing cycles based on the status of their associated subscription contracts. + """ + contractStatus: [SubscriptionContractSubscriptionStatus!] +} + +""" +Return type for `subscriptionBillingCycleBulkSearch` mutation. +""" +type SubscriptionBillingCycleBulkSearchPayload @componentName(name: "platform") { + """ + The asynchronous job that performs the action on the targeted billing cycles. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionBillingCycleBulkUserError!]! +} + +""" +Represents an error that happens during the execution of subscriptionBillingCycles mutations. +""" +type SubscriptionBillingCycleBulkUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error code. + """ + code: SubscriptionBillingCycleBulkUserErrorCode + + """ + 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 `SubscriptionBillingCycleBulkUserError`. +""" +enum SubscriptionBillingCycleBulkUserErrorCode @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + End date can't be more than 24 hours in the future. + """ + END_DATE_IN_THE_FUTURE + + """ + The input value is invalid. + """ + INVALID + + """ + The range between start date and end date shouldn't be more than 1 week. + """ + INVALID_DATE_RANGE + + """ + Start date should be before end date. + """ + START_DATE_BEFORE_END_DATE +} + +""" +Return type for `subscriptionBillingCycleCharge` mutation. +""" +type SubscriptionBillingCycleChargePayload @componentName(name: "platform") { + """ + The subscription billing attempt. + """ + subscriptionBillingAttempt: SubscriptionBillingAttempt + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [BillingAttemptUserError!]! +} + +""" +An auto-generated type for paginating through multiple SubscriptionBillingCycles. +""" +type SubscriptionBillingCycleConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SubscriptionBillingCycleEdge!]! + + """ + 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. + """ + nodes: [SubscriptionBillingCycle!]! + + """ + 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 `subscriptionBillingCycleContractDraftCommit` mutation. +""" +type SubscriptionBillingCycleContractDraftCommitPayload @componentName(name: "platform") { + """ + The committed Subscription Billing Cycle Edited Contract object. + """ + contract: SubscriptionBillingCycleEditedContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionBillingCycleContractDraftConcatenate` mutation. +""" +type SubscriptionBillingCycleContractDraftConcatenatePayload @componentName(name: "platform") { + """ + The Subscription Draft object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionBillingCycleContractEdit` mutation. +""" +type SubscriptionBillingCycleContractEditPayload @componentName(name: "platform") { + """ + The draft subscription contract object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +An auto-generated type which holds one SubscriptionBillingCycle and a cursor during pagination. +""" +type SubscriptionBillingCycleEdge @componentName(name: "sales") { + """ + 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 SubscriptionBillingCycleEdge. + """ + node: SubscriptionBillingCycle! +} + +""" +Return type for `subscriptionBillingCycleEditDelete` mutation. +""" +type SubscriptionBillingCycleEditDeletePayload @componentName(name: "platform") { + """ + The list of updated billing cycles. + """ + billingCycles: [SubscriptionBillingCycle!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionBillingCycleUserError!]! +} + +""" +Represents a subscription contract with billing cycles. +""" +type SubscriptionBillingCycleEditedContract implements SubscriptionContractBase @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + The subscription app that the subscription contract is registered to. + """ + app: App + + """ + The URL of the subscription contract page on the subscription app. + """ + appAdminUrl: URL + + """ + The billing cycles that the edited contract belongs to. + """ + billingCycles( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 subscription contract was created. + """ + createdAt: DateTime! + + """ + The currency that's used for the subscription contract. + """ + currencyCode: CurrencyCode! + + """ + A list of the custom attributes to be added to the generated orders. + """ + customAttributes: [Attribute!]! + + """ + The customer to whom the subscription contract belongs. + """ + customer: Customer + + """ + The customer payment method that's used for the subscription contract. + """ + customerPaymentMethod( + """ + Whether to show the customer's revoked payment method. + """ + showRevoked: Boolean = false + ): CustomerPaymentMethod + + """ + The delivery method for each billing of the subscription contract. + """ + deliveryMethod: SubscriptionDeliveryMethod + + """ + The delivery price for each billing of the subscription contract. + """ + deliveryPrice: MoneyV2! + + """ + The list of subscription discounts associated with the subscription contract. + """ + discounts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionManualDiscountConnection! + + """ + The number of lines associated with the subscription contract. + """ + lineCount: Int! @deprecated(reason: "Use `linesCount` instead.") + + """ + The list of subscription lines associated with the subscription contract. + """ + lines( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionLineConnection! + + """ + The number of lines associated with the subscription contract. + """ + linesCount: Count + + """ + The note field that will be applied to the generated orders. + """ + note: String + + """ + A list of the subscription contract's orders. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): OrderConnection! + + """ + The date and time when the subscription contract was updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `subscriptionBillingCycleEditsDelete` mutation. +""" +type SubscriptionBillingCycleEditsDeletePayload @componentName(name: "platform") { + """ + The list of updated billing cycles. + """ + billingCycles: [SubscriptionBillingCycle!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionBillingCycleUserError!]! +} + +""" +Possible error codes that can be returned by `SubscriptionBillingCycleUserError`. +""" +enum SubscriptionBillingCycleErrorCode @componentName(name: "platform") { + """ + Billing date cannot be set on skipped billing cycle. + """ + BILLING_DATE_SET_ON_SKIPPED + + """ + Billing cycle selector cannot select billing cycle outside of index range. + """ + CYCLE_INDEX_OUT_OF_RANGE + + """ + Can't find the billing cycle. + """ + CYCLE_NOT_FOUND + + """ + Billing cycle selector cannot select billing cycle outside of start date range. + """ + CYCLE_START_DATE_OUT_OF_RANGE + + """ + Billing cycle schedule edit input provided is empty. Must take in parameters to modify schedule. + """ + EMPTY_BILLING_CYCLE_EDIT_SCHEDULE_INPUT + + """ + Billing cycle has incomplete billing attempts in progress. + """ + INCOMPLETE_BILLING_ATTEMPTS + + """ + The input value is invalid. + """ + INVALID + + """ + The index selector is invalid. + """ + INVALID_CYCLE_INDEX + + """ + The date selector is invalid. + """ + INVALID_DATE + + """ + There's no contract or schedule edit associated with the targeted billing cycle(s). + """ + NO_CYCLE_EDITS + + """ + Billing date of a cycle cannot be set to a value outside of its billing date range. + """ + OUT_OF_BOUNDS + + """ + Billing cycle selector cannot select upcoming billing cycle past limit. + """ + UPCOMING_CYCLE_LIMIT_EXCEEDED +} + +""" +The input fields for specifying the subscription contract and selecting the associated billing cycle. +""" +input SubscriptionBillingCycleInput @componentName(name: "sales") { + """ + The ID of the subscription contract associated with the billing cycle. + """ + contractId: ID! @gidTypes(types: ["SubscriptionContract"]) + + """ + Selects the billing cycle by date or index. + """ + selector: SubscriptionBillingCycleSelector! +} + +""" +The input fields for parameters to modify the schedule of a specific billing cycle. +""" +input SubscriptionBillingCycleScheduleEditInput @componentName(name: "sales") { + """ + Sets the expected billing date for the billing cycle. + """ + billingDate: DateTime + + """ + The reason for editing. + """ + reason: SubscriptionBillingCycleScheduleEditInputScheduleEditReason! + + """ + Sets the skip status for the billing cycle. + """ + skip: Boolean +} + +""" +The input fields for possible reasons for editing the billing cycle's schedule. +""" +enum SubscriptionBillingCycleScheduleEditInputScheduleEditReason @componentName(name: "sales") { + """ + Buyer initiated the schedule edit. + """ + BUYER_INITIATED + + """ + Developer initiated the schedule edit. + """ + DEV_INITIATED + + """ + Merchant initiated the schedule edit. + """ + MERCHANT_INITIATED +} + +""" +Return type for `subscriptionBillingCycleScheduleEdit` mutation. +""" +type SubscriptionBillingCycleScheduleEditPayload @componentName(name: "platform") { + """ + The updated billing cycle. + """ + billingCycle: SubscriptionBillingCycle + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionBillingCycleUserError!]! +} + +""" +The input fields to select SubscriptionBillingCycle by either date or index. +Both past and future billing cycles can be selected. +""" +input SubscriptionBillingCycleSelector @componentName(name: "sales") { + """ + Returns a billing cycle by date. + """ + date: DateTime + + """ + Returns a billing cycle by index. + """ + index: Int +} + +""" +Return type for `subscriptionBillingCycleSkip` mutation. +""" +type SubscriptionBillingCycleSkipPayload @componentName(name: "platform") { + """ + The updated billing cycle. + """ + billingCycle: SubscriptionBillingCycle + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionBillingCycleSkipUserError!]! +} + +""" +An error that occurs during the execution of `SubscriptionBillingCycleSkip`. +""" +type SubscriptionBillingCycleSkipUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: SubscriptionBillingCycleSkipUserErrorCode + + """ + 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 `SubscriptionBillingCycleSkipUserError`. +""" +enum SubscriptionBillingCycleSkipUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `subscriptionBillingCycleUnskip` mutation. +""" +type SubscriptionBillingCycleUnskipPayload @componentName(name: "platform") { + """ + The updated billing cycle. + """ + billingCycle: SubscriptionBillingCycle + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionBillingCycleUnskipUserError!]! +} + +""" +An error that occurs during the execution of `SubscriptionBillingCycleUnskip`. +""" +type SubscriptionBillingCycleUnskipUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: SubscriptionBillingCycleUnskipUserErrorCode + + """ + 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 `SubscriptionBillingCycleUnskipUserError`. +""" +enum SubscriptionBillingCycleUnskipUserErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +The possible errors for a subscription billing cycle. +""" +type SubscriptionBillingCycleUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error code. + """ + code: SubscriptionBillingCycleErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +The input fields to select a subset of subscription billing cycles within a date range. +""" +input SubscriptionBillingCyclesDateRangeSelector @componentName(name: "sales") { + """ + The end date and time for the range. + """ + endDate: DateTime! + + """ + The start date and time for the range. + """ + startDate: DateTime! +} + +""" +The input fields to select a subset of subscription billing cycles within an index range. +""" +input SubscriptionBillingCyclesIndexRangeSelector @componentName(name: "sales") { + """ + The end index for the range. + """ + endIndex: Int! + + """ + The start index for the range. + """ + startIndex: Int! +} + +""" +The set of valid sort keys for the SubscriptionBillingCycles query. +""" +enum SubscriptionBillingCyclesSortKeys @componentName(name: "sales") { + """ + Sort by the `cycle_index` value. + """ + CYCLE_INDEX + + """ + Sort by the `id` value. + """ + ID +} + +""" +Select subscription billing cycles to be targeted. +""" +enum SubscriptionBillingCyclesTargetSelection @componentName(name: "sales") { + """ + Target all current and upcoming subscription billing cycles. + """ + ALL +} + +""" +Represents a Subscription Billing Policy. +""" +type SubscriptionBillingPolicy @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + Specific anchor dates upon which the billing interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """ + The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). + """ + interval: SellingPlanInterval! + + """ + The number of billing intervals between invoices. + """ + intervalCount: Int! + + """ + Maximum amount of cycles after which the subscription ends. + """ + maxCycles: Int + + """ + Minimum amount of cycles required in the subscription. + """ + minCycles: Int +} + +""" +The input fields for a Subscription Billing Policy. +""" +input SubscriptionBillingPolicyInput @componentName(name: "sales") { + """ + Specific anchor dates upon which the billing interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] = [] + + """ + The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). + """ + interval: SellingPlanInterval! + + """ + The number of billing intervals between invoices. + """ + intervalCount: Int! + + """ + Maximum amount of cycles required in the subscription. + """ + maxCycles: Int + + """ + Minimum amount of cycles required in the subscription. + """ + minCycles: Int +} + +""" +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. + +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 @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + The subscription app that the subscription contract is registered to. + """ + app: App + + """ + The URL of the subscription contract page on the subscription app. + """ + appAdminUrl: URL + + """ + The list of billing attempts associated with the subscription contract. + """ + billingAttempts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionBillingAttemptConnection! + + """ + The billing policy associated with the subscription contract. + """ + billingPolicy: SubscriptionBillingPolicy! + + """ + The date and time when the subscription contract was created. + """ + createdAt: DateTime! + + """ + The currency that's used for the subscription contract. + """ + currencyCode: CurrencyCode! + + """ + A list of the custom attributes to be added to the generated orders. + """ + customAttributes: [Attribute!]! + + """ + The customer to whom the subscription contract belongs. + """ + customer: Customer + + """ + The customer payment method that's used for the subscription contract. + """ + customerPaymentMethod( + """ + Whether to show the customer's revoked payment method. + """ + showRevoked: Boolean = false + ): CustomerPaymentMethod + + """ + The delivery method for each billing of the subscription contract. + """ + deliveryMethod: SubscriptionDeliveryMethod + + """ + The delivery policy associated with the subscription contract. + """ + deliveryPolicy: SubscriptionDeliveryPolicy! + + """ + The delivery price for each billing of the subscription contract. + """ + deliveryPrice: MoneyV2! + + """ + The list of subscription discounts associated with the subscription contract. + """ + discounts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionManualDiscountConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The last billing error type of the contract. + """ + lastBillingAttemptErrorType: SubscriptionContractLastBillingErrorType + + """ + The current status of the last payment. + """ + lastPaymentStatus: SubscriptionContractLastPaymentStatus + + """ + The number of lines associated with the subscription contract. + """ + lineCount: Int! @deprecated(reason: "Use `linesCount` instead.") + + """ + The list of subscription lines associated with the subscription contract. + """ + lines( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionLineConnection! + + """ + The number of lines associated with the subscription contract. + """ + linesCount: Count + + """ + 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 note field that will be applied to the generated orders. + """ + note: String + + """ + A list of the subscription contract's orders. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): OrderConnection! + + """ + The order from which this contract originated. + """ + originOrder: Order + + """ + The revision id of the contract. + """ + revisionId: UnsignedInt64! + + """ + The current status of the subscription contract. + """ + status: SubscriptionContractSubscriptionStatus! + + """ + The date and time when the subscription contract was updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `subscriptionContractActivate` mutation. +""" +type SubscriptionContractActivatePayload @componentName(name: "platform") { + """ + The new Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionContractStatusUpdateUserError!]! +} + +""" +The input fields required to create a Subscription Contract. +""" +input SubscriptionContractAtomicCreateInput @componentName(name: "sales") { + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + The attributes used as input for the Subscription Draft. + """ + contract: SubscriptionDraftInput! + + """ + The currency used for the subscription contract. + """ + currencyCode: CurrencyCode! + + """ + The ID of the customer to associate with the subscription contract. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + A list of discount redeem codes to apply to the subscription contract. + """ + discountCodes: [String!] = [] + + """ + A list of new Subscription Lines. + """ + lines: [SubscriptionAtomicLineInput!]! + + """ + 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 expected date for the upcoming billing attempt, impacting the contract's + billing cycle. For example: If a monthly contract was created on May 14th, the + first cycle will end on June 14th, with subsequent cycles starting and ending + on the 14th of each month. If a monthly contract was created on May 14th with + `upcoming_billing_attempt_expected_date` set to May 30th, the first cycle will + then end on May 30th, and subsequent cycles will end on the 30th of each + month. Note: This field must match `next_billing_date` when specified. + """ + upcomingBillingAttemptExpectedDate: DateTime +} + +""" +Return type for `subscriptionContractAtomicCreate` mutation. +""" +type SubscriptionContractAtomicCreatePayload @componentName(name: "platform") { + """ + The new Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Represents subscription contract common fields. +""" +interface SubscriptionContractBase @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The subscription app that the subscription contract is registered to. + """ + app: App + + """ + The URL of the subscription contract page on the subscription app. + """ + appAdminUrl: URL + + """ + The currency that's used for the subscription contract. + """ + currencyCode: CurrencyCode! + + """ + A list of the custom attributes to be added to the generated orders. + """ + customAttributes: [Attribute!]! + + """ + The customer to whom the subscription contract belongs. + """ + customer: Customer + + """ + The customer payment method that's used for the subscription contract. + """ + customerPaymentMethod( + """ + Whether to show the customer's revoked payment method. + """ + showRevoked: Boolean = false + ): CustomerPaymentMethod + + """ + The delivery method for each billing of the subscription contract. + """ + deliveryMethod: SubscriptionDeliveryMethod + + """ + The delivery price for each billing of the subscription contract. + """ + deliveryPrice: MoneyV2! + + """ + The list of subscription discounts associated with the subscription contract. + """ + discounts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionManualDiscountConnection! + + """ + The number of lines associated with the subscription contract. + """ + lineCount: Int! @deprecated(reason: "Use `linesCount` instead.") + + """ + The list of subscription lines associated with the subscription contract. + """ + lines( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionLineConnection! + + """ + The number of lines associated with the subscription contract. + """ + linesCount: Count + + """ + The note field that will be applied to the generated orders. + """ + note: String + + """ + A list of the subscription contract's orders. + """ + orders( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): OrderConnection! + + """ + The date and time when the subscription contract was updated. + """ + updatedAt: DateTime! +} + +""" +Return type for `subscriptionContractCancel` mutation. +""" +type SubscriptionContractCancelPayload @componentName(name: "platform") { + """ + The new Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionContractStatusUpdateUserError!]! +} + +""" +An auto-generated type for paginating through multiple SubscriptionContracts. +""" +type SubscriptionContractConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SubscriptionContractEdge!]! + + """ + 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. + """ + nodes: [SubscriptionContract!]! + + """ + 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 Subscription Contract. +""" +input SubscriptionContractCreateInput @componentName(name: "sales") { + """ + The actor who initiated a subscription action. + """ + actor: SubscriptionActor + + """ + The attributes used as input for the Subscription Draft. + """ + contract: SubscriptionDraftInput! + + """ + The currency used for the subscription contract. + """ + currencyCode: CurrencyCode! + + """ + The ID of the customer to associate with the subscription contract. + """ + customerId: ID! @gidTypes(types: ["Customer"]) + + """ + The next billing date for the subscription contract. + """ + nextBillingDate: DateTime! +} + +""" +Return type for `subscriptionContractCreate` mutation. +""" +type SubscriptionContractCreatePayload @componentName(name: "platform") { + """ + The Subscription Contract object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +An auto-generated type which holds one SubscriptionContract and a cursor during pagination. +""" +type SubscriptionContractEdge @componentName(name: "sales") { + """ + 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 SubscriptionContractEdge. + """ + node: SubscriptionContract! +} + +""" +Possible error codes that can be returned by `SubscriptionContractUserError`. +""" +enum SubscriptionContractErrorCode @componentName(name: "platform") { + """ + The input value is invalid. + """ + INVALID +} + +""" +Return type for `subscriptionContractExpire` mutation. +""" +type SubscriptionContractExpirePayload @componentName(name: "platform") { + """ + The new Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionContractStatusUpdateUserError!]! +} + +""" +Return type for `subscriptionContractFail` mutation. +""" +type SubscriptionContractFailPayload @componentName(name: "platform") { + """ + The new Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionContractStatusUpdateUserError!]! +} + +""" +The possible values of the last billing error on a subscription contract. +""" +enum SubscriptionContractLastBillingErrorType @componentName(name: "sales") { + """ + Subscription billing attempt error due to customer error. + """ + CUSTOMER_ERROR + + """ + Subscription billing attempt error due to inventory error. + """ + INVENTORY_ERROR + + """ + All other billing attempt errors. + """ + OTHER + + """ + Subscription billing attempt error due to payment error. + """ + PAYMENT_ERROR +} + +""" +The possible status values of the last payment on a subscription contract. +""" +enum SubscriptionContractLastPaymentStatus @componentName(name: "sales") { + """ + Failed subscription billing attempt. + """ + FAILED + + """ + Successful subscription billing attempt. + """ + SUCCEEDED +} + +""" +Return type for `subscriptionContractPause` mutation. +""" +type SubscriptionContractPausePayload @componentName(name: "platform") { + """ + The new Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionContractStatusUpdateUserError!]! +} + +""" +The input fields required to create a Subscription Contract. +""" +input SubscriptionContractProductChangeInput @componentName(name: "sales") { + """ + The price of the product. + """ + currentPrice: Decimal + + """ + The ID of the product variant the subscription line refers to. + """ + productVariantId: ID @gidTypes(types: ["ProductVariant"]) +} + +""" +Return type for `subscriptionContractProductChange` mutation. +""" +type SubscriptionContractProductChangePayload @componentName(name: "platform") { + """ + The new Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The updated Subscription Line. + """ + lineUpdated: SubscriptionLine + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionContractSetNextBillingDate` mutation. +""" +type SubscriptionContractSetNextBillingDatePayload @componentName(name: "platform") { + """ + The updated Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionContractUserError!]! +} + +""" +Possible error codes that can be returned by `SubscriptionContractStatusUpdateUserError`. +""" +enum SubscriptionContractStatusUpdateErrorCode @componentName(name: "platform") { + """ + Subscription contract status cannot be changed once terminated. + """ + CONTRACT_TERMINATED + + """ + The input value is invalid. + """ + INVALID +} + +""" +Represents a subscription contract status update error. +""" +type SubscriptionContractStatusUpdateUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error code. + """ + code: SubscriptionContractStatusUpdateErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +The possible status values of a subscription. +""" +enum SubscriptionContractSubscriptionStatus @componentName(name: "sales") { + """ + The contract is active and continuing per its policies. + """ + ACTIVE + + """ + The contract was ended by an unplanned customer action. + """ + CANCELLED + + """ + The contract has ended per the expected circumstances. All billing and deliverycycles of the subscriptions were executed. + """ + EXPIRED + + """ + The contract ended because billing failed and no further billing attempts are expected. + """ + FAILED + + """ + The contract is temporarily paused and is expected to resume in the future. + """ + PAUSED +} + +""" +Return type for `subscriptionContractUpdate` mutation. +""" +type SubscriptionContractUpdatePayload @componentName(name: "platform") { + """ + The Subscription Contract object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Represents a Subscription Contract error. +""" +type SubscriptionContractUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error code. + """ + code: SubscriptionContractErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +The set of valid sort keys for the SubscriptionContracts query. +""" +enum SubscriptionContractsSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `status` value. + """ + STATUS + + """ + Sort by the `updated_at` value. + """ + UPDATED_AT +} + +""" +Represents a Subscription Line Pricing Cycle Adjustment. +""" +type SubscriptionCyclePriceAdjustment @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + Price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + Price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! + + """ + The number of cycles required before this pricing policy applies. + """ + afterCycle: Int! + + """ + The computed price after the adjustments applied. + """ + computedPrice: MoneyV2! +} + +""" +Describes the delivery method to use to get the physical goods to the customer. +""" +union SubscriptionDeliveryMethod @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionDeliveryMethodLocalDelivery | SubscriptionDeliveryMethodPickup | SubscriptionDeliveryMethodShipping + +""" +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. +""" +input SubscriptionDeliveryMethodInput @componentName(name: "sales") { + """ + The input fields for the local delivery method. + """ + localDelivery: SubscriptionDeliveryMethodLocalDeliveryInput + + """ + The input fields for the pickup delivery method. + """ + pickup: SubscriptionDeliveryMethodPickupInput + + """ + The input fields for the shipping delivery method. + """ + shipping: SubscriptionDeliveryMethodShippingInput +} + +""" +A subscription delivery method for local delivery. +The other subscription delivery methods can be found in the `SubscriptionDeliveryMethod` union type. +""" +type SubscriptionDeliveryMethodLocalDelivery @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + The address to deliver to. + """ + address: MailingAddress! + + """ + The details of the local delivery method to use. + """ + localDeliveryOption: SubscriptionDeliveryMethodLocalDeliveryOption! +} + +""" +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. +""" +input SubscriptionDeliveryMethodLocalDeliveryInput @componentName(name: "sales") { + """ + The address to deliver to. + """ + address: MailingAddressInput + + """ + The details of the local delivery method to use. + """ + localDeliveryOption: SubscriptionDeliveryMethodLocalDeliveryOptionInput +} + +""" +The selected delivery option on a subscription contract. +""" +type SubscriptionDeliveryMethodLocalDeliveryOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + A custom reference to the delivery method for use with automations. + """ + code: String + + """ + The details displayed to the customer to describe the local delivery option. + """ + description: String + + """ + The delivery instructions that the customer can provide to the merchant. + """ + instructions: String + + """ + The phone number that the customer provided to the merchant. + Formatted using E.164 standard. For example, `+16135551111`. + """ + phone: String! @protectedField(subject: "customer", content: "phone") + + """ + The presentment title of the local delivery option. + """ + presentmentTitle: String + + """ + The title of the local delivery option. + """ + title: String +} + +""" +The input fields for local delivery option. +""" +input SubscriptionDeliveryMethodLocalDeliveryOptionInput @componentName(name: "sales") { + """ + A custom reference to the delivery method for use with automations. + """ + code: String + + """ + The details displayed to the customer to describe the local delivery option. + """ + description: String + + """ + The delivery instructions that the customer can provide to the merchant. + """ + instructions: String + + """ + The phone number that the customer must provide to the merchant. + Formatted using E.164 standard. For example, `+16135551111`. + """ + phone: String! + + """ + The presentment title of the local delivery option. + """ + presentmentTitle: String + + """ + The title of the local delivery option. + """ + title: String +} + +""" +A delivery method with a pickup option. +""" +type SubscriptionDeliveryMethodPickup @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + The details of the pickup delivery method to use. + """ + pickupOption: SubscriptionDeliveryMethodPickupOption! +} + +""" +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. +""" +input SubscriptionDeliveryMethodPickupInput @componentName(name: "sales") { + """ + The details of the pickup method to use. + """ + pickupOption: SubscriptionDeliveryMethodPickupOptionInput +} + +""" +Represents the selected pickup option on a subscription contract. +""" +type SubscriptionDeliveryMethodPickupOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + A custom reference to the delivery method for use with automations. + """ + code: String + + """ + The details displayed to the customer to describe the pickup option. + """ + description: String + + """ + The location where the customer will pick up the merchandise. + """ + location: Location! + + """ + The presentment title of the pickup option. + """ + presentmentTitle: String + + """ + The title of the pickup option. + """ + title: String +} + +""" +The input fields for pickup option. +""" +input SubscriptionDeliveryMethodPickupOptionInput @componentName(name: "sales") { + """ + A custom reference to the delivery method for use with automations. + """ + code: String + + """ + The details displayed to the customer to describe the pickup option. + """ + description: String + + """ + The ID of the pickup location. + """ + locationId: ID! @gidTypes(types: ["Location"]) + + """ + The presentment title of the pickup option. + """ + presentmentTitle: String + + """ + The title of the pickup option. + """ + title: String +} + +""" +Represents a shipping delivery method: a mailing address and a shipping option. +""" +type SubscriptionDeliveryMethodShipping @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + The address to ship to. + """ + address: MailingAddress! + + """ + The details of the shipping method to use. + """ + 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 @componentName(name: "sales") { + """ + The address to ship to. + """ + address: MailingAddressInput + + """ + The details of the shipping method to use. + """ + shippingOption: SubscriptionDeliveryMethodShippingOptionInput +} + +""" +Represents the selected shipping option on a subscription contract. +""" +type SubscriptionDeliveryMethodShippingOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The carrier service that's providing this shipping option. + This field isn't currently supported and returns null. + """ + carrierService: DeliveryCarrierService @deprecated(reason: "This field has never been implemented.") + + """ + The code of the shipping option. + """ + code: String + + """ + The description of the shipping option. + """ + description: String + + """ + The presentment title of the shipping option. + """ + presentmentTitle: String + + """ + The title of the shipping option. + """ + title: String +} + +""" +The input fields for shipping option. +""" +input SubscriptionDeliveryMethodShippingOptionInput @componentName(name: "sales") { + """ + The carrier service ID of the shipping option. + """ + carrierServiceId: ID @gidTypes(types: ["CarrierService"]) + + """ + The code of the shipping option. + """ + code: String + + """ + The description of the shipping option. + """ + description: String + + """ + The presentment title of the shipping option. + """ + presentmentTitle: String + + """ + The title of the shipping option. + """ + title: String +} + +""" +The delivery option for a subscription contract. +""" +union SubscriptionDeliveryOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionLocalDeliveryOption | SubscriptionPickupOption | SubscriptionShippingOption + +""" +The result of the query to fetch delivery options for the subscription contract. +""" +union SubscriptionDeliveryOptionResult @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionDeliveryOptionResultFailure | SubscriptionDeliveryOptionResultSuccess + +""" +A failure to find the available delivery options for a subscription contract. +""" +type SubscriptionDeliveryOptionResultFailure @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The reason for the failure. + """ + message: String +} + +""" +The delivery option for a subscription contract. +""" +type SubscriptionDeliveryOptionResultSuccess @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The available delivery options. + """ + deliveryOptions: [SubscriptionDeliveryOption!]! +} + +""" +Represents a Subscription Delivery Policy. +""" +type SubscriptionDeliveryPolicy @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchor!]! + + """ + The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). + """ + interval: SellingPlanInterval! + + """ + The number of delivery intervals between deliveries. + """ + intervalCount: Int! +} + +""" +The input fields for a Subscription Delivery Policy. +""" +input SubscriptionDeliveryPolicyInput @componentName(name: "sales") { + """ + The specific anchor dates upon which the delivery interval calculations should be made. + """ + anchors: [SellingPlanAnchorInput!] = [] + + """ + The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). + """ + interval: SellingPlanInterval! + + """ + The number of billing intervals between invoices. + """ + intervalCount: Int! +} + +""" +Subscription draft discount types. +""" +union SubscriptionDiscount @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionAppliedCodeDiscount | SubscriptionManualDiscount + +""" +Represents what a particular discount reduces from a line price. +""" +type SubscriptionDiscountAllocation @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + Allocation amount. + """ + amount: MoneyV2! + + """ + Discount that created the allocation. + """ + discount: SubscriptionDiscount! +} + +""" +An auto-generated type for paginating through multiple SubscriptionDiscounts. +""" +type SubscriptionDiscountConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SubscriptionDiscountEdge!]! + + """ + 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. + """ + nodes: [SubscriptionDiscount!]! + + """ + 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 SubscriptionDiscount and a cursor during pagination. +""" +type SubscriptionDiscountEdge @componentName(name: "sales") { + """ + 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 SubscriptionDiscountEdge. + """ + node: SubscriptionDiscount! +} + +""" +Represents the subscription lines the discount applies on. +""" +type SubscriptionDiscountEntitledLines @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + Specify whether the subscription discount will apply on all subscription lines. + """ + all: Boolean! + + """ + The list of subscription lines associated with the subscription discount. + """ + lines( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionLineConnection! +} + +""" +The value of the discount and how it will be applied. +""" +type SubscriptionDiscountFixedAmountValue @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The fixed amount value of the discount. + """ + amount: MoneyV2! + + """ + Whether the amount is applied per item. + """ + appliesOnEachItem: Boolean! +} + +""" +The percentage value of the discount. +""" +type SubscriptionDiscountPercentageValue @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The percentage value of the discount. + """ + percentage: Int! +} + +""" +The reason a discount on a subscription draft was rejected. +""" +enum SubscriptionDiscountRejectionReason @componentName(name: "sales") { + """ + Discount is inactive. + """ + CURRENTLY_INACTIVE + + """ + Given customer does not qualify for the discount. + """ + CUSTOMER_NOT_ELIGIBLE + + """ + Customer usage limit has been reached. + """ + CUSTOMER_USAGE_LIMIT_REACHED + + """ + Purchase type does not qualify for the discount. + """ + INCOMPATIBLE_PURCHASE_TYPE + + """ + Internal error during discount code validation. + """ + INTERNAL_ERROR + + """ + Discount code is not found. + """ + NOT_FOUND + + """ + Discount does not apply to any of the given line items. + """ + NO_ENTITLED_LINE_ITEMS + + """ + No applicable shipping lines. + """ + NO_ENTITLED_SHIPPING_LINES + + """ + Purchase amount of items does not qualify for the discount. + """ + PURCHASE_NOT_IN_RANGE + + """ + Quantity of items does not qualify for the discount. + """ + QUANTITY_NOT_IN_RANGE + + """ + Discount usage limit has been reached. + """ + USAGE_LIMIT_REACHED +} + +""" +The value of the discount and how it will be applied. +""" +union SubscriptionDiscountValue @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") = 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 @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + The billing cycle that the subscription contract will be associated with. + """ + billingCycle: SubscriptionBillingCycle + + """ + The billing policy for the subscription contract. + """ + billingPolicy: SubscriptionBillingPolicy! + + """ + The billing cycles of the contracts that will be concatenated to the subscription contract. + """ + concatenatedBillingCycles( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + 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 currency used for the subscription contract. + """ + currencyCode: CurrencyCode! + + """ + A list of the custom attributes to be added to the generated orders. + """ + customAttributes: [Attribute!]! + + """ + The customer to whom the subscription contract belongs. + """ + customer: Customer! + + """ + The customer payment method used for the subscription contract. + """ + customerPaymentMethod( + """ + Whether to show the customer's revoked payment method. + """ + showRevoked: Boolean = false + ): CustomerPaymentMethod + + """ + The delivery method for each billing of the subscription contract. + """ + deliveryMethod: SubscriptionDeliveryMethod + + """ + The available delivery options for a given delivery address. Returns `null` for pending requests. + """ + deliveryOptions( + """ + The address to deliver the subscription contract to. + """ + deliveryAddress: MailingAddressInput + ): SubscriptionDeliveryOptionResult + + """ + The delivery policy for the subscription contract. + """ + deliveryPolicy: SubscriptionDeliveryPolicy! + + """ + The delivery price for each billing the subscription contract. + """ + deliveryPrice: MoneyV2 + + """ + The list of subscription discounts which will be associated with the subscription contract. + """ + discounts( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionDiscountConnection! + + """ + The list of subscription discounts to be added to the subscription contract. + """ + discountsAdded( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionDiscountConnection! + + """ + The list of subscription discounts to be removed from the subscription contract. + """ + discountsRemoved( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionDiscountConnection! + + """ + The list of subscription discounts to be updated on the subscription contract. + """ + discountsUpdated( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionDiscountConnection! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The list of subscription lines which will be associated with the subscription contract. + """ + lines( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionLineConnection! + + """ + The list of subscription lines to be added to the subscription contract. + """ + linesAdded( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionLineConnection! + + """ + The list of subscription lines to be removed from the subscription contract. + """ + linesRemoved( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): SubscriptionLineConnection! + + """ + The next billing date for the subscription contract. + """ + nextBillingDate: DateTime + + """ + The note field that will be applied to the generated orders. + """ + note: String + + """ + The original subscription contract. + """ + originalContract: SubscriptionContract + + """ + Available Shipping Options for a given delivery address. Returns NULL for pending requests. + """ + shippingOptions( + """ + The address to delivery the subscription contract to. + """ + deliveryAddress: MailingAddressInput + ): SubscriptionShippingOptionResult @deprecated(reason: "Use `deliveryOptions` instead.") + + """ + The current status of the subscription contract. + """ + status: SubscriptionContractSubscriptionStatus +} + +""" +Return type for `subscriptionDraftCommit` mutation. +""" +type SubscriptionDraftCommitPayload @componentName(name: "platform") { + """ + The updated Subscription Contract object. + """ + contract: SubscriptionContract + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionDraftDiscountAdd` mutation. +""" +type SubscriptionDraftDiscountAddPayload @componentName(name: "platform") { + """ + The added Subscription Discount. + """ + discountAdded: SubscriptionManualDiscount + + """ + The Subscription Contract draft object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionDraftDiscountCodeApply` mutation. +""" +type SubscriptionDraftDiscountCodeApplyPayload @componentName(name: "platform") { + """ + The added subscription discount. + """ + appliedDiscount: SubscriptionAppliedCodeDiscount + + """ + The subscription contract draft object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionDraftDiscountRemove` mutation. +""" +type SubscriptionDraftDiscountRemovePayload @componentName(name: "platform") { + """ + The removed subscription draft discount. + """ + discountRemoved: SubscriptionDiscount + + """ + The subscription contract draft object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionDraftDiscountUpdate` mutation. +""" +type SubscriptionDraftDiscountUpdatePayload @componentName(name: "platform") { + """ + The updated Subscription Discount. + """ + discountUpdated: SubscriptionManualDiscount + + """ + The Subscription Contract draft object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Possible error codes that can be returned by `SubscriptionDraftUserError`. +""" +enum SubscriptionDraftErrorCode @componentName(name: "platform") { + """ + This line has already been removed. + """ + ALREADY_REMOVED + + """ + Cannot commit a contract draft with this mutation. Please use SubscriptionDraftCommit. + """ + BILLING_CYCLE_ABSENT + + """ + Billing policy cannot be updated for billing cycle contract drafts. + """ + BILLING_CYCLE_CONTRACT_DRAFT_BILLING_POLICY_INVALID + + """ + Delivery policy cannot be updated for billing cycle contract drafts. + """ + BILLING_CYCLE_CONTRACT_DRAFT_DELIVERY_POLICY_INVALID + + """ + Cannot commit a billing cycle contract draft with this mutation. Please use SubscriptionBillingCycleContractDraftCommit. + """ + BILLING_CYCLE_PRESENT + + """ + The input value is blank. + """ + BLANK + + """ + Subscription draft has been already committed. + """ + COMMITTED + + """ + Contract draft must be a billing cycle contract draft for contract concatenation. + """ + CONCATENATION_BILLING_CYCLE_CONTRACT_DRAFT_REQUIRED + + """ + Cannot concatenate a contract draft from subscriptionContractCreate mutation. + """ + CONCATENATION_UNCOMMITTED_CONTRACT_DRAFT + + """ + Currency is not enabled. + """ + CURRENCY_NOT_ENABLED + + """ + The customer doesn't exist. + """ + CUSTOMER_DOES_NOT_EXIST + + """ + The payment method customer must be the same as the contract customer. + """ + CUSTOMER_MISMATCH + + """ + Customer is scheduled for redaction or has been redacted. + """ + CUSTOMER_REDACTED + + """ + The after cycle attribute must be unique between cycle discounts. + """ + CYCLE_DISCOUNTS_UNIQUE_AFTER_CYCLE + + """ + Billing cycle selector cannot select billing cycle outside of index range. + """ + CYCLE_INDEX_OUT_OF_RANGE + + """ + Billing cycle selector requires exactly one of index or date to be provided. + """ + CYCLE_SELECTOR_VALIDATE_ONE_OF + + """ + Billing cycle selector cannot select billing cycle outside of start date range. + """ + CYCLE_START_DATE_OUT_OF_RANGE + + """ + The delivery method can't be blank if any lines require shipping. + """ + DELIVERY_METHOD_REQUIRED + + """ + The delivery policy interval must be a multiple of the billing policy interval. + """ + DELIVERY_MUST_BE_MULTIPLE_OF_BILLING + + """ + Concatenated contracts cannot contain duplicate subscription contracts. + """ + DUPLICATE_CONCATENATED_CONTRACTS + + """ + Maximum number of concatenated contracts on a billing cycle contract draft exceeded. + """ + EXCEEDED_MAX_CONCATENATED_CONTRACTS + + """ + 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 + + """ + Cannot update a subscription contract with a current or upcoming billing cycle contract edit. + """ + HAS_FUTURE_EDITS + + """ + The input value is invalid. + """ + INVALID + + """ + The adjustment value must the same type as the adjustment type. + """ + INVALID_ADJUSTMENT_TYPE + + """ + The adjustment value must be either fixed_value or percentage. + """ + INVALID_ADJUSTMENT_VALUE + + """ + Next billing date is invalid. + """ + INVALID_BILLING_DATE + + """ + Must have at least one line. + """ + INVALID_LINES + + """ + Note length is too long. + """ + INVALID_NOTE_LENGTH + + """ + 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 + + """ + Customer payment method is required. + """ + MISSING_CUSTOMER_PAYMENT_METHOD + + """ + The local delivery options must be set for local delivery. + """ + MISSING_LOCAL_DELIVERY_OPTIONS + + """ + The value is not an integer. + """ + NOT_AN_INTEGER + + """ + Value is not in range. + """ + NOT_IN_RANGE + + """ + Discount must have at least one entitled line. + """ + NO_ENTITLED_LINES + + """ + Input value is not present. + """ + PRESENCE + + """ + The maximum number of cycles must be greater than the minimum. + """ + SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES + + """ + Another operation updated the contract concurrently as the commit was in progress. + """ + STALE_CONTRACT + + """ + The input value is too long. + """ + TOO_LONG + + """ + The contract draft has too many discounts. + """ + TOO_MANY_DISCOUNTS + + """ + The contract draft has too many lines. + """ + TOO_MANY_LINES + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Billing cycle selector cannot select upcoming billing cycle past limit. + """ + UPCOMING_CYCLE_LIMIT_EXCEEDED +} + +""" +Return type for `subscriptionDraftFreeShippingDiscountAdd` mutation. +""" +type SubscriptionDraftFreeShippingDiscountAddPayload @componentName(name: "platform") { + """ + The added subscription free shipping discount. + """ + discountAdded: SubscriptionManualDiscount + + """ + The subscription contract draft object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionDraftFreeShippingDiscountUpdate` mutation. +""" +type SubscriptionDraftFreeShippingDiscountUpdatePayload @componentName(name: "platform") { + """ + The updated Subscription Discount. + """ + discountUpdated: SubscriptionManualDiscount + + """ + The Subscription Contract draft object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +The input fields required to create a Subscription Draft. +""" +input SubscriptionDraftInput @componentName(name: "sales") { + """ + The billing policy for the subscription contract. + """ + billingPolicy: SubscriptionBillingPolicyInput + + """ + A list of the custom attributes added to the subscription contract. + """ + customAttributes: [AttributeInput!] + + """ + The delivery method for the subscription contract. + """ + deliveryMethod: SubscriptionDeliveryMethodInput + + """ + The delivery policy for the subscription contract. + """ + deliveryPolicy: SubscriptionDeliveryPolicyInput + + """ + The shipping price for each renewal the subscription contract. + """ + deliveryPrice: Decimal + + """ + The next billing date for the subscription contract. + """ + nextBillingDate: DateTime + + """ + The note field that will be applied to the generated orders. + """ + note: String + + """ + The ID of the payment method to be used for the subscription contract. + """ + paymentMethodId: ID @gidTypes(types: ["CustomerPaymentMethod"]) + + """ + The current status of the subscription contract. + """ + status: SubscriptionContractSubscriptionStatus +} + +""" +Return type for `subscriptionDraftLineAdd` mutation. +""" +type SubscriptionDraftLineAddPayload @componentName(name: "platform") { + """ + The Subscription Contract draft object. + """ + draft: SubscriptionDraft + + """ + The added Subscription Line. + """ + lineAdded: SubscriptionLine + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionDraftLineRemove` mutation. +""" +type SubscriptionDraftLineRemovePayload @componentName(name: "platform") { + """ + The list of updated subscription discounts impacted by the removed line. + """ + discountsUpdated: [SubscriptionManualDiscount!] + + """ + The Subscription Contract draft object. + """ + draft: SubscriptionDraft + + """ + The removed Subscription Line. + """ + lineRemoved: SubscriptionLine + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionDraftLineUpdate` mutation. +""" +type SubscriptionDraftLineUpdatePayload @componentName(name: "platform") { + """ + The Subscription Contract draft object. + """ + draft: SubscriptionDraft + + """ + The updated Subscription Line. + """ + lineUpdated: SubscriptionLine + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Return type for `subscriptionDraftUpdate` mutation. +""" +type SubscriptionDraftUpdatePayload @componentName(name: "platform") { + """ + The Subscription Draft object. + """ + draft: SubscriptionDraft + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [SubscriptionDraftUserError!]! +} + +""" +Represents a Subscription Draft error. +""" +type SubscriptionDraftUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { + """ + The error code. + """ + code: SubscriptionDraftErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +The input fields for a subscription free shipping discount on a contract. +""" +input SubscriptionFreeShippingDiscountInput @componentName(name: "sales") { + """ + The maximum number of times the subscription free shipping discount will be applied on orders. + """ + recurringCycleLimit: Int + + """ + The title associated with the subscription free shipping discount. + """ + title: String +} + +""" +Gateway used for legacy subscription charges. +""" +type SubscriptionGateway implements Node @requiredAccess(scope: "`read_payment_settings` access scope or `read_customer_payment_methods` access scope.") @componentName(name: "payment_processing") { + """ + The status of the gateway. + """ + enabled: Boolean! + + """ + A globally-unique ID. + """ + id: ID! + + """ + Payment provider label. + """ + label: String! + + """ + Status of test mode for the gateway. + """ + testModeEnabled: Boolean! +} + +""" +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. + +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 SubscriptionLine @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { + """ + The origin contract of the line if it was concatenated from another contract. + """ + concatenatedOriginContract: SubscriptionContract + + """ + The price per unit for the subscription line in the contract's currency. + """ + currentPrice: MoneyV2! + + """ + List of custom attributes associated to the line item. + """ + customAttributes: [Attribute!]! + + """ + Discount allocations. + """ + discountAllocations: [SubscriptionDiscountAllocation!]! + + """ + The unique ID. + """ + id: ID! + + """ + Total line price including all discounts. + """ + lineDiscountedPrice: MoneyV2! + + """ + Describe the price changes of the line over time. + """ + pricingPolicy: SubscriptionPricingPolicy + + """ + The product ID associated with the subscription line. + """ + productId: ID + + """ + The quantity of the unit selected for the subscription line. + """ + quantity: Int! + + """ + Whether physical shipping is required for the variant. + """ + requiresShipping: Boolean! + + """ + 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. + """ + sellingPlanId: ID + + """ + 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. + """ + sellingPlanName: String + + """ + Variant SKU number of the item associated with the subscription line. + """ + sku: String + + """ + Whether the variant is taxable. + """ + taxable: Boolean! + + """ + Product title of the item associated with the subscription line. + """ + title: String! + + """ + The product variant ID associated with the subscription line. + """ + variantId: ID + + """ + The image associated with the line item's variant or product. + """ + variantImage: Image + + """ + Product variant title of the item associated with the subscription line. + """ + variantTitle: String +} + +""" +An auto-generated type for paginating through multiple SubscriptionLines. +""" +type SubscriptionLineConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SubscriptionLineEdge!]! + + """ + 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: [SubscriptionLine!]! + + """ + 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 SubscriptionLine and a cursor during pagination. +""" +type SubscriptionLineEdge @componentName(name: "sales") { + """ + 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 SubscriptionLineEdge. + """ + node: SubscriptionLine! +} + +""" +The input fields required to add a new subscription line to a contract. +""" +input SubscriptionLineInput @componentName(name: "sales") { + """ + The price of the product. + """ + currentPrice: Decimal! + + """ + The custom attributes for this subscription line. + """ + customAttributes: [AttributeInput!] + + """ + Describes expected price changes of the subscription line over time. + """ + pricingPolicy: SubscriptionPricingPolicyInput + + """ + The ID of the product variant the subscription line refers to. + """ + productVariantId: ID! @gidTypes(types: ["ProductVariant"]) + + """ + The quantity of the product. + """ + quantity: Int! + + """ + The selling plan for the subscription line. + """ + sellingPlanId: ID @gidTypes(types: ["SellingPlan"]) + + """ + The selling plan name for the subscription line. + + Defaults to using the selling plan's current name when not specified. + """ + sellingPlanName: String +} + +""" +The input fields required to update a subscription line on a contract. +""" +input SubscriptionLineUpdateInput @componentName(name: "sales") { + """ + The price of the product. + """ + currentPrice: Decimal + + """ + The custom attributes for this subscription line. + """ + customAttributes: [AttributeInput!] + + """ + Describes expected price changes of the subscription line over time. + """ + pricingPolicy: SubscriptionPricingPolicyInput + + """ + The ID of the product variant the subscription line refers to. + """ + productVariantId: ID @gidTypes(types: ["ProductVariant"]) + + """ + The quantity of the product. + """ + quantity: Int + + """ + The selling plan for the subscription line. + """ + sellingPlanId: ID @gidTypes(types: ["SellingPlan"]) + + """ + The selling plan name for the subscription line. + """ + sellingPlanName: String +} + +""" +A local delivery option for a subscription contract. +""" +type SubscriptionLocalDeliveryOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The code of the local delivery option. + """ + code: String! + + """ + The description of the local delivery option. + """ + description: String + + """ + Whether a phone number is required for the local delivery option. + """ + phoneRequired: Boolean! + + """ + The presentment title of the local delivery option. + """ + presentmentTitle: String + + """ + The price of the local delivery option. + """ + price: MoneyV2 + + """ + The title of the local delivery option. + """ + title: String! +} + +""" +Custom subscription discount. +""" +type SubscriptionManualDiscount @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + Entitled line items used to apply the subscription discount on. + """ + entitledLines: SubscriptionDiscountEntitledLines! + + """ + The unique ID. + """ + id: ID! + + """ + The maximum number of times the subscription discount will be applied on orders. + """ + recurringCycleLimit: Int + + """ + The reason that the discount on the subscription draft is rejected. + """ + rejectionReason: SubscriptionDiscountRejectionReason + + """ + Type of line the discount applies on. + """ + targetType: DiscountTargetType! + + """ + The title associated with the subscription discount. + """ + title: String + + """ + The type of the subscription discount. + """ + type: DiscountType! + + """ + The number of times the discount was applied. + """ + usageCount: Int! + + """ + The value of the subscription discount. + """ + value: SubscriptionDiscountValue! +} + +""" +An auto-generated type for paginating through multiple SubscriptionManualDiscounts. +""" +type SubscriptionManualDiscountConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [SubscriptionManualDiscountEdge!]! + + """ + 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: [SubscriptionManualDiscount!]! + + """ + 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 SubscriptionManualDiscount and a cursor during pagination. +""" +type SubscriptionManualDiscountEdge @componentName(name: "sales") { + """ + 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 SubscriptionManualDiscountEdge. + """ + node: SubscriptionManualDiscount! +} + +""" +The input fields for the subscription lines the discount applies on. +""" +input SubscriptionManualDiscountEntitledLinesInput @componentName(name: "sales") { + """ + Specify whether the subscription discount will apply on all subscription lines. + """ + all: Boolean + + """ + The ID of the lines to add to or remove from the subscription discount. + """ + lines: SubscriptionManualDiscountLinesInput +} + +""" +The input fields for the fixed amount value of the discount and distribution on the lines. +""" +input SubscriptionManualDiscountFixedAmountInput @componentName(name: "sales") { + """ + Fixed amount value. + """ + amount: Float + + """ + Whether the amount is intended per line item or once per subscription. + """ + appliesOnEachItem: Boolean +} + +""" +The input fields for a subscription discount on a contract. +""" +input SubscriptionManualDiscountInput @componentName(name: "sales") { + """ + Entitled line items used to apply the subscription discount on. + """ + entitledLines: SubscriptionManualDiscountEntitledLinesInput + + """ + The maximum number of times the subscription discount will be applied on orders. + """ + recurringCycleLimit: Int + + """ + The title associated with the subscription discount. + """ + title: String + + """ + Percentage or fixed amount value of the discount. + """ + value: SubscriptionManualDiscountValueInput +} + +""" +The input fields for line items that the discount refers to. +""" +input SubscriptionManualDiscountLinesInput @componentName(name: "sales") { + """ + The ID of the lines to add to the subscription discount. + """ + add: [ID!] @gidTypes(types: ["SubscriptionLine"]) + + """ + The ID of the lines to remove from the subscription discount. + """ + remove: [ID!] @gidTypes(types: ["SubscriptionLine"]) +} + +""" +The input fields for the discount value and its distribution. +""" +input SubscriptionManualDiscountValueInput @componentName(name: "sales") { + """ + Fixed amount input in the currency defined by the subscription. + """ + fixedAmount: SubscriptionManualDiscountFixedAmountInput + + """ + The percentage value of the discount. Value must be between 0 - 100. + """ + percentage: Int +} + +""" +Represents a payment gateway with its name and account ID for subscription migrations. +""" +type SubscriptionMigrationGateway @requiredAccess(scope: "The app must have read access to subscription migration gateways.") @componentName(name: "payment_processing") { + """ + The account ID associated with the payment gateway. + """ + accountId: String + + """ + Whether the payment gateway is the primary direct gateway for the shop. + """ + isPrimaryGateway: Boolean! + + """ + The name of the payment gateway. + """ + name: SubscriptionMigrationGatewayName! +} + +""" +The available payment gateways for subscription migrations. +""" +enum SubscriptionMigrationGatewayName @componentName(name: "payment_processing") { + """ + Adyen payment gateway. + """ + ADYEN + + """ + Authorize.net payment gateway. + """ + AUTHORIZE_NET + + """ + Braintree payment gateway. + """ + BRAINTREE + + """ + PayPal payment gateway. + """ + PAYPAL + + """ + Shopify Payments. + """ + SHOPIFY_PAYMENTS + + """ + Stripe payment gateway. + """ + STRIPE +} + +""" +A pickup option to deliver a subscription contract. +""" +type SubscriptionPickupOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The code of the pickup option. + """ + code: String! + + """ + The description of the pickup option. + """ + description: String + + """ + The pickup location. + """ + location: Location! + + """ + Whether a phone number is required for the pickup option. + """ + phoneRequired: Boolean! + + """ + The estimated amount of time it takes for the pickup to be ready. For example, "Usually ready in 24 hours".). + """ + pickupTime: String! + + """ + The presentment title of the pickup option. + """ + presentmentTitle: String + + """ + The price of the pickup option. + """ + price: MoneyV2 + + """ + The title of the pickup option. + """ + title: String! +} + +""" +Represents a Subscription Line Pricing Policy. +""" +type SubscriptionPricingPolicy @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The base price per unit for the subscription line in the contract's currency. + """ + basePrice: MoneyV2! + + """ + The adjustments per cycle for the subscription line. + """ + cycleDiscounts: [SubscriptionCyclePriceAdjustment!]! +} + +""" +The input fields for an array containing all pricing changes for each billing cycle. +""" +input SubscriptionPricingPolicyCycleDiscountsInput @componentName(name: "sales") { + """ + The price adjustment type. + """ + adjustmentType: SellingPlanPricingPolicyAdjustmentType! + + """ + The price adjustment value. + """ + adjustmentValue: SellingPlanPricingPolicyValueInput! + + """ + The cycle after which the pricing policy applies. + """ + afterCycle: Int! + + """ + 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 @componentName(name: "sales") { + """ + The base price per unit for the subscription line in the contract's currency. + """ + basePrice: Decimal! + + """ + An array containing all pricing changes for each billing cycle. + """ + cycleDiscounts: [SubscriptionPricingPolicyCycleDiscountsInput!]! +} + +""" +A shipping option to deliver a subscription contract. +""" +type SubscriptionShippingOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + The carrier service that's providing this shipping option. + This field isn't currently supported and returns null. + """ + carrierService: DeliveryCarrierService @deprecated(reason: "This field has never been implemented.") + + """ + The code of the shipping option. + """ + code: String! + + """ + The description of the shipping option. + """ + description: String + + """ + If a phone number is required for the shipping option. + """ + phoneRequired: Boolean + + """ + The presentment title of the shipping option. + """ + presentmentTitle: String + + """ + The price of the shipping option. + """ + price: MoneyV2 + + """ + The title of the shipping option. + """ + title: String! +} + +""" +The result of the query to fetch shipping options for the subscription contract. +""" +union SubscriptionShippingOptionResult @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionShippingOptionResultFailure | SubscriptionShippingOptionResultSuccess + +""" +Failure determining available shipping options for delivery of a subscription contract. +""" +type SubscriptionShippingOptionResultFailure @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + Failure reason. + """ + message: String +} + +""" +A shipping option for delivery of a subscription contract. +""" +type SubscriptionShippingOptionResultSuccess @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { + """ + Available shipping options. + """ + shippingOptions: [SubscriptionShippingOption!]! +} + +""" +A suggested transaction. Suggested transaction are usually used in the context of refunds +and exchanges. +""" +type SuggestedOrderTransaction @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { + """ + The masked account number associated with the payment method. + """ + accountNumber: String + + """ + The amount of the transaction. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The amount and currency of the suggested order transaction in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The human-readable payment gateway name suggested to process the transaction. + """ + formattedGateway: String + + """ + The suggested payment gateway used to process the transaction. + """ + gateway: String + + """ + Specifies the kind of the suggested order transaction. + """ + kind: SuggestedOrderTransactionKind! + + """ + Specifies the available amount to refund on the gateway. Only available within SuggestedRefund. + """ + maximumRefundable: Money @deprecated(reason: "Use `maximumRefundableSet` instead.") + + """ + Specifies the available amount to refund on the gateway in shop and + presentment currencies. Only available within SuggestedRefund. + """ + maximumRefundableSet: MoneyBag + + """ + The associated parent transaction, for example the authorization of a capture. + """ + parentTransaction: OrderTransaction + + """ + The associated payment details related to the transaction. + """ + paymentDetails: PaymentDetails + + """ + The types of refunds that the transaction supports. For example, if it's a + CARD_PRESENT_REFUND type, then the transaction requires chip data from reading + a physical card using a card reader to be refunded. Only available within + SuggestedRefund. + """ + supportedRefundType: TransactionSupportedRefundType! +} + +""" +Specifies the kind of the suggested order transaction. +""" +enum SuggestedOrderTransactionKind @componentName(name: "payment_processing") { + """ + A suggested refund transaction for an order. + """ + SUGGESTED_REFUND +} + +""" +The input fields for an exchange line item. +""" +input SuggestedOutcomeExchangeLineItemInput @componentName(name: "returns") { + """ + The ID of the exchange line item. + """ + id: ID! @gidTypes(types: ["ExchangeLineItem"]) + + """ + The quantity of the exchange line item. + """ + quantity: Int! +} + +""" +The input fields for a return line item. +""" +input SuggestedOutcomeReturnLineItemInput @componentName(name: "returns") { + """ + The ID of the return line item. + """ + id: ID! @gidTypes(types: ["ReturnLineItem"]) + + """ + The quantity of the return line item. + """ + quantity: Int! +} + +""" +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. + +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 SuggestedRefund @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { + """ + The total monetary value to be refunded. + """ + amount: Money! @deprecated(reason: "Use `amountSet` instead.") + + """ + The total monetary value to be refunded in shop and presentment currencies. + """ + amountSet: MoneyBag! + + """ + The sum of all the discounted prices of the line items being refunded. + """ + discountedSubtotalSet: MoneyBag! + + """ + The total monetary value available to refund. + """ + maximumRefundable: Money! @deprecated(reason: "Use `maximumRefundableSet` instead.") + + """ + The total monetary value available to refund in shop and presentment currencies. + """ + maximumRefundableSet: MoneyBag! + + """ + An array of additional fees that will be refunded to the customer. + """ + refundAdditionalFees: [RefundAdditionalFee!]! + + """ + A list of duties to be refunded from the order. + """ + refundDuties: [RefundDuty!]! + + """ + A list of line items to be refunded, along with restock instructions. + """ + refundLineItems: [RefundLineItem!]! + + """ + The shipping costs to be refunded from the order. + """ + shipping: ShippingRefund! + + """ + The sum of all the prices of the line items being refunded. + """ + subtotal: Money! @deprecated(reason: "Use `subtotalSet` instead.") + + """ + The sum of all the prices of the line items being refunded in shop and presentment currencies. + """ + subtotalSet: MoneyBag! + + """ + A list of suggested refund methods. + """ + suggestedRefundMethods: [SuggestedRefundMethod!]! + + """ + A list of suggested order transactions. + """ + suggestedTransactions: [SuggestedOrderTransaction!]! + + """ + The sum of all the additional fees being refunded from the order in shop and + presentment currencies. The value must be positive. + """ + totalAdditionalFeesSet: MoneyBag! + + """ + The total cart discount amount that was applied to all line items in this refund. + """ + totalCartDiscountAmountSet: MoneyBag! + + """ + The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. + """ + 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.") +} + +""" +Generic attributes of a suggested refund method. +""" +interface SuggestedRefundMethod @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { + """ + 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! +} + +""" +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. +""" +type SuggestedReturnFinancialOutcome @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + The sum of all the discounted prices of the line items being refunded. + """ + discountedSubtotal: MoneyBag! + + """ + The financial transfer details for the return outcome. + """ + financialTransfer: ReturnOutcomeFinancialTransfer + + """ + The total monetary value available to refund in shop and presentment currencies. + """ + maximumRefundable: MoneyBag! + + """ + A list of additional fees to be refunded from the order. + """ + refundAdditionalFees: [RefundAdditionalFee!]! + + """ + A list of duties to be refunded from the order. + """ + refundDuties: [RefundDuty!]! + + """ + The shipping costs to be refunded from the order. + """ + shipping: ShippingRefund! + + """ + The sum of all the additional fees being refunded in shop and presentment currencies. The value must be positive. + """ + totalAdditionalFees: MoneyBag! + + """ + The total cart discount amount that was applied to all line items in this refund. + """ + totalCartDiscountAmount: MoneyBag! + + """ + The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. + """ + totalDuties: MoneyBag! + + """ + The sum of the taxes being refunded in shop and presentment currencies. The value must be positive. + """ + 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope. Also: Requires the `read_returns` access scope.") @componentName(name: "returns") { + """ + The total monetary value to be refunded in shop and presentment currencies. + """ + amount: MoneyBag! + + """ + The sum of all the discounted prices of the line items being refunded. + """ + discountedSubtotal: MoneyBag! + + """ + The total monetary value available to refund in shop and presentment currencies. + """ + maximumRefundable: MoneyBag! + + """ + A list of additional fees to be refunded from the order. + """ + refundAdditionalFees: [RefundAdditionalFee!]! + + """ + A list of duties to be refunded from the order. + """ + refundDuties: [RefundDuty!]! + + """ + The shipping costs to be refunded from the order. + """ + shipping: ShippingRefund! + + """ + The sum of all the prices of the line items being refunded in shop and presentment currencies. + """ + subtotal: MoneyBag! + + """ + A list of suggested order transactions. + """ + suggestedTransactions: [SuggestedOrderTransaction!]! + + """ + The sum of all the additional fees being refunded in shop and presentment currencies. The value must be positive. + """ + totalAdditionalFees: MoneyBag! + + """ + The total cart discount amount that was applied to all line items in this refund. + """ + totalCartDiscountAmount: MoneyBag! + + """ + The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. + """ + totalDuties: MoneyBag! + + """ + The sum of the taxes being refunded in shop and presentment currencies. The value must be positive. + """ + totalTax: MoneyBag! +} + +""" +The suggested values for a refund to store credit. +""" +type SuggestedStoreCreditRefund implements SuggestedRefundMethod @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { + """ + The suggested amount to refund in shop and presentment currencies. + """ + amount: MoneyBag! + + """ + The suggested expiration date for the store credit. + """ + expiresAt: DateTime + + """ + The maximum available amount to refund in shop and presentment currencies. + """ + maximumRefundable: MoneyBag! +} + +""" +Return type for `tagsAdd` mutation. +""" +type TagsAddPayload @componentName(name: "platform") { + """ + The object that was updated. + """ + node: Node + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `tagsRemove` mutation. +""" +type TagsRemovePayload @componentName(name: "platform") { + """ + The object that was updated. + """ + node: Node + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Tax app configuration of a merchant. +""" +type TaxAppConfiguration @requiredAccess(scope: "`read_taxes` access scope. Also: The user must have access to manage taxes.") @componentName(name: "taxes") { + """ + State of the tax app configuration. + """ + state: TaxPartnerState! +} + +""" +Return type for `taxAppConfigure` mutation. +""" +type TaxAppConfigurePayload @componentName(name: "platform") { + """ + The updated tax app configuration. + """ + taxAppConfiguration: TaxAppConfiguration + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TaxAppConfigureUserError!]! +} + +""" +An error that occurs during the execution of `TaxAppConfigure`. +""" +type TaxAppConfigureUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: TaxAppConfigureUserErrorCode + + """ + 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 `TaxAppConfigureUserError`. +""" +enum TaxAppConfigureUserErrorCode @componentName(name: "platform") { + """ + Unable to update already active tax partner. + """ + TAX_PARTNER_ALREADY_ACTIVE + + """ + Unable to find the tax partner record. + """ + TAX_PARTNER_NOT_FOUND + + """ + Unable to update tax partner state. + """ + TAX_PARTNER_STATE_UPDATE_FAILED +} + +""" +Available customer tax exemptions. +""" +enum TaxExemption @componentName(name: "taxes") { + """ + This customer is exempt from GST taxes for holding a valid exemption. The + business customer should provide their GST number and account for the GST. + """ + AUSTRALIA_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in British Columbia. + """ + CA_BC_COMMERCIAL_FISHERY_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in British Columbia. + """ + CA_BC_CONTRACTOR_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in British Columbia. + """ + CA_BC_PRODUCTION_AND_MACHINERY_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in British Columbia. + """ + CA_BC_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in British Columbia. + """ + CA_BC_SUB_CONTRACTOR_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid DIPLOMAT_EXEMPTION in Canada. + """ + CA_DIPLOMAT_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Manitoba. + """ + CA_MB_COMMERCIAL_FISHERY_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Manitoba. + """ + CA_MB_FARMER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Manitoba. + """ + CA_MB_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Nova Scotia. + """ + CA_NS_COMMERCIAL_FISHERY_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Nova Scotia. + """ + CA_NS_FARMER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid PURCHASE_EXEMPTION in Ontario. + """ + CA_ON_PURCHASE_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Prince Edward Island. + """ + CA_PE_COMMERCIAL_FISHERY_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Saskatchewan. + """ + CA_SK_COMMERCIAL_FISHERY_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in Saskatchewan. + """ + CA_SK_CONTRACTOR_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Saskatchewan. + """ + CA_SK_FARMER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in Saskatchewan. + """ + CA_SK_PRODUCTION_AND_MACHINERY_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Saskatchewan. + """ + CA_SK_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in Saskatchewan. + """ + CA_SK_SUB_CONTRACTOR_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid STATUS_CARD_EXEMPTION in Canada. + """ + CA_STATUS_CARD_EXEMPTION + + """ + 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. + """ + EU_REVERSE_CHARGE_EXEMPTION_RULE + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Alaska. + """ + US_AK_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Alabama. + """ + US_AL_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Arkansas. + """ + US_AR_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Arizona. + """ + US_AZ_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in California. + """ + US_CA_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Colorado. + """ + US_CO_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Connecticut. + """ + US_CT_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Washington DC. + """ + US_DC_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Delaware. + """ + US_DE_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Florida. + """ + US_FL_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Georgia. + """ + US_GA_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Hawaii. + """ + US_HI_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Iowa. + """ + US_IA_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Idaho. + """ + US_ID_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Illinois. + """ + US_IL_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Indiana. + """ + US_IN_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Kansas. + """ + US_KS_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Kentucky. + """ + US_KY_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Louisiana. + """ + US_LA_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Massachusetts. + """ + US_MA_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Maryland. + """ + US_MD_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Maine. + """ + US_ME_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Michigan. + """ + US_MI_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Minnesota. + """ + US_MN_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Missouri. + """ + US_MO_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Mississippi. + """ + US_MS_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Montana. + """ + US_MT_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in North Carolina. + """ + US_NC_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in North Dakota. + """ + US_ND_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Nebraska. + """ + US_NE_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Hampshire. + """ + US_NH_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Jersey. + """ + US_NJ_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Mexico. + """ + US_NM_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Nevada. + """ + US_NV_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New York. + """ + US_NY_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Ohio. + """ + US_OH_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Oklahoma. + """ + US_OK_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Oregon. + """ + US_OR_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Pennsylvania. + """ + US_PA_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Rhode Island. + """ + US_RI_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in South Carolina. + """ + US_SC_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in South Dakota. + """ + US_SD_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Tennessee. + """ + US_TN_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Texas. + """ + US_TX_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Utah. + """ + US_UT_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Virginia. + """ + US_VA_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Vermont. + """ + US_VT_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Washington. + """ + US_WA_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wisconsin. + """ + US_WI_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in West Virginia. + """ + US_WV_RESELLER_EXEMPTION + + """ + This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wyoming. + """ + US_WY_RESELLER_EXEMPTION +} + +""" +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. + +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 @componentName(name: "sales") { + """ + Whether the channel that submitted the tax line is liable for remitting. A + value of null indicates unknown liability for this tax line. + """ + channelLiable: Boolean + + """ + The amount of tax, in shop currency, after discounts and before returns. + """ + price: Money! @deprecated(reason: "Use `priceSet` instead.") + + """ + The amount of tax, in shop and presentment currencies, after discounts and before returns. + """ + priceSet: MoneyBag! + + """ + The proportion of the line item price that the tax represents as a decimal. + """ + rate: Float + + """ + The proportion of the line item price that the tax represents as a percentage. + """ + ratePercentage: Float + + """ + The source of the tax. + """ + source: String + + """ + The name of the tax. + """ + title: String! +} + +""" +State of the tax app configuration. +""" +enum TaxPartnerState @componentName(name: "taxes") { + """ + App is configured and to be used for tax calculations. + """ + ACTIVE + + """ + App is not configured. + """ + PENDING + + """ + App is configured, but not used for tax calculations. + """ + READY +} + +""" +Tax settings for a customer. +""" +type TaxSettings @requiredAccess(scope: "`read_customers` access scope or `read_taxes` access scope.") @componentName(name: "taxes") { + """ + The customer's tax ID. + """ + taxId: String +} + +""" +Return type for `taxSummaryCreate` mutation. +""" +type TaxSummaryCreatePayload @componentName(name: "platform") { + """ + A list of orders that were successfully enqueued to create a tax summary. + """ + enqueuedOrders: [Order!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TaxSummaryCreateUserError!]! +} + +""" +An error that occurs during the execution of `TaxSummaryCreate`. +""" +type TaxSummaryCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: TaxSummaryCreateUserErrorCode + + """ + 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 `TaxSummaryCreateUserError`. +""" +enum TaxSummaryCreateUserErrorCode @componentName(name: "platform") { + """ + There was an error during enqueueing of the tax summary creation job(s). + """ + GENERAL_ERROR + + """ + No order was not found. + """ + ORDER_NOT_FOUND +} + +""" +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. + +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 @componentName(name: "merchandising") { + """ + 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. + """ + categories( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The ID of the category associated with the child categories to return. + """ + childrenOf: ID @gidTypes(types: ["Category"]) + + """ + The ID of the category associated with the descendant categories to return. + """ + descendantsOf: ID @gidTypes(types: ["Category"]) + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Searches the product taxonomy for matching categories. + """ + search: String + + """ + The ID of the category associated with the sibling categories to return. + """ + siblingsOf: ID @gidTypes(types: ["Category"]) + ): TaxonomyCategoryConnection! +} + +""" +A Shopify product taxonomy attribute. +""" +type TaxonomyAttribute implements Node @componentName(name: "merchandising") { + """ + A globally-unique ID. + """ + id: ID! +} + +""" +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. + +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 @componentName(name: "merchandising") { + """ + The IDs of the category's ancestor categories. + """ + ancestorIds: [ID!]! + + """ + The attributes of the taxonomy category. + """ + attributes( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + ): TaxonomyCategoryAttributeConnection! + + """ + The IDs of the category's child categories. + """ + childrenIds: [ID!]! + + """ + The full name of the taxonomy category. For example, Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Beds. + """ + fullName: String! + + """ + The globally-unique ID of the TaxonomyCategory. + """ + id: ID! + + """ + Whether the category is archived. The default value is `false`. + """ + isArchived: Boolean! + + """ + 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. + """ + isLeaf: Boolean! + + """ + 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. + """ + isRoot: Boolean! + + """ + 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. + """ + level: Int! + + """ + The name of the taxonomy category. For example, Dog Beds. + """ + name: String! + + """ + The ID of the category's parent category. + """ + parentId: ID +} + +""" +A product taxonomy attribute interface. +""" +union TaxonomyCategoryAttribute @componentName(name: "merchandising") = TaxonomyAttribute | TaxonomyChoiceListAttribute | TaxonomyMeasurementAttribute + +""" +An auto-generated type for paginating through multiple TaxonomyCategoryAttributes. +""" +type TaxonomyCategoryAttributeConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [TaxonomyCategoryAttributeEdge!]! + + """ + 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!]! + + """ + 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 TaxonomyCategoryAttribute and a cursor during pagination. +""" +type TaxonomyCategoryAttributeEdge @componentName(name: "merchandising") { + """ + 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 TaxonomyCategoryAttributeEdge. + """ + node: TaxonomyCategoryAttribute! +} + +""" +An auto-generated type for paginating through multiple TaxonomyCategories. +""" +type TaxonomyCategoryConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + 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! +} + +""" +An auto-generated type which holds one TaxonomyCategory and a cursor during pagination. +""" +type TaxonomyCategoryEdge @componentName(name: "merchandising") { + """ + 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 TaxonomyCategoryEdge. + """ + node: TaxonomyCategory! +} + +""" +A Shopify product taxonomy choice list attribute. +""" +type TaxonomyChoiceListAttribute implements Node @componentName(name: "merchandising") { + """ + The unique ID of the TaxonomyAttribute. + """ + id: ID! + + """ + The name of the product taxonomy attribute. For example, Color. + """ + name: String! + + """ + A list of values on the choice list attribute. + """ + values( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + ): TaxonomyValueConnection! +} + +""" +A Shopify product taxonomy measurement attribute. +""" +type TaxonomyMeasurementAttribute implements Node @componentName(name: "merchandising") { + """ + The unique ID of the TaxonomyAttribute. + """ + id: ID! + + """ + The name of the product taxonomy attribute. For example, Color. + """ + name: String! + + """ + The product taxonomy attribute options. + """ + options: [Attribute!]! +} + +""" +Represents a Shopify product taxonomy value. +""" +type TaxonomyValue implements Node @componentName(name: "merchandising") { + """ + A globally-unique ID. + """ + id: ID! + + """ + The name of the product taxonomy value. For example, Red. + """ + name: String! +} + +""" +An auto-generated type for paginating through multiple TaxonomyValues. +""" +type TaxonomyValueConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [TaxonomyValueEdge!]! + + """ + 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. + """ + nodes: [TaxonomyValue!]! + + """ + 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 TaxonomyValue and a cursor during pagination. +""" +type TaxonomyValueEdge @componentName(name: "merchandising") { + """ + 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 TaxonomyValueEdge. + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { + """ + The amount and currency of the tender transaction. + """ + amount: MoneyV2! + + """ + A globally-unique ID. + """ + id: ID! + + """ + The order that's related to the tender transaction. This value is null if the order has been deleted. + """ + order: Order + + """ + Information about the payment method used for the transaction. + """ + paymentMethod: String + + """ + Date and time when the transaction was processed. + """ + processedAt: DateTime + + """ + The remote gateway reference associated with the tender transaction. + """ + remoteReference: String + + """ + Whether the transaction is a test transaction. + """ + test: Boolean! + + """ + Information about the payment instrument used for the transaction. + """ + transactionDetails: TenderTransactionDetails + + """ + The staff member who performed the transaction. + """ + user: StaffMember +} + +""" +An auto-generated type for paginating through multiple TenderTransactions. +""" +type TenderTransactionConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [TenderTransactionEdge!]! + + """ + 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. + """ + nodes: [TenderTransaction!]! + + """ + An object that’s used to retrieve [cursor + information](https://shopify.dev/api/usage/pagination-graphql) about the current page. + """ + pageInfo: PageInfo! +} + +""" +Information about the credit card used for this transaction. +""" +type TenderTransactionCreditCardDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { + """ + The name of the company that issued the customer's credit card. Example: `Visa`. + """ + creditCardCompany: String + + """ + The customer's credit card number, with all digits except the last 4 redacted. Example: `•••• •••• •••• 1234` + """ + creditCardNumber: String +} + +""" +Information about the payment instrument used for this transaction. +""" +union TenderTransactionDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") = TenderTransactionCreditCardDetails + +""" +An auto-generated type which holds one TenderTransaction and a cursor during pagination. +""" +type TenderTransactionEdge @componentName(name: "payment_processing") { + """ + 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 TenderTransactionEdge. + """ + node: TenderTransaction! +} + +""" +Return type for `themeCreate` mutation. +""" +type ThemeCreatePayload @componentName(name: "platform") { + """ + The theme that was created. + """ + theme: OnlineStoreTheme + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ThemeCreateUserError!]! +} + +""" +An error that occurs during the execution of `ThemeCreate`. +""" +type ThemeCreateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ThemeCreateUserErrorCode + + """ + 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 `ThemeCreateUserError`. +""" +enum ThemeCreateUserErrorCode @componentName(name: "platform") { + """ + Invalid theme role for theme creation. + """ + INVALID_THEME_ROLE_FOR_THEME_CREATION + + """ + Must be a zip file. + """ + INVALID_ZIP + + """ + Theme creation is not allowed for your shop's plan. + """ + THEME_CREATION_NOT_ALLOWED_FOR_THEME_LIMITED_PLAN + + """ + Zip is empty. + """ + ZIP_IS_EMPTY + + """ + May not be used to fetch a file bigger + than 50MB. + """ + ZIP_TOO_LARGE +} + +""" +Return type for `themeDelete` mutation. +""" +type ThemeDeletePayload @componentName(name: "platform") { + """ + The ID of the deleted theme. + """ + deletedThemeId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ThemeDeleteUserError!]! +} + +""" +An error that occurs during the execution of `ThemeDelete`. +""" +type ThemeDeleteUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ThemeDeleteUserErrorCode + + """ + 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 `ThemeDeleteUserError`. +""" +enum ThemeDeleteUserErrorCode @componentName(name: "platform") { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +Return type for `themeDuplicate` mutation. +""" +type ThemeDuplicatePayload @componentName(name: "platform") { + """ + The newly duplicated theme. + """ + newTheme: OnlineStoreTheme + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ThemeDuplicateUserError!]! +} + +""" +An error that occurs during the execution of `ThemeDuplicate`. +""" +type ThemeDuplicateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ThemeDuplicateUserErrorCode + + """ + 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 `ThemeDuplicateUserError`. +""" +enum ThemeDuplicateUserErrorCode @componentName(name: "platform") { + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND +} + +""" +The input fields for the file copy. +""" +input ThemeFilesCopyFileInput @componentName(name: "online_store") { + """ + The new file where the content is copied to. + """ + dstFilename: String! + + """ + The source file to copy from. + """ + srcFilename: String! +} + +""" +Return type for `themeFilesCopy` mutation. +""" +type ThemeFilesCopyPayload @componentName(name: "platform") { + """ + The resulting theme files. + """ + copiedThemeFiles: [OnlineStoreThemeFileOperationResult!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OnlineStoreThemeFilesUserErrors!]! +} + +""" +Return type for `themeFilesDelete` mutation. +""" +type ThemeFilesDeletePayload @componentName(name: "platform") { + """ + The resulting theme files. + """ + deletedThemeFiles: [OnlineStoreThemeFileOperationResult!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OnlineStoreThemeFilesUserErrors!]! +} + +""" +Return type for `themeFilesUpsert` mutation. +""" +type ThemeFilesUpsertPayload @componentName(name: "platform") { + """ + The theme files write job triggered by the mutation. + """ + job: Job + + """ + The resulting theme files. + """ + upsertedThemeFiles: [OnlineStoreThemeFileOperationResult!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [OnlineStoreThemeFilesUserErrors!]! +} + +""" +Return type for `themePublish` mutation. +""" +type ThemePublishPayload @componentName(name: "platform") { + """ + The theme that was published. + """ + theme: OnlineStoreTheme + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ThemePublishUserError!]! +} + +""" +An error that occurs during the execution of `ThemePublish`. +""" +type ThemePublishUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ThemePublishUserErrorCode + + """ + 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 `ThemePublishUserError`. +""" +enum ThemePublishUserErrorCode @componentName(name: "platform") { + """ + Theme publishing is not available during install. + """ + CANNOT_PUBLISH_THEME_DURING_INSTALL + + """ + The record with the ID used as the input value couldn't be found. + """ + NOT_FOUND + + """ + Theme publishing is not allowed on this plan. + """ + THEME_PUBLISH_NOT_AVAILABLE_FOR_THEME_LIMITED_PLAN +} + +""" +The role of the theme. +""" +enum ThemeRole @componentName(name: "online_store") { + """ + 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. + """ + ARCHIVED + + """ + 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. + """ + DEMO + + """ + The theme is automatically created by the CLI for previewing purposes when in a development session. + """ + DEVELOPMENT + + """ + The theme is locked if it is identified as unlicensed. Customization and + publishing are restricted until the merchant resolves the licensing issue. + """ + LOCKED + + """ + The currently published theme. There can only be one main theme at any time. + """ + MAIN + + """ + The currently published theme that is only accessible to a mobile client. + """ + MOBILE @deprecated(reason: "The feature for this role has been deprecated.") + + """ + The theme is currently not published. It can be transitioned to the main role if it is published by the merchant. + """ + UNPUBLISHED +} + +""" +Return type for `themeUpdate` mutation. +""" +type ThemeUpdatePayload @componentName(name: "platform") { + """ + The theme that was updated. + """ + theme: OnlineStoreTheme + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ThemeUpdateUserError!]! +} + +""" +An error that occurs during the execution of `ThemeUpdate`. +""" +type ThemeUpdateUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: ThemeUpdateUserErrorCode + + """ + 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 `ThemeUpdateUserError`. +""" +enum ThemeUpdateUserErrorCode @componentName(name: "platform") { + """ + 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 +} + +""" +A sale associated with a tip. +""" +type TipSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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! +} + +""" +Represents duties that applied to the order. +""" +type TotalDuties @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { + """ + The amount of duties, in shop and presentment currencies. + """ + priceSet: MoneyBag! + + """ + The description of the duties. + """ + title: String +} + +""" +Transaction fee related to an order transaction. +""" +type TransactionFee implements Node @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") { + """ + Amount of the fee. + """ + amount: MoneyV2! + + """ + Flat rate charge for a transaction. + """ + flatFee: MoneyV2! + + """ + Name of the credit card flat fee. + """ + flatFeeName: String + + """ + A globally-unique ID. + """ + id: ID! + + """ + Percentage charge. + """ + rate: Decimal! + + """ + Name of the credit card rate. + """ + rateName: String + + """ + Tax amount charged on the fee. + """ + taxAmount: MoneyV2! + + """ + Name of the type of fee. + """ + type: String! +} + +""" +The set of valid sort keys for the Transaction query. +""" +enum TransactionSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `expires_at` value. + """ + EXPIRES_AT +} + +""" +The supported methods for processing a refund, indicating whether or not a physical card must be present. +""" +enum TransactionSupportedRefundType @componentName(name: "returns") { + """ + Refund without a physical card. + """ + CARD_NOT_PRESENT_REFUND + + """ + Refund requiring card present data. For example, the physical card and a + reader. Note: third party developers can't refund this type. + """ + CARD_PRESENT_REFUND +} + +""" +Return type for `transactionVoid` mutation. +""" +type TransactionVoidPayload @componentName(name: "platform") { + """ + The created void transaction. + """ + transaction: OrderTransaction + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TransactionVoidUserError!]! +} + +""" +An error that occurs during the execution of `TransactionVoid`. +""" +type TransactionVoidUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: TransactionVoidUserErrorCode + + """ + 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 `TransactionVoidUserError`. +""" +enum TransactionVoidUserErrorCode @componentName(name: "platform") { + """ + Transaction must be a successful authorization. + """ + AUTH_NOT_SUCCESSFUL + + """ + Transaction must be voidable. + """ + AUTH_NOT_VOIDABLE + + """ + A generic error occurred while attempting to void the transaction. + """ + GENERIC_ERROR + + """ + Transaction does not exist. + """ + TRANSACTION_NOT_FOUND +} + +""" +The set of valid sort keys for the Transfer query. +""" +enum TransferSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `destination_name` value. + """ + DESTINATION_NAME + + """ + Sort by the `expected_shipment_arrival` value. + """ + EXPECTED_SHIPMENT_ARRIVAL + + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `name` value. + """ + NAME + + """ + Sort by the `origin_name` value. + """ + ORIGIN_NAME + + """ + Sort by the `source_name` value. + """ + SOURCE_NAME + + """ + Sort by the `status` value. + """ + STATUS +} + +""" +Translatable content of a resource's field. +""" +type TranslatableContent @componentName(name: "markets") { + """ + Hash digest representation of the content value. + """ + digest: String + + """ + The resource field that's being translated. + """ + key: String! + + """ + Locale of the content. + """ + locale: String! + + """ + Type of the translatable content. + """ + type: LocalizableContentType! + + """ + Content value. + """ + 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 @requiredAccess(scope: "`read_translations` access scope.") @componentName(name: "markets") { + """ + Nested translatable resources under the current resource. + """ + nestedTranslatableResources( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Return only resources of a type. + """ + resourceType: TranslatableResourceType + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): TranslatableResourceConnection! + + """ + GID of the resource. + """ + resourceId: ID! + + """ + Translatable content. + """ + translatableContent( + """ + Filters translatable content by market ID. Use this argument to retrieve translatable content specific to a market. + """ + marketId: ID @gidTypes(types: ["Market"]) + ): [TranslatableContent!]! + + """ + Translatable content translations (includes unpublished locales). + """ + translations( + """ + Filters translations by locale. + """ + locale: String! + + """ + Filters translations by market ID. Use this argument to retrieve content specific to a market. + """ + marketId: ID @gidTypes(types: ["Market"]) + + """ + Filters by outdated translations. + """ + outdated: Boolean + ): [Translation!]! +} + +""" +An auto-generated type for paginating through multiple TranslatableResources. +""" +type TranslatableResourceConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [TranslatableResourceEdge!]! + + """ + 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. + """ + nodes: [TranslatableResource!]! + + """ + 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 TranslatableResource and a cursor during pagination. +""" +type TranslatableResourceEdge @componentName(name: "markets") { + """ + 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 TranslatableResourceEdge. + """ + node: TranslatableResource! +} + +""" +Specifies the type of resources that are translatable. +""" +enum TranslatableResourceType @componentName(name: "markets") { + """ + A blog post. Translatable fields: `title`, `body_html`, `summary_html`, `handle`, `meta_title`, `meta_description`. + """ + ARTICLE + + """ + An article image. Translatable fields: `alt`. + """ + ARTICLE_IMAGE + + """ + A blog. Translatable fields: `title`, `handle`, `meta_title`, `meta_description`. + """ + BLOG + + """ + A product collection. Translatable fields: `title`, `body_html`, `handle`, `meta_title`, `meta_description`. + """ + COLLECTION + + """ + A collection image. Translatable fields: `alt`. + """ + COLLECTION_IMAGE + + """ + The shop's cookie banner. Translatable fields: `policy_link_text`, `title`, + `text`, `button_prefs_open_text`, `button_accept_text`, `button_decline_text`, + `preferences_title`, `preferences_intro_title`, `preferences_intro_text`, + `preferences_button_accept_text`, `preferences_button_decline_text`, + `preferences_button_save_text`, `preferences_bullet_points_title`, + `preferences_bullet_points_first_text`, + `preferences_bullet_points_second_text`, + `preferences_bullet_points_third_text`, `preferences_purposes_essential_name`, + `preferences_purposes_essential_desc`, + `preferences_purposes_performance_name`, + `preferences_purposes_performance_desc`, + `preferences_purposes_preferences_name`, + `preferences_purposes_preferences_desc`, + `preferences_purposes_marketing_name`, `preferences_purposes_marketing_desc`, + `policy_link_url`. + """ + COOKIE_BANNER + + """ + The delivery method definition. For example, "Standard", or "Expedited". Translatable fields: `name`, `description`. + """ + DELIVERY_METHOD_DEFINITION + + """ + An email template. Translatable fields: `title`, `body_html`. + """ + EMAIL_TEMPLATE + + """ + A filter. Translatable fields: `label`. + """ + FILTER + + """ + A link to direct users. Translatable fields: `title`. + """ + LINK + + """ + An image. Translatable fields: `alt`. + """ + MEDIA_IMAGE + + """ + A category of links. Translatable fields: `title`. + """ + MENU + + """ + A Metafield. Translatable fields: `value`. + """ + METAFIELD + + """ + A Metaobject. Translatable fields are determined by the Metaobject type. + """ + METAOBJECT + + """ + An online store theme. Translatable fields: `dynamic keys based on theme data`. + """ + ONLINE_STORE_THEME + + """ + A theme app embed. Translatable fields: `dynamic keys based on theme data`. + """ + ONLINE_STORE_THEME_APP_EMBED + + """ + A theme json template. Translatable fields: `dynamic keys based on theme data`. + """ + ONLINE_STORE_THEME_JSON_TEMPLATE + + """ + Locale file content of an online store theme. Translatable fields: `dynamic keys based on theme data`. + """ + ONLINE_STORE_THEME_LOCALE_CONTENT + + """ + A theme json section group. Translatable fields: `dynamic keys based on theme data`. + """ + ONLINE_STORE_THEME_SECTION_GROUP + + """ + A theme setting category. Translatable fields: `dynamic keys based on theme data`. + """ + ONLINE_STORE_THEME_SETTINGS_CATEGORY + + """ + Shared static sections of an online store theme. Translatable fields: `dynamic keys based on theme data`. + """ + ONLINE_STORE_THEME_SETTINGS_DATA_SECTIONS + + """ + A packing slip template. Translatable fields: `body`. + """ + PACKING_SLIP_TEMPLATE + + """ + A page. Translatable fields: `title`, `body_html`, `handle`, `meta_title`, `meta_description`. + """ + PAGE + + """ + A payment gateway. Translatable fields: `name`, `message`, `before_payment_instructions`. + """ + PAYMENT_GATEWAY + + """ + An online store product. Translatable fields: `title`, `body_html`, `handle`, + `product_type`, `meta_title`, `meta_description`. + """ + PRODUCT + + """ + An online store custom product property name. For example, "Size", "Color", or "Material". + Translatable fields: `name`. + """ + PRODUCT_OPTION + + """ + The product option value names. For example, "Red", "Blue", and "Green" for a "Color" option. Translatable fields: `name`. + """ + PRODUCT_OPTION_VALUE + + """ + A selling plan. Translatable fields:`name`, `option1`, `option2`, `option3`, `description`. + """ + SELLING_PLAN + + """ + A selling plan group. Translatable fields: `name`, `option1`, `option2`, `option3`. + """ + SELLING_PLAN_GROUP + + """ + A shop. Translatable fields: `meta_title`, `meta_description`. + """ + SHOP + + """ + A shop policy. Translatable fields: `body`. + """ + SHOP_POLICY +} + +""" +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. + +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. + +Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). +""" +type Translation @componentName(name: "markets") { + """ + On the resource that this translation belongs to, the reference to the value being translated. + """ + key: String! + + """ + ISO code of the translation locale. + """ + locale: String! + + """ + The market that the translation is specific to. Null value means the translation is available in all markets. + """ + market: Market + + """ + Whether the original content has changed since this translation was updated. + """ + outdated: Boolean! + + """ + The date and time when the translation was updated. + """ + updatedAt: DateTime + + """ + Translation value. + """ + value: String +} + +""" +Possible error codes that can be returned by `TranslationUserError`. +""" +enum TranslationErrorCode @componentName(name: "platform") { + """ + The input value is blank. + """ + BLANK + + """ + Translation value is invalid. + """ + FAILS_RESOURCE_VALIDATION + + """ + The input value is invalid. + """ + INVALID + + """ + Locale language code is invalid. + """ + INVALID_CODE + + """ + Locale code format is invalid. + """ + INVALID_FORMAT + + """ + Translation key is invalid. + """ + INVALID_KEY_FOR_MODEL + + """ + The locale is missing on the market corresponding to the `marketId` argument. + """ + 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") + + """ + Locale is invalid for the shop. + """ + INVALID_LOCALE_FOR_SHOP + + """ + Market localizable content is invalid. + """ + INVALID_MARKET_LOCALIZABLE_CONTENT + + """ + Translatable content is invalid. + """ + INVALID_TRANSLATABLE_CONTENT + + """ + The handle is already taken for this resource. + """ + INVALID_VALUE_FOR_HANDLE_TRANSLATION + + """ + The shop isn't allowed to operate on market custom content. + """ + MARKET_CUSTOM_CONTENT_NOT_ALLOWED + + """ + The market corresponding to the `marketId` argument doesn't exist. + """ + MARKET_DOES_NOT_EXIST + + """ + The market override locale creation failed. + """ + MARKET_LOCALE_CREATION_FAILED + + """ + Resource does not exist. + """ + RESOURCE_NOT_FOUND + + """ + The specified resource can't be customized for a market. + """ + RESOURCE_NOT_MARKET_CUSTOMIZABLE + + """ + Resource is not translatable. + """ + RESOURCE_NOT_TRANSLATABLE + + """ + Too many translation keys for the resource. + """ + TOO_MANY_KEYS_FOR_RESOURCE +} + +""" +The input fields and values for creating or updating a translation. +""" +input TranslationInput @componentName(name: "markets") { + """ + On the resource that this translation belongs to, the reference to the value being translated. + """ + key: String! + + """ + ISO code of the locale being translated into. Only locales returned in `shopLocales` are valid. + """ + locale: String! + + """ + 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. + """ + marketId: ID @gidTypes(types: ["Market"]) + + """ + Hash digest representation of the content being translated. + """ + translatableContentDigest: String! + + """ + The value of the translation. + """ + value: String! +} + +""" +Represents an error that happens during the execution of a translation mutation. +""" +type TranslationUserError implements DisplayableError @requiredAccess(scope: "`read_translations` access scope.") @componentName(name: "markets") { + """ + The error code. + """ + code: TranslationErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Return type for `translationsRegister` mutation. +""" +type TranslationsRegisterPayload @componentName(name: "platform") { + """ + The translations that were created or updated. + """ + translations: [Translation!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TranslationUserError!]! +} + +""" +Return type for `translationsRemove` mutation. +""" +type TranslationsRemovePayload @componentName(name: "platform") { + """ + The translations that were deleted. + """ + translations: [Translation!] + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [TranslationUserError!]! +} + +""" +Represents a typed custom attribute. +""" +type TypedAttribute @componentName(name: "sales") { + """ + Key or name of the attribute. + """ + 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 @componentName(name: "merchant_marketing") { + """ + The name of the UTM campaign. + """ + campaign: String! + + """ + The UTM campaign medium. + """ + medium: String! + + """ + The name of the website or application where the referral link exists. + """ + source: String! +} + +""" +Represents a set of UTM parameters. +""" +type UTMParameters @componentName(name: "merchant_marketing") @protectedObject(subject: "customer") { + """ + The name of a marketing campaign. + """ + campaign: String + + """ + 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. + """ + content: String + + """ + The medium of a marketing campaign, such as a banner or email newsletter. + """ + medium: String + + """ + The source of traffic to the merchant's store, such as Google or an email newsletter. + """ + source: String + + """ + Paid search terms used by a marketing campaign. + """ + term: String +} + +""" +The input fields that identify a unique valued metafield. +""" +input UniqueMetafieldValueInput @componentName(name: "content") { + """ + The key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + + """ + The value of the metafield. + """ + value: String! +} + +""" +The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). +""" +type UnitPriceMeasurement @componentName(name: "merchandising") { + """ + 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 input fields for the measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). +""" +input UnitPriceMeasurementInput @componentName(name: "merchandising") { + """ + 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 @componentName(name: "merchandising") { + """ + Unit of measurements representing areas. + """ + AREA + + """ + Unit of measurements representing counts. + """ + COUNT + + """ + Unit of measurements representing lengths. + """ + LENGTH + + """ + The type of measurement is unknown. Upgrade to the latest version of the API to resolve this type. + """ + UNKNOWN + + """ + Unit of measurements representing volumes. + """ + VOLUME + + """ + Unit of measurements representing weights. + """ + WEIGHT +} + +""" +The valid units of measurement for a unit price measurement. +""" +enum UnitPriceMeasurementMeasuredUnit @componentName(name: "merchandising") { + """ + 100 centiliters equals 1 liter. + """ + CL + + """ + 100 centimeters equals 1 meter. + """ + CM + + """ + Imperial system unit of volume (U.S. customary unit). + """ + FLOZ + + """ + 1 foot equals 12 inches. + """ + FT + + """ + Imperial system unit of area. + """ + FT2 + + """ + Metric system unit of weight. + """ + G + + """ + 1 gallon equals 128 fluid ounces (U.S. customary unit). + """ + GAL + + """ + Imperial system unit of length. + """ + IN + + """ + 1 item, a unit of count. + """ + ITEM + + """ + 1 kilogram equals 1000 grams. + """ + KG + + """ + Metric system unit of volume. + """ + L + + """ + Imperial system unit of weight. + """ + LB + + """ + Metric system unit of length. + """ + M + + """ + Metric system unit of area. + """ + M2 + + """ + 1 cubic meter equals 1000 liters. + """ + M3 + + """ + 1000 milligrams equals 1 gram. + """ + MG + + """ + 1000 milliliters equals 1 liter. + """ + ML + + """ + 1000 millimeters equals 1 meter. + """ + MM + + """ + 16 ounces equals 1 pound. + """ + OZ + + """ + 1 pint equals 16 fluid ounces (U.S. customary unit). + """ + PT + + """ + 1 quart equals 32 fluid ounces (U.S. customary unit). + """ + QT + + """ + The unit of measurement is unknown. Upgrade to the latest version of the API to resolve this unit. + """ + UNKNOWN + + """ + 1 yard equals 36 inches. + """ + YD +} + +""" +Systems of weights and measures. +""" +enum UnitSystem @componentName(name: "platform") { + """ + Imperial system of weights and measures. + """ + IMPERIAL_SYSTEM + + """ + Metric system of weights and measures. + """ + 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { + """ + 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! +} + +""" +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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { + """ + 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 total price of the unverified return line item. + """ + totalPrice: MoneyV2! + + """ + The unit price of the unverified return line item. + """ + unitPrice: MoneyV2! + + """ + The quantity that has't been processed. + """ + unprocessedQuantity: Int! +} + +""" +The input fields required to update a media object. +""" +input UpdateMediaInput @componentName(name: "merchandising") { + """ + The alt text associated to the media. + """ + alt: String + + """ + Specifies the media to update. + """ + id: ID! @gidTypes(types: ["Media"]) + + """ + The source from which to update the media preview image. May be an external URL or staged upload URL. + """ + previewImageSource: String +} + +""" +The URL redirect for the online store. +""" +type UrlRedirect implements Node @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { + """ + The ID of the URL redirect. + """ + id: ID! + + """ + The old path to be redirected from. When the user visits this path, they will be redirected to the target location. + """ + path: String! + + """ + The target location where the user will be redirected to. + """ + target: String! +} + +""" +Return type for `urlRedirectBulkDeleteAll` mutation. +""" +type UrlRedirectBulkDeleteAllPayload @componentName(name: "platform") { + """ + The asynchronous job removing the redirects. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +Return type for `urlRedirectBulkDeleteByIds` mutation. +""" +type UrlRedirectBulkDeleteByIdsPayload @componentName(name: "platform") { + """ + The asynchronous job removing the redirects. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectBulkDeleteByIdsUserError!]! +} + +""" +An error that occurs during the execution of `UrlRedirectBulkDeleteByIds`. +""" +type UrlRedirectBulkDeleteByIdsUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: UrlRedirectBulkDeleteByIdsUserErrorCode + + """ + 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 `UrlRedirectBulkDeleteByIdsUserError`. +""" +enum UrlRedirectBulkDeleteByIdsUserErrorCode @componentName(name: "platform") { + """ + You must pass one or more [`URLRedirect`]( + https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect + ) object IDs. + """ + IDS_EMPTY +} + +""" +Return type for `urlRedirectBulkDeleteBySavedSearch` mutation. +""" +type UrlRedirectBulkDeleteBySavedSearchPayload @componentName(name: "platform") { + """ + The asynchronous job removing the redirects. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectBulkDeleteBySavedSearchUserError!]! +} + +""" +An error that occurs during the execution of `UrlRedirectBulkDeleteBySavedSearch`. +""" +type UrlRedirectBulkDeleteBySavedSearchUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: UrlRedirectBulkDeleteBySavedSearchUserErrorCode + + """ + 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 `UrlRedirectBulkDeleteBySavedSearchUserError`. +""" +enum UrlRedirectBulkDeleteBySavedSearchUserErrorCode @componentName(name: "platform") { + """ + The saved search's query cannot match all entries or be empty. + """ + INVALID_SAVED_SEARCH_QUERY + + """ + Saved search not found. + """ + SAVED_SEARCH_NOT_FOUND +} + +""" +Return type for `urlRedirectBulkDeleteBySearch` mutation. +""" +type UrlRedirectBulkDeleteBySearchPayload @componentName(name: "platform") { + """ + The asynchronous job removing the redirects. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectBulkDeleteBySearchUserError!]! +} + +""" +An error that occurs during the execution of `UrlRedirectBulkDeleteBySearch`. +""" +type UrlRedirectBulkDeleteBySearchUserError implements DisplayableError @componentName(name: "platform") { + """ + The error code. + """ + code: UrlRedirectBulkDeleteBySearchUserErrorCode + + """ + 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 `UrlRedirectBulkDeleteBySearchUserError`. +""" +enum UrlRedirectBulkDeleteBySearchUserErrorCode @componentName(name: "platform") { + """ + Invalid search string. + """ + INVALID_SEARCH_ARGUMENT +} + +""" +An auto-generated type for paginating through multiple UrlRedirects. +""" +type UrlRedirectConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [UrlRedirectEdge!]! + + """ + 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. + """ + nodes: [UrlRedirect!]! + + """ + 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 `urlRedirectCreate` mutation. +""" +type UrlRedirectCreatePayload @componentName(name: "platform") { + """ + The created redirect. + """ + urlRedirect: UrlRedirect + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectUserError!]! +} + +""" +Return type for `urlRedirectDelete` mutation. +""" +type UrlRedirectDeletePayload @componentName(name: "platform") { + """ + The ID of the deleted redirect. + """ + deletedUrlRedirectId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectUserError!]! +} + +""" +An auto-generated type which holds one UrlRedirect and a cursor during pagination. +""" +type UrlRedirectEdge @componentName(name: "online_store") { + """ + 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 UrlRedirectEdge. + """ + node: UrlRedirect! +} + +""" +Possible error codes that can be returned by `UrlRedirectUserError`. +""" +enum UrlRedirectErrorCode @componentName(name: "platform") { + """ + Redirect could not be created. + """ + CREATE_FAILED + + """ + Redirect could not be deleted. + """ + DELETE_FAILED + + """ + Redirect does not exist. + """ + DOES_NOT_EXIST + + """ + Redirect could not be updated. + """ + UPDATE_FAILED +} + +""" +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. + +For more information, see [`url-redirect`](https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect)s. +""" +type UrlRedirectImport implements Node @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { + """ + The number of rows in the file. + """ + count: Int + + """ + The number of redirects created from the import. + """ + createdCount: Int + + """ + The number of redirects that failed to be imported. + """ + failedCount: Int + + """ + Whether the import is finished. + """ + finished: Boolean! + + """ + The date and time when the import finished. + """ + finishedAt: DateTime + + """ + The ID of the `UrlRedirectImport` object. + """ + id: ID! + + """ + A list of up to three previews of the URL redirects to be imported. + """ + previewRedirects: [UrlRedirectImportPreview!]! + + """ + The number of redirects updated during the import. + """ + updatedCount: Int +} + +""" +Return type for `urlRedirectImportCreate` mutation. +""" +type UrlRedirectImportCreatePayload @componentName(name: "platform") { + """ + The created `URLRedirectImport` object. + """ + urlRedirectImport: UrlRedirectImport + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectImportUserError!]! +} + +""" +Possible error codes that can be returned by `UrlRedirectImportUserError`. +""" +enum UrlRedirectImportErrorCode @componentName(name: "platform") { + """ + The import has already completed. + """ + ALREADY_IMPORTED + + """ + CSV file does not exist at given URL. + """ + FILE_DOES_NOT_EXIST @deprecated(reason: "This error code is never returned") + + """ + The import is already in progress. + """ + IN_PROGRESS + + """ + URL redirect import not found. + """ + NOT_FOUND +} + +""" +A preview of a URL redirect import row. +""" +type UrlRedirectImportPreview @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { + """ + The old path to be redirected from. When the user visits this path, they will be redirected to the target location. + """ + path: String! + + """ + The target location where the user will be redirected to. + """ + target: String! +} + +""" +Return type for `urlRedirectImportSubmit` mutation. +""" +type UrlRedirectImportSubmitPayload @componentName(name: "platform") { + """ + The asynchronous job importing the redirects. + """ + job: Job + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectImportUserError!]! +} + +""" +Represents an error that happens during execution of a redirect import mutation. +""" +type UrlRedirectImportUserError implements DisplayableError @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { + """ + The error code. + """ + code: UrlRedirectImportErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +The input fields to create or update a URL redirect. +""" +input UrlRedirectInput @componentName(name: "online_store") { + """ + The old path to be redirected from. When the user visits this path, they will be redirected to the target location. + """ + path: String + + """ + The target location where the user will be redirected to. + """ + target: String +} + +""" +The set of valid sort keys for the UrlRedirect query. +""" +enum UrlRedirectSortKeys @componentName(name: "platform") { + """ + Sort by the `id` value. + """ + ID + + """ + Sort by the `path` value. + """ + PATH + + """ + 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 +} + +""" +Return type for `urlRedirectUpdate` mutation. +""" +type UrlRedirectUpdatePayload @componentName(name: "platform") { + """ + Returns the updated URL redirect. + """ + urlRedirect: UrlRedirect + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UrlRedirectUserError!]! +} + +""" +Represents an error that happens during execution of a redirect mutation. +""" +type UrlRedirectUserError implements DisplayableError @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { + """ + The error code. + """ + code: UrlRedirectErrorCode + + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + 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 @componentName(name: "platform") { + """ + The path to the input field that caused the error. + """ + field: [String!] + + """ + The error message. + """ + message: String! +} + +""" +Time between UTC time and a location's observed time, in the format `"+HH:MM"` or `"-HH:MM"`. + +Example value: `"-07:00"`. +""" +scalar UtcOffset + +""" +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 @requiredAccess(scope: "`read_validations` access scope.") @componentName(name: "checkouts") { + """ + Whether the validation should block on failures other than expected violations. + """ + blockOnFailure: Boolean! + + """ + Whether the validation is enabled on the merchant checkout. + """ + enabled: Boolean! + + """ + The error history on the most recent version of the validation function. + """ + errorHistory: FunctionsErrorHistory + + """ + Global ID for the validation. + """ + 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 key for the metafield. + """ + key: String! + + """ + The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + """ + namespace: String + ): Metafield + + """ + List of metafield definitions. + """ + metafieldDefinitions( + """ + The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + Filter metafield definitions by namespace. + """ + namespace: String + + """ + Filter by the definition's pinned status. + """ + pinnedStatus: MetafieldDefinitionPinnedStatus = ANY + + """ + A filter made up of terms, connectives, modifiers, and comparators. + | name | type | description | acceptable_values | default_value | example_use | + | ---- | ---- | ---- | ---- | ---- | ---- | + | default | string | Filter by a case-insensitive search of multiple fields + in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | + | 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` | + | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | + | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) + field. | | | - `key:some-key` | + | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) + field. | | | - `namespace:some-namespace` | + | 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` | + | 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` | + | 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` | + You can apply one or more filters to a query. Learn more about [Shopify API + search syntax](https://shopify.dev/api/usage/search-syntax). + """ + query: 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 + ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + after: String + + """ + The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). + """ + before: String + + """ + The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + first: Int + + """ + List of keys of metafields in the format `namespace.key`, will be returned in the same format. + """ + keys: [String!] + + """ + The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). + """ + last: Int + + """ + The metafield namespace to filter by. If omitted, all metafields are returned. + """ + namespace: String + + """ + Reverse the order of the underlying list. + """ + reverse: Boolean = false + ): MetafieldConnection! + + """ + The metafields associated with the resource matching the supplied list of namespaces and keys. + """ + metafieldsByIdentifiers( + """ + The list of metafields to retrieve by namespace and key. + """ + identifiers: [HasMetafieldsIdentifier!]! + ): [Metafield]! + + """ + The Shopify Function implementing the validation. + """ + shopifyFunction: ShopifyFunction! + + """ + The merchant-facing validation name. + """ + title: String! +} + +""" +An auto-generated type for paginating through multiple Validations. +""" +type ValidationConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [ValidationEdge!]! + + """ + 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. + """ + nodes: [Validation!]! + + """ + 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 install a validation. +""" +input ValidationCreateInput @componentName(name: "checkouts") { + """ + Whether the validation should block on failures other than expected violations. + """ + blockOnFailure: Boolean = false + + """ + Whether the validation should be live on the merchant checkout. + """ + enable: Boolean = false + + """ + The function handle representing the extension to install. + """ + functionHandle: String + + """ + The function ID representing the extension to install. + """ + functionId: String @deprecated(reason: "Use `functionHandle` instead.") + + """ + Additional metafields to associate to the validation. + """ + metafields: [MetafieldInput!] = [] + + """ + The title of the validation. + """ + title: String +} + +""" +Return type for `validationCreate` mutation. +""" +type ValidationCreatePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ValidationUserError!]! + + """ + The created validation. + """ + validation: Validation +} + +""" +Return type for `validationDelete` mutation. +""" +type ValidationDeletePayload @componentName(name: "platform") { + """ + Returns the deleted validation ID. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ValidationUserError!]! +} + +""" +An auto-generated type which holds one Validation and a cursor during pagination. +""" +type ValidationEdge @componentName(name: "checkouts") { + """ + 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 ValidationEdge. + """ + node: Validation! +} + +""" +The set of valid sort keys for the Validation query. +""" +enum ValidationSortKeys @componentName(name: "platform") { + """ + Sort by the `id` value. + """ + ID +} + +""" +The input fields required to update a validation. +""" +input ValidationUpdateInput @componentName(name: "checkouts") { + """ + Whether the validation should block on failures other than expected violations. + """ + blockOnFailure: Boolean = false + + """ + Whether the validation should be live on the merchant checkout. + """ + enable: Boolean = false + + """ + Additional metafields to associate to the validation. + """ + metafields: [MetafieldInput!] = [] + + """ + The title of the validation. + """ + title: String +} + +""" +Return type for `validationUpdate` mutation. +""" +type ValidationUpdatePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ValidationUserError!]! + + """ + The updated validation. + """ + validation: Validation +} + +""" +An error that occurs during the execution of a validation mutation. +""" +type ValidationUserError implements DisplayableError @requiredAccess(scope: "`read_validations` access scope.") @componentName(name: "checkouts") { + """ + The error code. + """ + code: ValidationUserErrorCode + + """ + 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 `ValidationUserError`. +""" +enum ValidationUserErrorCode @componentName(name: "platform") { + """ + ApiPermission metafields can only be created or updated by the app owner. + """ + APP_NOT_AUTHORIZED + + """ + The input value is blank. + """ + BLANK + + """ + The metafield violates a capability restriction. + """ + CAPABILITY_VIOLATION + + """ + Shop must be on a Shopify Plus plan to activate functions from a custom app. + """ + CUSTOM_APP_FUNCTION_NOT_ELIGIBLE + + """ + Owner type can't be used in this mutation. + """ + DISALLOWED_OWNER_TYPE + + """ + Function does not implement the required interface for this cart & checkout validation. + """ + FUNCTION_DOES_NOT_IMPLEMENT + + """ + Function not found. + """ + FUNCTION_NOT_FOUND + + """ + Function is pending deletion. + """ + FUNCTION_PENDING_DELETION + + """ + The input value isn't included in the list. + """ + INCLUSION + + """ + An internal error occurred. + """ + INTERNAL_ERROR + + """ + The input value is invalid. + """ + INVALID + + """ + The type is invalid. + """ + INVALID_TYPE + + """ + The value is invalid for the metafield type or for the definition options. + """ + INVALID_VALUE + + """ + Cannot have more than 25 active validation functions. + """ + MAX_VALIDATIONS_ACTIVATED + + """ + 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 + + """ + Validation not found. + """ + NOT_FOUND + + """ + The input value needs to be blank. + """ + PRESENT + + """ + Only unlisted apps can be used for this cart & checkout validation. + """ + PUBLIC_APP_NOT_ALLOWED + + """ + The input value is already taken. + """ + TAKEN + + """ + The input value is too long. + """ + TOO_LONG + + """ + The input value is too short. + """ + TOO_SHORT + + """ + Unstructured reserved namespace. + """ + UNSTRUCTURED_RESERVED_NAMESPACE +} + +""" +The input fields required to create or modify a product variant's option value. +""" +input VariantOptionValueInput @componentName(name: "merchandising") { + """ + Specifies the product option value by ID. + """ + id: ID @gidTypes(types: ["ProductOptionValue"]) + + """ + Metafield value associated with an option. + """ + linkedMetafieldValue: String + + """ + Specifies the product option value by name. + """ + name: String + + """ + Specifies the product option by ID. + """ + optionId: ID @gidTypes(types: ["ProductOption"]) + + """ + Specifies the product option by name. + """ + optionName: String +} + +""" +Represents a credit card payment instrument. +""" +type VaultCreditCard @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + The billing address of the card. + """ + billingAddress: CustomerCreditCardBillingAddress + + """ + The brand for the card. + """ + brand: String! + + """ + Whether the card has been expired. + """ + expired: Boolean! + + """ + The expiry month of the card. + """ + expiryMonth: Int! + + """ + The expiry year of the card. + """ + expiryYear: Int! + + """ + The last four digits for the card. + """ + lastDigits: String! + + """ + The name of the card holder. + """ + name: String! @protectedField(subject: "customer", content: "name") +} + +""" +Represents a paypal billing agreement payment instrument. +""" +type VaultPaypalBillingAgreement @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { + """ + Whether the paypal billing agreement is inactive. + """ + inactive: Boolean! + + """ + The paypal account name. + """ + name: String! @protectedField(subject: "customer", content: "name") + + """ + The paypal account email address. + """ + paypalAccountEmail: String! @protectedField(subject: "customer", content: "email") +} + +""" +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 Vector3 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { + """ + The x coordinate of Vector3. + """ + x: Float! + + """ + The y coordinate of Vector3. + """ + y: Float! + + """ + The z coordinate of Vector3. + """ + z: Float! +} + +""" +Represents a Shopify hosted video. +""" +type Video implements File & Media & Node @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + 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! + + """ + 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). + """ + duration: Int + + """ + Any errors that have occurred on the file. + """ + fileErrors: [FileError!]! + + """ + The status of the file. + """ + fileStatus: FileStatus! + + """ + The video'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 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). + """ + originalSource: VideoSource + + """ + The preview image for the media. + """ + preview: MediaPreviewImage + + """ + 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). + """ + sources: [VideoSource!]! + + """ + Current status of the media. + """ + status: MediaStatus! + + """ + Status resulting from the latest update operation. See fileErrors for details. + """ + updateStatus: FileStatus + + """ + The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. + """ + updatedAt: DateTime! +} + +""" +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. + +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 VideoSource @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { + """ + The video source's file size in bytes. + """ + fileSize: Int + + """ + The video source's file format extension. + """ + format: String! + + """ + The video source's height. + """ + height: Int! + + """ + The video source's MIME type. + """ + mimeType: String! + + """ + The video source's URL. + """ + url: String! + + """ + The video source's width. + """ + width: Int! +} + +""" +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 WebPixel implements Node @requiredAccess(scope: "`read_pixels` access scope.") @componentName(name: "merchant_marketing") { + """ + The current data sharing state of the pixel. + """ + dataSharingState: PixelDataSharingState! + + """ + A globally-unique ID. + """ + id: ID! + + """ + 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`. + """ + settings: JSON! +} + +""" +Return type for `webPixelCreate` mutation. +""" +type WebPixelCreatePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsWebPixelUserError!]! + + """ + The created web pixel settings. + """ + webPixel: WebPixel +} + +""" +Return type for `webPixelDelete` mutation. +""" +type WebPixelDeletePayload @componentName(name: "platform") { + """ + The ID of the web pixel settings that was deleted. + """ + deletedWebPixelId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsWebPixelUserError!]! +} + +""" +The input fields for creating or updating a web pixel. +""" +input WebPixelInput @componentName(name: "merchant_marketing") { + """ + 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`. + """ + settings: JSON! +} + +""" +Return type for `webPixelUpdate` mutation. +""" +type WebPixelUpdatePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [ErrorsWebPixelUserError!]! + + """ + The updated web pixel settings. + """ + webPixel: WebPixel +} + +""" +The input fields used to create a web presence. +""" +input WebPresenceCreateInput @componentName(name: "markets") { + """ + The alternate locales for the web presence. + """ + alternateLocales: [String!] + + """ + The default locale for the web presence. + """ + defaultLocale: String! + + """ + The web presence's domain ID. This field must be `null` if the `subfolderSuffix` isn't `null`. + """ + domainId: ID @gidTypes(types: ["Domain"]) + + """ + 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 `webPresenceCreate` mutation. +""" +type WebPresenceCreatePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! + + """ + The created web presence object. + """ + webPresence: MarketWebPresence +} + +""" +Return type for `webPresenceDelete` mutation. +""" +type WebPresenceDeletePayload @componentName(name: "platform") { + """ + The ID of the deleted web presence. + """ + deletedId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! +} + +""" +The input fields used to update a web presence. +""" +input WebPresenceUpdateInput @componentName(name: "markets") { + """ + The alternate locales for the web presence. + """ + alternateLocales: [String!] + + """ + The default locale for the web presence. + """ + defaultLocale: 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 subfolder suffix is not already defined for the web presence. + """ + subfolderSuffix: String +} + +""" +Return type for `webPresenceUpdate` mutation. +""" +type WebPresenceUpdatePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [MarketUserError!]! + + """ + The web presence object. + """ + webPresence: MarketWebPresence +} + +""" +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. + +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 @componentName(name: "apps") { + """ + The ARN of this EventBridge partner event source. + """ + 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 @componentName(name: "apps") { + """ + The URL to which the webhooks events are sent. + """ + 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 @componentName(name: "apps") { + """ + The Google Cloud Pub/Sub project ID. + """ + pubSubProject: String! + + """ + The Google Cloud Pub/Sub topic ID. + """ + pubSubTopic: String! +} + +""" +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 WebhookSubscription implements LegacyInteroperability & Node @componentName(name: "apps") { + """ + The Admin API version that Shopify uses to serialize webhook events. This + value is inherited from the app that created the webhook subscription. + """ + apiVersion: ApiVersion! + + """ + The destination URI to which the webhook subscription will send a message when an event occurs. + """ + callbackUrl: URL! @deprecated(reason: "Use `uri` instead.") + + """ + The date and time when the webhook subscription was created. + """ + createdAt: DateTime! + + """ + The endpoint to which the webhook subscription will send events. + """ + endpoint: WebhookSubscriptionEndpoint! @deprecated(reason: "Use `uri` instead.") + + """ + 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 format in which the webhook subscription should send the data. + """ + format: WebhookSubscriptionFormat! + + """ + A globally-unique ID. + """ + id: ID! + + """ + 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!]! + + """ + The ID of the corresponding resource in the REST Admin API. + """ + legacyResourceId: UnsignedInt64! + + """ + The list of namespaces for any metafields that should be included in the webhook subscription. + """ + metafieldNamespaces: [String!]! + + """ + The list of identifiers specifying metafields to include in the webhook subscription. + """ + metafields: [WebhookSubscriptionMetafieldIdentifier!]! + + """ + A human-readable name for the webhook subscription. + """ + name: String + + """ + 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. + """ + topic: WebhookSubscriptionTopic! + + """ + The date and time when the webhook subscription was updated. + """ + updatedAt: DateTime! + + """ + The URI to which the webhook subscription will send events. + """ + uri: String! +} + +""" +An auto-generated type for paginating through multiple WebhookSubscriptions. +""" +type WebhookSubscriptionConnection @componentName(name: "platform") { + """ + The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. + """ + edges: [WebhookSubscriptionEdge!]! + + """ + 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. + """ + nodes: [WebhookSubscription!]! + + """ + 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 `webhookSubscriptionCreate` mutation. +""" +type WebhookSubscriptionCreatePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! + + """ + The webhook subscription that was created. + """ + webhookSubscription: WebhookSubscription +} + +""" +Return type for `webhookSubscriptionDelete` mutation. +""" +type WebhookSubscriptionDeletePayload @componentName(name: "platform") { + """ + The ID of the deleted webhook subscription. + """ + deletedWebhookSubscriptionId: ID + + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! +} + +""" +An auto-generated type which holds one WebhookSubscription and a cursor during pagination. +""" +type WebhookSubscriptionEdge @componentName(name: "apps") { + """ + 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 WebhookSubscriptionEdge. + """ + node: WebhookSubscription! +} + +""" +An endpoint to which webhook subscriptions send webhooks events. +""" +union WebhookSubscriptionEndpoint @componentName(name: "apps") = WebhookEventBridgeEndpoint | WebhookHttpEndpoint | WebhookPubSubEndpoint + +""" +The supported formats for webhook subscriptions. +""" +enum WebhookSubscriptionFormat @componentName(name: "apps") { + JSON + XML +} + +""" +The input fields for a webhook subscription. +""" +input WebhookSubscriptionInput @componentName(name: "apps") { + """ + URL where the webhook subscription should send the POST request when the event occurs. + """ + callbackUrl: URL @deprecated(reason: "Use `uri` instead.") + + """ + 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 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!] + + """ + 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!] + + """ + A human-readable name for the webhook subscription. + """ + name: String + + """ + 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. + """ + uri: String +} + +""" +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 @componentName(name: "apps") { + """ + 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 set of valid sort keys for the WebhookSubscription query. +""" +enum WebhookSubscriptionSortKeys @componentName(name: "platform") { + """ + Sort by the `created_at` value. + """ + CREATED_AT + + """ + Sort by the `id` value. + """ + ID +} + +""" +The supported topics for webhook subscriptions. You can use webhook subscriptions to receive +notifications about particular events in a shop. + +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 @componentName(name: "apps") { + """ + The webhook topic for `app_purchases_one_time/update` events. Occurs whenever a one-time app charge is updated. + """ + APP_PURCHASES_ONE_TIME_UPDATE + + """ + 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. + """ + APP_SCOPES_UPDATE + + """ + 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. + """ + APP_SUBSCRIPTIONS_APPROACHING_CAPPED_AMOUNT + + """ + The webhook topic for `app_subscriptions/update` events. Occurs whenever an app subscription is updated. + """ + APP_SUBSCRIPTIONS_UPDATE + + """ + The webhook topic for `app/uninstalled` events. Occurs whenever a shop has uninstalled the app. + """ + APP_UNINSTALLED + + """ + 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. + """ + ATTRIBUTED_SESSIONS_FIRST @privatelyDocumented + + """ + 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. + """ + ATTRIBUTED_SESSIONS_LAST @privatelyDocumented + + """ + 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. + """ + AUDIT_EVENTS_ADMIN_API_ACTIVITY + + """ + The webhook topic for `bulk_operations/finish` events. Notifies when a Bulk Operation finishes. + """ + BULK_OPERATIONS_FINISH + + """ + 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. + """ + CARTS_CREATE + + """ + 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. + """ + CARTS_UPDATE + + """ + The webhook topic for `channels/delete` events. Occurs whenever a channel is + deleted. Requires the `read_publications` scope. + """ + CHANNELS_DELETE + + """ + The webhook topic for `checkouts/create` events. Occurs whenever a checkout is created. Requires the `read_orders` scope. + """ + CHECKOUTS_CREATE + + """ + The webhook topic for `checkouts/delete` events. Occurs whenever a checkout is deleted. Requires the `read_orders` scope. + """ + CHECKOUTS_DELETE + + """ + The webhook topic for `checkouts/paid` events. Occurs whenever a checkout is paid. Requires the `read_orders` scope. + """ + CHECKOUTS_PAID + + """ + The webhook topic for `checkouts/update` events. Occurs whenever a checkout is updated. Requires the `read_orders` scope. + """ + CHECKOUTS_UPDATE + + """ + The webhook topic for `checkout_and_accounts_configurations/update` events. + The event occurs whenever a published checkout and account configuration is updated. + """ + CHECKOUT_AND_ACCOUNTS_CONFIGURATIONS_UPDATE @privatelyDocumented + + """ + The webhook topic for `collections/create` events. Occurs whenever a + collection is created. Requires the `read_products` scope. + """ + COLLECTIONS_CREATE + + """ + The webhook topic for `collections/delete` events. Occurs whenever a + collection is deleted. Requires the `read_products` scope. + """ + COLLECTIONS_DELETE + + """ + 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. + """ + COLLECTIONS_UPDATE + + """ + The webhook topic for `collection_listings/add` events. Occurs whenever a + collection listing is added. Requires the `read_product_listings` scope. + """ + COLLECTION_LISTINGS_ADD + + """ + The webhook topic for `collection_listings/remove` events. Occurs whenever a + collection listing is removed. Requires the `read_product_listings` scope. + """ + COLLECTION_LISTINGS_REMOVE + + """ + The webhook topic for `collection_listings/update` events. Occurs whenever a + collection listing is updated. Requires the `read_product_listings` scope. + """ + COLLECTION_LISTINGS_UPDATE + + """ + The webhook topic for `collection_publications/create` events. Occurs whenever + a collection publication listing is created. Requires the `read_publications` scope. + """ + COLLECTION_PUBLICATIONS_CREATE + + """ + The webhook topic for `collection_publications/delete` events. Occurs whenever + a collection publication listing is deleted. Requires the `read_publications` scope. + """ + COLLECTION_PUBLICATIONS_DELETE + + """ + The webhook topic for `collection_publications/update` events. Occurs whenever + a collection publication listing is updated. Requires the `read_publications` scope. + """ + COLLECTION_PUBLICATIONS_UPDATE + + """ + 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. + """ + COMPANIES_CREATE + + """ + 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. + """ + COMPANIES_DELETE + + """ + 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. + """ + COMPANIES_UPDATE + + """ + 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. + """ + COMPANY_CONTACTS_CREATE + + """ + 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. + """ + COMPANY_CONTACTS_DELETE + + """ + 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. + """ + COMPANY_CONTACTS_UPDATE + + """ + 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. + """ + COMPANY_CONTACT_ROLES_ASSIGN + + """ + 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. + """ + COMPANY_CONTACT_ROLES_REVOKE + + """ + 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. + """ + COMPANY_LOCATIONS_CREATE + + """ + 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. + """ + COMPANY_LOCATIONS_DELETE + + """ + 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. + """ + COMPANY_LOCATIONS_UPDATE + + """ + The webhook topic for `customers/create` events. Occurs whenever a customer is + created. Requires the `read_customers` scope. + """ + CUSTOMERS_CREATE + + """ + The webhook topic for `customers/delete` events. Occurs whenever a customer is + deleted. Requires the `read_customers` scope. + """ + CUSTOMERS_DELETE + + """ + The webhook topic for `customers/disable` events. Occurs whenever a customer + account is disabled. Requires the `read_customers` scope. + """ + CUSTOMERS_DISABLE + + """ + 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. + """ + CUSTOMERS_EMAIL_MARKETING_CONSENT_UPDATE + + """ + The webhook topic for `customers/enable` events. Occurs whenever a customer + account is enabled. Requires the `read_customers` scope. + """ + CUSTOMERS_ENABLE + + """ + The webhook topic for `customers_marketing_consent/update` events. Occurs + whenever a customer's SMS marketing consent is updated. Requires the + `read_customers` scope. + """ + CUSTOMERS_MARKETING_CONSENT_UPDATE + + """ + The webhook topic for `customers/merge` events. Triggers when two customers + are merged Requires the `read_customer_merge` scope. + """ + CUSTOMERS_MERGE + + """ + The webhook topic for `customers/purchasing_summary` events. Occurs when a + customer sales history change. Requires the `read_customers` scope. + """ + CUSTOMERS_PURCHASING_SUMMARY + + """ + The webhook topic for `customers/update` events. Occurs whenever a customer is + updated. Requires the `read_customers` scope. + """ + CUSTOMERS_UPDATE + + """ + The webhook topic for `customer_account_settings/update` events. Triggers when merchants change customer account setting. + """ + CUSTOMER_ACCOUNT_SETTINGS_UPDATE + + """ + The webhook topic for `customer_behavior_tracking_preferences/update` events. + Triggers when data sharing level is created or updated. + """ + CUSTOMER_BEHAVIOR_TRACKING_PREFERENCES_UPDATE @privatelyDocumented + + """ + The webhook topic for `customer_groups/create` events. Occurs whenever a + customer saved search is created. Requires the `read_customers` scope. + """ + CUSTOMER_GROUPS_CREATE + + """ + The webhook topic for `customer_groups/delete` events. Occurs whenever a + customer saved search is deleted. Requires the `read_customers` scope. + """ + CUSTOMER_GROUPS_DELETE + + """ + The webhook topic for `customer_groups/update` events. Occurs whenever a + customer saved search is updated. Requires the `read_customers` scope. + """ + CUSTOMER_GROUPS_UPDATE + + """ + The webhook topic for `customer.joined_segment` events. Triggers when a + customer joins a segment. Requires the `read_customers` scope. + """ + CUSTOMER_JOINED_SEGMENT + + """ + The webhook topic for `customer.left_segment` events. Triggers when a customer + leaves a segment. Requires the `read_customers` scope. + """ + CUSTOMER_LEFT_SEGMENT + + """ + The webhook topic for `customer_payment_methods/create` events. Occurs + whenever a customer payment method is created. Requires the + `read_customer_payment_methods` scope. + """ + CUSTOMER_PAYMENT_METHODS_CREATE + + """ + The webhook topic for `customer_payment_methods/revoke` events. Occurs + whenever a customer payment method is revoked. Requires the + `read_customer_payment_methods` scope. + """ + CUSTOMER_PAYMENT_METHODS_REVOKE + + """ + The webhook topic for `customer_payment_methods/update` events. Occurs + whenever a customer payment method is updated. Requires the + `read_customer_payment_methods` scope. + """ + CUSTOMER_PAYMENT_METHODS_UPDATE + + """ + The webhook topic for `customer.tags_added` events. Triggers when tags are + added to a customer. Requires the `read_customers` scope. + """ + CUSTOMER_TAGS_ADDED + + """ + The webhook topic for `customer.tags_removed` events. Triggers when tags are + removed from a customer. Requires the `read_customers` scope. + """ + CUSTOMER_TAGS_REMOVED + + """ + The webhook topic for `delivery_promise_settings/update` events. Occurs when a + promise setting is updated. Requires the `read_shipping` scope. + """ + DELIVERY_PROMISE_SETTINGS_UPDATE + + """ + The webhook topic for `discounts/create` events. Occurs whenever a discount is + created. Requires the `read_discounts` scope. + """ + DISCOUNTS_CREATE + + """ + The webhook topic for `discounts/delete` events. Occurs whenever a discount is + deleted. Requires the `read_discounts` scope. + """ + DISCOUNTS_DELETE + + """ + The webhook topic for `discounts/redeemcode_added` events. Occurs whenever a + redeem code is added to a code discount. Requires the `read_discounts` scope. + """ + DISCOUNTS_REDEEMCODE_ADDED + + """ + The webhook topic for `discounts/redeemcode_removed` events. Occurs whenever a + redeem code on a code discount is deleted. Requires the `read_discounts` scope. + """ + DISCOUNTS_REDEEMCODE_REMOVED + + """ + The webhook topic for `discounts/update` events. Occurs whenever a discount is + updated. Requires the `read_discounts` scope. + """ + DISCOUNTS_UPDATE + + """ + The webhook topic for `disputes/create` events. Occurs whenever a dispute is + created. Requires the `read_shopify_payments_disputes` scope. + """ + DISPUTES_CREATE + + """ + The webhook topic for `disputes/update` events. Occurs whenever a dispute is + updated. Requires the `read_shopify_payments_disputes` scope. + """ + DISPUTES_UPDATE + + """ + The webhook topic for `domains/create` events. Occurs whenever a domain is created. + """ + DOMAINS_CREATE + + """ + The webhook topic for `domains/destroy` events. Occurs whenever a domain is destroyed. + """ + DOMAINS_DESTROY + + """ + The webhook topic for `domains/update` events. Occurs whenever a domain is updated. + """ + DOMAINS_UPDATE + + """ + The webhook topic for `draft_orders/create` events. Occurs whenever a draft + order is created. Requires the `read_draft_orders` scope. + """ + DRAFT_ORDERS_CREATE + + """ + The webhook topic for `draft_orders/delete` events. Occurs whenever a draft + order is deleted. Requires the `read_draft_orders` scope. + """ + DRAFT_ORDERS_DELETE + + """ + The webhook topic for `draft_orders/update` events. Occurs whenever a draft + order is updated. Requires the `read_draft_orders` scope. + """ + DRAFT_ORDERS_UPDATE + + """ + 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. + """ + FINANCE_APP_STAFF_MEMBER_DELETE + + """ + 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. + """ + FINANCE_APP_STAFF_MEMBER_GRANT + + """ + 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. + """ + FINANCE_APP_STAFF_MEMBER_REVOKE + + """ + 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. + """ + FINANCE_APP_STAFF_MEMBER_UPDATE + + """ + 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. + """ + FINANCE_KYC_INFORMATION_UPDATE + + """ + 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. + """ + FULFILLMENTS_CREATE + + """ + 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. + """ + FULFILLMENTS_UPDATE + + """ + The webhook topic for `fulfillment_events/create` events. Occurs whenever a + fulfillment event is created. Requires the `read_fulfillments` scope. + """ + FULFILLMENT_EVENTS_CREATE + + """ + The webhook topic for `fulfillment_events/delete` events. Occurs whenever a + fulfillment event is deleted. Requires the `read_fulfillments` scope. + """ + FULFILLMENT_EVENTS_DELETE + + """ + 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. + """ + FULFILLMENT_HOLDS_ADDED + + """ + 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. + """ + FULFILLMENT_HOLDS_RELEASED + + """ + 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. + """ + FULFILLMENT_ORDERS_CANCELLATION_REQUEST_ACCEPTED + + """ + 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. + """ + FULFILLMENT_ORDERS_CANCELLATION_REQUEST_REJECTED + + """ + 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. + """ + FULFILLMENT_ORDERS_CANCELLATION_REQUEST_SUBMITTED + + """ + 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. + """ + FULFILLMENT_ORDERS_CANCELLED + + """ + 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. + """ + FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_ACCEPTED + + """ + 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. + """ + FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_REJECTED + + """ + 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. + """ + FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_SUBMITTED + + """ + 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. + """ + FULFILLMENT_ORDERS_FULFILLMENT_SERVICE_FAILED_TO_COMPLETE + + """ + 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. + """ + FULFILLMENT_ORDERS_HOLD_RELEASED + + """ + 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. + """ + FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_LOCAL_DELIVERY + + """ + 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. + """ + FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_PICKUP + + """ + The webhook topic for `fulfillment_orders/manually_reported_progress_stopped` + events. Occurs when a fulfillment order that has previously been manually + marked as in progress is marked back as open. Requires at least one of the + following scopes: read_merchant_managed_fulfillment_orders, + read_assigned_fulfillment_orders, read_third_party_fulfillment_orders. + """ + FULFILLMENT_ORDERS_MANUALLY_REPORTED_PROGRESS_STOPPED + + """ + 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. + """ + FULFILLMENT_ORDERS_MERGED + + """ + 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. + """ + FULFILLMENT_ORDERS_MOVED + + """ + 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. + """ + FULFILLMENT_ORDERS_ORDER_ROUTING_COMPLETE + + """ + 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. + """ + FULFILLMENT_ORDERS_PLACED_ON_HOLD + + """ + The webhook topic for `fulfillment_orders/progress_reported` events. Occurs + when progress is reported for 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. + """ + FULFILLMENT_ORDERS_PROGRESS_REPORTED + + """ + The webhook topic for `fulfillment_orders/ready_to_fulfill` events. + [Deprecated: subscribe to fulfillment_orders/order_routing_complete instead] + Occurs whenever a fulfillment order is ready to fulfill. Requires at least one + of the following scopes: read_merchant_managed_fulfillment_orders, + read_assigned_fulfillment_orders, read_third_party_fulfillment_orders. + """ + FULFILLMENT_ORDERS_READY_TO_FULFILL @privatelyDocumented + + """ + 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. + """ + FULFILLMENT_ORDERS_RESCHEDULED + + """ + 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. + """ + FULFILLMENT_ORDERS_SCHEDULED_FULFILLMENT_ORDER_READY + + """ + 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. + """ + FULFILLMENT_ORDERS_SPLIT + + """ + The webhook topic for `global_catalog/product_update` events. Occurs when a + product’s state changes on an agentic channel. Requires the + `read_publications` scope. + """ + GLOBAL_CATALOG_PRODUCT_UPDATE @privatelyDocumented + + """ + 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. + """ + INVENTORY_ITEMS_CREATE + + """ + 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. + """ + INVENTORY_ITEMS_DELETE + + """ + 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. + """ + INVENTORY_ITEMS_UPDATE + + """ + The webhook topic for `inventory_levels/connect` events. Occurs whenever an + inventory level is connected. Requires the `read_inventory` scope. + """ + INVENTORY_LEVELS_CONNECT + + """ + The webhook topic for `inventory_levels/disconnect` events. Occurs whenever an + inventory level is disconnected. Requires the `read_inventory` scope. + """ + INVENTORY_LEVELS_DISCONNECT + + """ + The webhook topic for `inventory_levels/update` events. Occurs whenever an + inventory level is updated. Requires the `read_inventory` scope. + """ + INVENTORY_LEVELS_UPDATE + + """ + The webhook topic for `inventory_shipments/add_items` events. Occurs whenever + items are added to a shipment. Requires the `read_inventory_shipments` scope. + """ + INVENTORY_SHIPMENTS_ADD_ITEMS + + """ + The webhook topic for `inventory_shipments/create` events. Triggers when a + shipment is created. Requires the `read_inventory_shipments` scope. + """ + INVENTORY_SHIPMENTS_CREATE + + """ + The webhook topic for `inventory_shipments/delete` events. Triggers when a + shipment is deleted. Requires the `read_inventory_shipments` scope. + """ + INVENTORY_SHIPMENTS_DELETE + + """ + 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. + """ + INVENTORY_SHIPMENTS_MARK_IN_TRANSIT + + """ + 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. + """ + INVENTORY_SHIPMENTS_RECEIVE_ITEMS + + """ + The webhook topic for `inventory_shipments/remove_items` events. Occurs + whenever items are removed from a shipment. Requires the + `read_inventory_shipments` scope. + """ + INVENTORY_SHIPMENTS_REMOVE_ITEMS + + """ + The webhook topic for `inventory_shipments/update_item_quantities` events. + Occurs whenever quantities change on a shipment. Requires the + `read_inventory_shipments` scope. + """ + INVENTORY_SHIPMENTS_UPDATE_ITEM_QUANTITIES + + """ + The webhook topic for `inventory_shipments/update_tracking` events. Triggers + when tracking info on a shipment is updated. Requires the + `read_inventory_shipments` scope. + """ + INVENTORY_SHIPMENTS_UPDATE_TRACKING + + """ + The webhook topic for `inventory_transfers/add_items` events. Occurs any time + items are added to a transfer. Requires the `read_inventory_transfers` scope. + """ + INVENTORY_TRANSFERS_ADD_ITEMS + + """ + The webhook topic for `inventory_transfers/cancel` events. Triggers when a + transfer is canceled. Requires the `read_inventory_transfers` scope. + """ + INVENTORY_TRANSFERS_CANCEL + + """ + The webhook topic for `inventory_transfers/complete` events. Triggers when a + transfer is completed. Requires the `read_inventory_transfers` scope. + """ + INVENTORY_TRANSFERS_COMPLETE + + """ + 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. + """ + INVENTORY_TRANSFERS_READY_TO_SHIP + + """ + The webhook topic for `inventory_transfers/remove_items` events. Occurs any + time items are removed from a transfer. Requires the + `read_inventory_transfers` scope. + """ + INVENTORY_TRANSFERS_REMOVE_ITEMS + + """ + 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. + """ + INVENTORY_TRANSFERS_UPDATE_ITEM_QUANTITIES + + """ + The webhook topic for `locales/create` events. Occurs whenever a shop locale is created Requires the `read_locales` scope. + """ + LOCALES_CREATE + + """ + The webhook topic for `locales/destroy` events. Occurs whenever a shop locale + is destroyed Requires the `read_locales` scope. + """ + LOCALES_DESTROY + + """ + The webhook topic for `locales/update` events. Occurs whenever a shop locale + is updated, such as published or unpublished Requires the `read_locales` scope. + """ + LOCALES_UPDATE + + """ + The webhook topic for `locations/activate` events. Occurs whenever a + deactivated location is re-activated. Requires the `read_locations` scope. + """ + LOCATIONS_ACTIVATE + + """ + The webhook topic for `locations/create` events. Occurs whenever a location is + created. Requires the `read_locations` scope. + """ + LOCATIONS_CREATE + + """ + The webhook topic for `locations/deactivate` events. Occurs whenever a + location is deactivated. Requires the `read_locations` scope. + """ + LOCATIONS_DEACTIVATE + + """ + The webhook topic for `locations/delete` events. Occurs whenever a location is + deleted. Requires the `read_locations` scope. + """ + LOCATIONS_DELETE + + """ + The webhook topic for `locations/update` events. Occurs whenever a location is + updated. Requires the `read_locations` scope. + """ + LOCATIONS_UPDATE + + """ + The webhook topic for `marketplace_payments_configurations/update` events. + Occurs when the ready status of a marketplace payments configuration feature + has been updated. Requires the `read_marketplace_payments_configurations` scope. + """ + MARKETPLACE_PAYMENTS_CONFIGURATIONS_UPDATE @privatelyDocumented + + """ + The webhook topic for `markets_backup_region/update` events. Occurs when a + backup region is updated. Requires the `read_markets` scope. + """ + MARKETS_BACKUP_REGION_UPDATE + + """ + The webhook topic for `markets/create` events. Occurs when a new market is created. Requires the `read_markets` scope. + """ + MARKETS_CREATE + + """ + The webhook topic for `markets/delete` events. Occurs when a market is deleted. Requires the `read_markets` scope. + """ + MARKETS_DELETE + + """ + The webhook topic for `markets/update` events. Occurs when a market is updated. Requires the `read_markets` scope. + """ + MARKETS_UPDATE + + """ + The webhook topic for `metafield_definitions/create` events. Occurs when a + metafield definition is created. Requires the `read_content` scope. + """ + METAFIELD_DEFINITIONS_CREATE + + """ + The webhook topic for `metafield_definitions/delete` events. Occurs when a + metafield definition is deleted. Requires the `read_content` scope. + """ + METAFIELD_DEFINITIONS_DELETE + + """ + The webhook topic for `metafield_definitions/update` events. Occurs when a + metafield definition is updated. Requires the `read_content` scope. + """ + METAFIELD_DEFINITIONS_UPDATE + + """ + The webhook topic for `metaobjects/create` events. Occurs when a metaobject is + created. Requires the `read_metaobjects` scope. + """ + METAOBJECTS_CREATE + + """ + The webhook topic for `metaobjects/delete` events. Occurs when a metaobject is + deleted. Requires the `read_metaobjects` scope. + """ + METAOBJECTS_DELETE + + """ + The webhook topic for `metaobjects/update` events. Occurs when a metaobject is + updated. Requires the `read_metaobjects` scope. + """ + METAOBJECTS_UPDATE + + """ + 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. + """ + ORDERS_CANCELLED + + """ + 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. + """ + ORDERS_CREATE + + """ + The webhook topic for `orders/delete` events. Occurs whenever an order is deleted. Requires the `read_orders` scope. + """ + ORDERS_DELETE + + """ + 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. + """ + ORDERS_EDITED + + """ + 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. + """ + ORDERS_FULFILLED + + """ + 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. + """ + ORDERS_LINK_REQUESTED + + """ + 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. + """ + ORDERS_PAID + + """ + 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. + """ + ORDERS_PARTIALLY_FULFILLED + + """ + 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. + """ + ORDERS_RISK_ASSESSMENT_CHANGED + + """ + 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. + """ + ORDERS_SHOPIFY_PROTECT_ELIGIBILITY_CHANGED + + """ + 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. + """ + ORDERS_UPDATED + + """ + 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. + """ + ORDER_TRANSACTIONS_CREATE + + """ + The webhook topic for `payment_schedules/due` events. Occurs whenever payment + schedules are due. Requires the `read_payment_terms` scope. + """ + PAYMENT_SCHEDULES_DUE + + """ + The webhook topic for `payment_terms/create` events. Occurs whenever payment + terms are created. Requires the `read_payment_terms` scope. + """ + PAYMENT_TERMS_CREATE + + """ + The webhook topic for `payment_terms/delete` events. Occurs whenever payment + terms are deleted. Requires the `read_payment_terms` scope. + """ + PAYMENT_TERMS_DELETE + + """ + The webhook topic for `payment_terms/update` events. Occurs whenever payment + terms are updated. Requires the `read_payment_terms` scope. + """ + PAYMENT_TERMS_UPDATE + + """ + The webhook topic for `products/create` events. Occurs whenever a product is created. Requires the `read_products` scope. + """ + PRODUCTS_CREATE + + """ + The webhook topic for `products/delete` events. Occurs whenever a product is deleted. Requires the `read_products` scope. + """ + PRODUCTS_DELETE + + """ + 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. + """ + PRODUCTS_UPDATE + + """ + The webhook topic for `product_feeds/create` events. Triggers when product + feed is created Requires the `read_product_listings` scope. + """ + PRODUCT_FEEDS_CREATE + + """ + 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. + """ + PRODUCT_FEEDS_FULL_SYNC + + """ + The webhook topic for `product_feeds/full_sync_finish` events. Triggers when a + full sync finishes Requires the `read_product_listings` scope. + """ + PRODUCT_FEEDS_FULL_SYNC_FINISH + + """ + 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. + """ + PRODUCT_FEEDS_INCREMENTAL_SYNC + + """ + The webhook topic for `product_feeds/incremental_update` events. Occurs + whenever a product or variant is changed Requires the `read_product_listings` scope. + """ + PRODUCT_FEEDS_INCREMENTAL_UPDATE @privatelyDocumented + + """ + The webhook topic for `product_feeds/update` events. Triggers when product + feed is updated Requires the `read_product_listings` scope. + """ + PRODUCT_FEEDS_UPDATE + + """ + The webhook topic for `product_listings/add` events. Occurs whenever an active + product is listed on a channel. Requires the `read_product_listings` scope. + """ + PRODUCT_LISTINGS_ADD + + """ + The webhook topic for `product_listings/remove` events. Occurs whenever a + product listing is removed from the channel. Requires the + `read_product_listings` scope. + """ + PRODUCT_LISTINGS_REMOVE + + """ + The webhook topic for `product_listings/update` events. Occurs whenever a + product publication is updated. Requires the `read_product_listings` scope. + """ + PRODUCT_LISTINGS_UPDATE + + """ + The webhook topic for `product_operations/finish` events. Triggers when a + product operation completes Requires the `read_products` scope. + """ + PRODUCT_OPERATIONS_FINISH + + """ + 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. + """ + PRODUCT_PUBLICATIONS_CREATE + + """ + 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. + """ + PRODUCT_PUBLICATIONS_DELETE + + """ + 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. + """ + PRODUCT_PUBLICATIONS_UPDATE + + """ + 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. + """ + PROFILES_CREATE + + """ + 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. + """ + PROFILES_DELETE + + """ + 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. + """ + PROFILES_UPDATE + + """ + The webhook topic for `publications/delete` events. Occurs whenever a + publication is deleted. Requires the `read_publications` scope. + """ + PUBLICATIONS_DELETE @privatelyDocumented + + """ + 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. + """ + REFUNDS_CREATE + + """ + 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. + """ + RETURNS_APPROVE + + """ + 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. + """ + RETURNS_CANCEL + + """ + 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. + """ + RETURNS_CLOSE + + """ + 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. + """ + RETURNS_DECLINE + + """ + 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. + """ + RETURNS_PROCESS + + """ + 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. + """ + RETURNS_REOPEN + + """ + 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. + """ + RETURNS_REQUEST + + """ + 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. + """ + RETURNS_UPDATE + + """ + 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. + """ + REVERSE_DELIVERIES_ATTACH_DELIVERABLE + + """ + 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. + """ + REVERSE_FULFILLMENT_ORDERS_DISPOSE + + """ + The webhook topic for `scheduled_product_listings/add` events. Occurs whenever + a product is scheduled to be published. Requires the `read_product_listings` scope. + """ + SCHEDULED_PRODUCT_LISTINGS_ADD + + """ + 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. + """ + SCHEDULED_PRODUCT_LISTINGS_REMOVE + + """ + The webhook topic for `scheduled_product_listings/update` events. Occurs + whenever a product's scheduled availability date changes. Requires the + `read_product_listings` scope. + """ + SCHEDULED_PRODUCT_LISTINGS_UPDATE + + """ + The webhook topic for `segments/create` events. Occurs whenever a segment is created. Requires the `read_customers` scope. + """ + SEGMENTS_CREATE + + """ + The webhook topic for `segments/delete` events. Occurs whenever a segment is deleted. Requires the `read_customers` scope. + """ + SEGMENTS_DELETE + + """ + The webhook topic for `segments/update` events. Occurs whenever a segment is updated. Requires the `read_customers` scope. + """ + SEGMENTS_UPDATE + + """ + The webhook topic for `selling_plan_groups/create` events. Notifies when a + SellingPlanGroup is created. Requires the `read_products` scope. + """ + SELLING_PLAN_GROUPS_CREATE + + """ + The webhook topic for `selling_plan_groups/delete` events. Notifies when a + SellingPlanGroup is deleted. Requires the `read_products` scope. + """ + SELLING_PLAN_GROUPS_DELETE + + """ + The webhook topic for `selling_plan_groups/update` events. Notifies when a + SellingPlanGroup is updated. Requires the `read_products` scope. + """ + SELLING_PLAN_GROUPS_UPDATE + + """ + The webhook topic for `shipping_addresses/create` events. Occurs whenever a + shipping address is created. Requires the `read_shipping` scope. + """ + SHIPPING_ADDRESSES_CREATE + + """ + The webhook topic for `shipping_addresses/update` events. Occurs whenever a + shipping address is updated. Requires the `read_shipping` scope. + """ + SHIPPING_ADDRESSES_UPDATE + + """ + The webhook topic for `shop/update` events. Occurs whenever a shop is updated. + """ + SHOP_UPDATE + + """ + 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. + """ + SUBSCRIPTION_BILLING_ATTEMPTS_CHALLENGED + + """ + The webhook topic for `subscription_billing_attempts/failure` events. Occurs + whenever a subscription billing attempt fails. Requires the + `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_BILLING_ATTEMPTS_FAILURE + + """ + The webhook topic for `subscription_billing_attempts/success` events. Occurs + whenever a subscription billing attempt succeeds. Requires the + `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_BILLING_ATTEMPTS_SUCCESS + + """ + 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. + """ + SUBSCRIPTION_BILLING_CYCLES_SKIP + + """ + 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. + """ + SUBSCRIPTION_BILLING_CYCLES_UNSKIP + + """ + 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. + """ + SUBSCRIPTION_BILLING_CYCLE_EDITS_CREATE + + """ + 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. + """ + SUBSCRIPTION_BILLING_CYCLE_EDITS_DELETE + + """ + 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. + """ + SUBSCRIPTION_BILLING_CYCLE_EDITS_UPDATE + + """ + The webhook topic for `subscription_contracts/activate` events. Occurs when a + subscription contract is activated. Requires the + `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_CONTRACTS_ACTIVATE + + """ + The webhook topic for `subscription_contracts/cancel` events. Occurs when a + subscription contract is canceled. Requires the + `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_CONTRACTS_CANCEL + + """ + The webhook topic for `subscription_contracts/create` events. Occurs whenever + a subscription contract is created. Requires the + `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_CONTRACTS_CREATE + + """ + The webhook topic for `subscription_contracts/expire` events. Occurs when a + subscription contract expires. Requires the `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_CONTRACTS_EXPIRE + + """ + The webhook topic for `subscription_contracts/fail` events. Occurs when a + subscription contract is failed. Requires the + `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_CONTRACTS_FAIL + + """ + The webhook topic for `subscription_contracts/pause` events. Occurs when a + subscription contract is paused. Requires the + `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_CONTRACTS_PAUSE + + """ + The webhook topic for `subscription_contracts/update` events. Occurs whenever + a subscription contract is updated. Requires the + `read_own_subscription_contracts` scope. + """ + SUBSCRIPTION_CONTRACTS_UPDATE + + """ + The webhook topic for `tax_partners/update` events. Occurs whenever a tax + partner is created or updated. Requires the `read_taxes` scope. + """ + TAX_PARTNERS_UPDATE @privatelyDocumented + + """ + The webhook topic for `tax_services/create` events. Occurs whenever a tax + service is created. Requires the `read_taxes` scope. + """ + TAX_SERVICES_CREATE + + """ + The webhook topic for `tax_services/update` events. Occurs whenver a tax + service is updated. Requires the `read_taxes` scope. + """ + TAX_SERVICES_UPDATE + + """ + 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. + """ + TAX_SUMMARIES_CREATE @privatelyDocumented + + """ + The webhook topic for `tender_transactions/create` events. Occurs when a + tender transaction is created. Requires the `read_orders` scope. + """ + TENDER_TRANSACTIONS_CREATE + + """ + 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. + """ + THEMES_CREATE + + """ + 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. + """ + THEMES_DELETE + + """ + 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. + """ + THEMES_PUBLISH + + """ + 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. + """ + THEMES_UPDATE + + """ + The webhook topic for `translatable_content/create` events. Occurs whenever a + resource that has translatable content is created. A webhook per created + translatable field in the resource will be triggered. Requires the + `read_translations` scope. + """ + TRANSLATABLE_CONTENT_CREATE @privatelyDocumented + + """ + The webhook topic for `translatable_content/update` events. Occurs whenever a + resource that has translatable content is updated. A webhook per updated + translatable field in the resource will be triggered. Requires the + `read_translations` scope. + """ + TRANSLATABLE_CONTENT_UPDATE @privatelyDocumented + + """ + 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. + """ + VARIANTS_IN_STOCK + + """ + 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. + """ + VARIANTS_OUT_OF_STOCK +} + +""" +Return type for `webhookSubscriptionUpdate` mutation. +""" +type WebhookSubscriptionUpdatePayload @componentName(name: "platform") { + """ + The list of errors that occurred from executing the mutation. + """ + userErrors: [UserError!]! + + """ + The webhook subscription that was updated. + """ + webhookSubscription: WebhookSubscription +} + +""" +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. +""" +type Weight @componentName(name: "platform") { + """ + The unit of measurement for `value`. + """ + unit: WeightUnit! + + """ + The weight value using the unit system specified with `unit`. + """ + value: Float! +} + +""" +The input fields for the weight unit and value inputs. +""" +input WeightInput @componentName(name: "platform") { + """ + Unit of measurement for `value`. + """ + unit: WeightUnit! + + """ + The weight value using the unit system specified with `weight_unit`. + """ + value: Float! +} + +""" +Units of measurement for weight. +""" +enum WeightUnit @componentName(name: "platform") { + """ + Metric system unit of mass. + """ + GRAMS + + """ + 1 kilogram equals 1000 grams. + """ + KILOGRAMS + + """ + Imperial system unit of mass. + """ + OUNCES + + """ + 1 pound equals 16 ounces. + """ + POUNDS +} diff --git a/packages/store/src/cli/api/graphql/admin/generated/store-info-admin-shop.ts b/packages/store/src/cli/api/graphql/admin/generated/store-info-admin-shop.ts new file mode 100644 index 00000000000..11c50cca2df --- /dev/null +++ b/packages/store/src/cli/api/graphql/admin/generated/store-info-admin-shop.ts @@ -0,0 +1,50 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions */ +import * as Types from './types.js' + +import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core' + +export type StoreInfoAdminShopQueryVariables = Types.Exact<{[key: string]: never}> + +export type StoreInfoAdminShopQuery = { + shop: {shopOwnerName: string; ianaTimezone: string; setupRequired: boolean; features: {shopifyPlus: boolean}} +} + +export const StoreInfoAdminShop = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: {kind: 'Name', value: 'StoreInfoAdminShop'}, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: {kind: 'Name', value: 'shop'}, + selectionSet: { + kind: 'SelectionSet', + selections: [ + {kind: 'Field', name: {kind: 'Name', value: 'shopOwnerName'}}, + {kind: 'Field', name: {kind: 'Name', value: 'ianaTimezone'}}, + {kind: 'Field', name: {kind: 'Name', value: 'setupRequired'}}, + { + kind: 'Field', + name: {kind: 'Name', value: 'features'}, + selectionSet: { + kind: 'SelectionSet', + selections: [ + {kind: 'Field', name: {kind: 'Name', value: 'shopifyPlus'}}, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode diff --git a/packages/store/src/cli/api/graphql/admin/generated/types.d.ts b/packages/store/src/cli/api/graphql/admin/generated/types.d.ts new file mode 100644 index 00000000000..8df6b6878c3 --- /dev/null +++ b/packages/store/src/cli/api/graphql/admin/generated/types.d.ts @@ -0,0 +1,118 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions, @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any, tsdoc/syntax, @typescript-eslint/no-duplicate-type-constituents, @typescript-eslint/no-redundant-type-constituents, @nx/enforce-module-boundaries */ +import {JsonMapType} from '@shopify/cli-kit/node/toml' +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + /** + * 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). + */ + ARN: { input: any; output: any; } + /** + * 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. + */ + BigInt: { input: any; output: any; } + /** + * A string containing a hexadecimal representation of a color. + * + * For example, "#6A8D48". + */ + Color: { input: any; output: any; } + /** + * 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"`. + */ + Date: { input: any; output: any; } + /** + * 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`". + */ + DateTime: { input: any; output: any; } + /** + * A signed decimal number, which supports arbitrary precision and is serialized as a string. + * + * Example values: `"29.99"`, `"29.999"`. + */ + Decimal: { input: any; output: any; } + /** + * 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."` + */ + FormattedString: { input: any; output: any; } + /** + * 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.

"` + */ + HTML: { input: any; output: any; } + /** + * 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"] + * }] + * } + * }` + */ + JSON: { input: JsonMapType | string; output: JsonMapType; } + /** A monetary value string without a currency symbol or code. Example value: `"100.57"`. */ + Money: { input: any; output: any; } + /** + * 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"`. + */ + StorefrontID: { input: any; output: any; } + /** + * 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`). + */ + URL: { input: string; output: string; } + /** + * 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"`. + */ + UnsignedInt64: { input: any; output: any; } + /** + * Time between UTC time and a location's observed time, in the format `"+HH:MM"` or `"-HH:MM"`. + * + * Example value: `"-07:00"`. + */ + UtcOffset: { input: any; output: any; } +}; diff --git a/packages/store/src/cli/api/graphql/admin/queries/store-info-admin-shop.graphql b/packages/store/src/cli/api/graphql/admin/queries/store-info-admin-shop.graphql new file mode 100644 index 00000000000..068bceb73dc --- /dev/null +++ b/packages/store/src/cli/api/graphql/admin/queries/store-info-admin-shop.graphql @@ -0,0 +1,10 @@ +query StoreInfoAdminShop { + shop { + shopOwnerName + ianaTimezone + setupRequired + features { + shopifyPlus + } + } +} diff --git a/packages/store/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql b/packages/store/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql new file mode 100644 index 00000000000..4adda2ab68a --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql @@ -0,0 +1,691 @@ +enum AccountStatus { + """ + Account is active on the destination + """ + ACTIVE + + """ + Account is pending on the destination + """ + PENDING + + """ + Account is suspended on the destination + """ + SUSPENDED +} + +type Category { + """ + Destinations in this category. + """ + destinations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): DestinationConnection! + + """ + The category name. + """ + name: String! +} + +enum CategoryHandle { + """ + Administration category such as: Apps, Billing, Staff, ... + """ + ADMINISTRATION + + """ + Sections category. Other sections in an organization. + """ + SECTIONS + + """ + Stores category such as a Shopify store. + """ + STORES + + """ + Tools category such as: Flow, Customer support, ... + """ + TOOLS +} + +type Destination { + """ + Account's status on the destination. + """ + accountStatus: AccountStatus + + """ + Child destinations associated with this destination. + """ + children( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + status: DestinationStatus + ): DestinationConnection + + """ + Destination handle + """ + handle: String + + """ + For organization destinations, whether it has a developer dashboard link. + """ + hasDevDashboardLink: Boolean! + + """ + For organization destinations, whether it has a partner dashboard link. + """ + hasPartnerDashboardLink: Boolean! + + """ + Destination Icon. + """ + icon: Icon + + """ + Destination global identifier. + """ + id: DestinationID! + + """ + Shops destination is an app development store. + """ + isAppDevelopment: Boolean + + """ + Destination is able to be deactivated by the user. + """ + isDeactivatable: Boolean + + """ + Destination last access timestamp. + """ + lastAccess: ISO8601DateTime + + """ + Destination name. + """ + name: String! + + """ + For shop destinations, the name of the parent organization. Null for non-shop destinations. + """ + parentDestinationName: String + + """ + Primary domain of the destination. + """ + primaryDomain: String + + """ + Destination public identifier. + """ + publicId: DestinationPublicID! + + """ + Shops destination short name. + """ + shortName: String + + """ + Destination status. + """ + status: DestinationStatus! + + """ + Destination type. + """ + type: DestinationType! + + """ + Web destination address. + """ + webUrl: String! +} + +""" +The connection type for Destination. +""" +type DestinationConnection { + """ + A list of edges. + """ + edges: [DestinationEdge!]! + + """ + A list of nodes. + """ + nodes: [Destination!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type DestinationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Destination! +} + +scalar DestinationID + +scalar DestinationPublicID + +enum DestinationStatus { + ACTIVE + INACTIVE +} + +enum DestinationType { + """ + App destination. + """ + APP + + """ + Organization destination. + """ + ORGANIZATION + + """ + Shop destination. + """ + SHOP +} + +""" +Result payload for fetching an optional checkout identity token. +""" +type FetchOptionalCheckoutIdentityTokenResult { + """ + The checkout identity token if retrieval was successful. + """ + identityToken: String +} + +scalar GlobalID + +""" +An ISO 8601-encoded datetime +""" +scalar ISO8601DateTime @specifiedBy(url: "https://tools.ietf.org/html/rfc3339") + +type Icon { + """ + Icon text. + """ + altText: String + + """ + Icon asset name. + """ + asset: String + + """ + Icon url. + """ + url: String +} + +type Mutation { + """ + Fetches a checkout identity token for optional billing integrations. + """ + fetchOptionalCheckoutIdentityToken: FetchOptionalCheckoutIdentityTokenResult! + + """ + Updates the timestamp of most recently accessed store or organization + """ + updateStoreAccessTimestamp(updateDestinationAccessTimeInput: UpdateDestinationAccessTimeInput!): Boolean! +} + +interface Node { + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! +} + +type Organization implements Node { + """ + Whether or not the user can unlock new plus tools. + """ + canUnlockPlusTools: Boolean! + + """ + Destination categories. + """ + categories( + """ + Destination category set. + """ + handles: [CategoryHandle!] = [STORES, TOOLS, ADMINISTRATION, SECTIONS] + ): [Category!] + + """ + Returns true/false values indicating if each flag is enabled for the organization. + """ + enabledFlags( + """ + The hashed handles of the flags to check. + """ + flagHandles: [String!]! + ): [Boolean!]! + + """ + The ID for an object. + """ + id: GlobalID! + + """ + Organization name. + """ + name: String! + queryComplexity: Int! + queryDepth: Int! + + """ + Returns number of shops in the organization. + """ + shopCount: Int + + """ + Organization status. + """ + status: OrganizationStatus! + + """ + Denotes if this is a test Organization + """ + testOrganization: Boolean! + + """ + Organization address. + """ + url: String! +} + +""" +The connection type for Organization. +""" +type OrganizationConnection { + """ + A list of edges. + """ + edges: [OrganizationEdge!]! + + """ + A list of nodes. + """ + nodes: [Organization!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type OrganizationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Organization! +} + +""" +The ID for a Organization. +""" +scalar OrganizationID + +enum OrganizationStatus { + """ + Organization is active. + """ + ACTIVE + + """ + Organization is locked. + """ + LOCKED +} + +type OrphanDestination { + """ + Destination categories. + """ + categories( + """ + Destination category set. + """ + handles: [CategoryHandle!] = [STORES] + ): [Category!] +} + +""" +Information about pagination in a connection. +""" +type PageInfo { + """ + When paginating forwards, the cursor to continue. + """ + endCursor: String + + """ + When paginating forwards, are there more items? + """ + hasNextPage: Boolean! + + """ + When paginating backwards, are there more items? + """ + hasPreviousPage: Boolean! + + """ + When paginating backwards, the cursor to continue. + """ + startCursor: String +} + +type Query { + """ + Returns the current user account. + """ + currentUserAccount( + """ + The identity UUID of the account. + """ + uuid: ID + ): UserAccount + + """ + Returns a specific account by identity uuid. + """ + loadTesting( + """ + The identity UUID of the account. + """ + uuid: ID! + ): UserAccount + + """ + Returns a specific user account by identity uuid. + """ + userAccount( + """ + The identity UUID of the account. + """ + uuid: ID! + ): UserAccount +} + +enum RestrictedDestinations { + APPS_CLI + DEVELOPER_DASHBOARD +} + +input UpdateDestinationAccessTimeInput { + """ + Destination public identifier. + """ + destinationPublicId: DestinationPublicID! +} + +type UserAccount { + """ + Specific destination associated with the account. + """ + destination(id: DestinationPublicID!): Destination + + """ + Destinations associated with an account. + """ + destinations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Search for destinations by name and uri. + """ + search: String + + """ + Only return flat shop destinations. + """ + shopsOnly: Boolean + + """ + Filter destinations by status. If not provided, defaults to active. + """ + status: DestinationStatus = ACTIVE + ): DestinationConnection! + + """ + User account's email address. + """ + email: String! + + """ + Returns true/false values indicating if each flag is enabled for the current user. + """ + enabledUserFlags( + """ + The hashed handles of the flags to check. + """ + flagHandles: [String!]! + ): [Boolean!]! + + """ + Whether the user has at least one active store. + """ + hasActiveStores: Boolean! + + """ + Whether the user has at least one store. + """ + hasAnyStores: Boolean! + + """ + Whether the user has inactive stores. + """ + hasInactiveStores: Boolean! + + """ + The last destination the user accessed. + """ + lastAccessedDestination: Destination + + """ + Specific group associated with the account. + """ + organization( + """ + The remote ID of the organization to look up. + """ + id: OrganizationID! + ): Organization + + """ + Group associated with the destination. + """ + organizationForDestination( + """ + The public ID of the destination to look up the organization for. + """ + destinationPublicId: DestinationPublicID! + ): Organization + + """ + Organizations associated with an account. + """ + organizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + hasAccessToDestination: RestrictedDestinations + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationConnection! + + """ + Organizations associated with an account for which the user has store create permission. + """ + organizationsForStoreCreationInSignup( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationConnection! + + """ + Organizations associated with an account for which the user has access to the destination. + """ + organizationsWithAccessToDestination( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + destination: RestrictedDestinations! + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationConnection! + + """ + Destinations that do not belong to any organization. + """ + orphanDestinations: OrphanDestination! + + """ + Returns the most recently accessed stores for the signup screen, mixing active and inactive. + """ + recentStoresForSignup( + """ + Maximum number of stores to return (1-10, default 4). + """ + limit: Int = 4 + ): [Destination!]! + + """ + User account's identity UUID. + """ + uuid: ID! +} diff --git a/packages/store/src/cli/api/graphql/business-platform-destinations/generated/store-info-destinations.ts b/packages/store/src/cli/api/graphql/business-platform-destinations/generated/store-info-destinations.ts new file mode 100644 index 00000000000..27fd4e37f73 --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-destinations/generated/store-info-destinations.ts @@ -0,0 +1,105 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions */ +import * as Types from './types.js' + +import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core' + +export type StoreInfoDestinationsQueryVariables = Types.Exact<{ + search: Types.Scalars['String']['input'] +}> + +export type StoreInfoDestinationsQuery = { + currentUserAccount?: { + destinations: { + nodes: { + id: unknown + publicId: unknown + name: string + handle?: string | null + shortName?: string | null + primaryDomain?: string | null + webUrl: string + status: Types.DestinationStatus + accountStatus?: Types.AccountStatus | null + isAppDevelopment?: boolean | null + lastAccess?: unknown | null + }[] + } + } | null +} + +export const StoreInfoDestinations = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: {kind: 'Name', value: 'StoreInfoDestinations'}, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: {kind: 'Variable', name: {kind: 'Name', value: 'search'}}, + type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}}, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: {kind: 'Name', value: 'currentUserAccount'}, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: {kind: 'Name', value: 'destinations'}, + arguments: [ + { + kind: 'Argument', + name: {kind: 'Name', value: 'search'}, + value: {kind: 'Variable', name: {kind: 'Name', value: 'search'}}, + }, + { + kind: 'Argument', + name: {kind: 'Name', value: 'shopsOnly'}, + value: {kind: 'BooleanValue', value: true}, + }, + {kind: 'Argument', name: {kind: 'Name', value: 'first'}, value: {kind: 'IntValue', value: '25'}}, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: {kind: 'Name', value: 'nodes'}, + selectionSet: { + kind: 'SelectionSet', + selections: [ + {kind: 'Field', name: {kind: 'Name', value: 'id'}}, + {kind: 'Field', name: {kind: 'Name', value: 'publicId'}}, + {kind: 'Field', name: {kind: 'Name', value: 'name'}}, + {kind: 'Field', name: {kind: 'Name', value: 'handle'}}, + {kind: 'Field', name: {kind: 'Name', value: 'shortName'}}, + {kind: 'Field', name: {kind: 'Name', value: 'primaryDomain'}}, + {kind: 'Field', name: {kind: 'Name', value: 'webUrl'}}, + {kind: 'Field', name: {kind: 'Name', value: 'status'}}, + {kind: 'Field', name: {kind: 'Name', value: 'accountStatus'}}, + {kind: 'Field', name: {kind: 'Name', value: 'isAppDevelopment'}}, + {kind: 'Field', name: {kind: 'Name', value: 'lastAccess'}}, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode diff --git a/packages/store/src/cli/api/graphql/business-platform-destinations/generated/store-info-owning-org.ts b/packages/store/src/cli/api/graphql/business-platform-destinations/generated/store-info-owning-org.ts new file mode 100644 index 00000000000..4c00ecaac07 --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-destinations/generated/store-info-owning-org.ts @@ -0,0 +1,64 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions */ +import * as Types from './types.js' + +import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core' + +export type StoreInfoOwningOrgQueryVariables = Types.Exact<{ + destinationPublicId: Types.Scalars['DestinationPublicID']['input'] +}> + +export type StoreInfoOwningOrgQuery = { + currentUserAccount?: {organizationForDestination?: {id: string; name: string} | null} | null +} + +export const StoreInfoOwningOrg = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: {kind: 'Name', value: 'StoreInfoOwningOrg'}, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: {kind: 'Variable', name: {kind: 'Name', value: 'destinationPublicId'}}, + type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'DestinationPublicID'}}}, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: {kind: 'Name', value: 'currentUserAccount'}, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: {kind: 'Name', value: 'organizationForDestination'}, + arguments: [ + { + kind: 'Argument', + name: {kind: 'Name', value: 'destinationPublicId'}, + value: {kind: 'Variable', name: {kind: 'Name', value: 'destinationPublicId'}}, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + {kind: 'Field', name: {kind: 'Name', value: 'id'}}, + {kind: 'Field', name: {kind: 'Name', value: 'name'}}, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode diff --git a/packages/store/src/cli/api/graphql/business-platform-destinations/generated/types.d.ts b/packages/store/src/cli/api/graphql/business-platform-destinations/generated/types.d.ts new file mode 100644 index 00000000000..e739028cbe6 --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-destinations/generated/types.d.ts @@ -0,0 +1,36 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions, @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any, tsdoc/syntax, @typescript-eslint/no-duplicate-type-constituents, @typescript-eslint/no-redundant-type-constituents, @nx/enforce-module-boundaries */ +import {JsonMapType} from '@shopify/cli-kit/node/toml' +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + DestinationID: { input: any; output: any; } + DestinationPublicID: { input: any; output: any; } + GlobalID: { input: string; output: string; } + /** An ISO 8601-encoded datetime */ + ISO8601DateTime: { input: any; output: any; } + /** The ID for a Organization. */ + OrganizationID: { input: any; output: any; } +}; + +export type AccountStatus = + /** Account is active on the destination */ + | 'ACTIVE' + /** Account is pending on the destination */ + | 'PENDING' + /** Account is suspended on the destination */ + | 'SUSPENDED'; + +export type DestinationStatus = + | 'ACTIVE' + | 'INACTIVE'; diff --git a/packages/store/src/cli/api/graphql/business-platform-destinations/queries/store-info-destinations.graphql b/packages/store/src/cli/api/graphql/business-platform-destinations/queries/store-info-destinations.graphql new file mode 100644 index 00000000000..ccd0d3272d3 --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-destinations/queries/store-info-destinations.graphql @@ -0,0 +1,19 @@ +query StoreInfoDestinations($search: String!) { + currentUserAccount { + destinations(search: $search, shopsOnly: true, first: 25) { + nodes { + id + publicId + name + handle + shortName + primaryDomain + webUrl + status + accountStatus + isAppDevelopment + lastAccess + } + } + } +} diff --git a/packages/store/src/cli/api/graphql/business-platform-destinations/queries/store-info-owning-org.graphql b/packages/store/src/cli/api/graphql/business-platform-destinations/queries/store-info-owning-org.graphql new file mode 100644 index 00000000000..21343979d24 --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-destinations/queries/store-info-owning-org.graphql @@ -0,0 +1,8 @@ +query StoreInfoOwningOrg($destinationPublicId: DestinationPublicID!) { + currentUserAccount { + organizationForDestination(destinationPublicId: $destinationPublicId) { + id + name + } + } +} diff --git a/packages/store/src/cli/api/graphql/business-platform-organizations/generated/store-info-shop.ts b/packages/store/src/cli/api/graphql/business-platform-organizations/generated/store-info-shop.ts new file mode 100644 index 00000000000..c988a60fda3 --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-organizations/generated/store-info-shop.ts @@ -0,0 +1,112 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions */ +import * as Types from './types.js' + +import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core' + +export type StoreInfoShopQueryVariables = Types.Exact<{ + search?: Types.InputMaybe +}> + +export type StoreInfoShopQuery = { + organization?: { + id: string + name: string + accessibleShops?: { + edges: { + node: { + name: string + primaryDomain?: string | null + storeType?: Types.Store | null + status: Types.ShopPropertyStatus + planName?: string | null + planVariantName?: string | null + billingCurrency?: string | null + createdAt: unknown + shortName?: string | null + } + }[] + } | null + } | null +} + +export const StoreInfoShop = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: {kind: 'Name', value: 'StoreInfoShop'}, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: {kind: 'Variable', name: {kind: 'Name', value: 'search'}}, + type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: {kind: 'Name', value: 'organization'}, + selectionSet: { + kind: 'SelectionSet', + selections: [ + {kind: 'Field', name: {kind: 'Name', value: 'id'}}, + {kind: 'Field', name: {kind: 'Name', value: 'name'}}, + { + kind: 'Field', + name: {kind: 'Name', value: 'accessibleShops'}, + arguments: [ + {kind: 'Argument', name: {kind: 'Name', value: 'first'}, value: {kind: 'IntValue', value: '5'}}, + { + kind: 'Argument', + name: {kind: 'Name', value: 'search'}, + value: {kind: 'Variable', name: {kind: 'Name', value: 'search'}}, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: {kind: 'Name', value: 'edges'}, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: {kind: 'Name', value: 'node'}, + selectionSet: { + kind: 'SelectionSet', + selections: [ + {kind: 'Field', name: {kind: 'Name', value: 'name'}}, + {kind: 'Field', name: {kind: 'Name', value: 'primaryDomain'}}, + {kind: 'Field', name: {kind: 'Name', value: 'storeType'}}, + {kind: 'Field', name: {kind: 'Name', value: 'status'}}, + {kind: 'Field', name: {kind: 'Name', value: 'planName'}}, + {kind: 'Field', name: {kind: 'Name', value: 'planVariantName'}}, + {kind: 'Field', name: {kind: 'Name', value: 'billingCurrency'}}, + {kind: 'Field', name: {kind: 'Name', value: 'createdAt'}}, + {kind: 'Field', name: {kind: 'Name', value: 'shortName'}}, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + {kind: 'Field', name: {kind: 'Name', value: '__typename'}}, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode diff --git a/packages/store/src/cli/api/graphql/business-platform-organizations/generated/types.d.ts b/packages/store/src/cli/api/graphql/business-platform-organizations/generated/types.d.ts new file mode 100644 index 00000000000..968d9305931 --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-organizations/generated/types.d.ts @@ -0,0 +1,95 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions, @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any, tsdoc/syntax, @typescript-eslint/no-duplicate-type-constituents, @typescript-eslint/no-redundant-type-constituents, @nx/enforce-module-boundaries */ +import {JsonMapType} from '@shopify/cli-kit/node/toml' +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + AccessRoleAssignee: { input: any; output: any; } + /** The ID for a AccessRole. */ + AccessRoleID: { input: any; output: any; } + AccessRoleRecordId: { input: any; output: any; } + /** The ID for a ActionAudit. */ + ActionAuditID: { input: any; output: any; } + /** The ID for a Address. */ + AddressID: { input: any; output: any; } + /** The ID for a Attestation. */ + AttestationID: { input: any; output: any; } + /** The ID for a BulkDataOperation. */ + BulkDataOperationID: { input: any; output: any; } + /** The ID for a BusinessUser. */ + BusinessUserID: { input: any; output: any; } + /** The ID for a BusinessUsersImport. */ + BusinessUsersImportID: { input: any; output: any; } + /** A signed decimal number, which supports arbitrary precision and is serialized as a string. */ + Decimal: { input: any; output: any; } + /** The ID for a DocumentAttachment. */ + DocumentAttachmentID: { input: any; output: any; } + /** The ID for a EntitySupportingDocument. */ + EntitySupportingDocumentID: { input: any; output: any; } + GlobalID: { input: string; output: string; } + /** The ID for a GovernmentIdentifier. */ + GovernmentIdentifierID: { input: any; output: any; } + /** The ID for a Group. */ + GroupID: { input: any; output: any; } + /** An ISO 8601-encoded date */ + ISO8601Date: { input: any; output: any; } + /** An ISO 8601-encoded datetime */ + ISO8601DateTime: { input: any; output: any; } + /** Represents untyped JSON */ + JSON: { input: JsonMapType | string; output: JsonMapType; } + /** The ID for a LegalEntity. */ + LegalEntityID: { input: any; output: any; } + /** The ID for a OrganizationDomain. */ + OrganizationDomainID: { input: any; output: any; } + /** The ID for a Organization. */ + OrganizationID: { input: any; output: any; } + /** The ID for a OrganizationUser. */ + OrganizationUserID: { input: any; output: any; } + /** The ID for a PersonAlias. */ + PersonAliasID: { input: any; output: any; } + /** The ID for a Person. */ + PersonID: { input: any; output: any; } + /** The ID for a Principal. */ + PrincipalID: { input: any; output: any; } + /** The ID for a Property. */ + PropertyID: { input: any; output: any; } + PropertyId: { input: string; output: string; } + PropertyPublicID: { input: string; output: string; } + /** The ID for a PropertyTransferRequest. */ + PropertyTransferRequestID: { input: any; output: any; } + /** The ID for a Role. */ + RoleID: { input: any; output: any; } + /** The ID for a Shop. */ + ShopID: { input: any; output: any; } + /** The ID for a ShopifyShop. */ + ShopifyShopID: { input: any; output: any; } + /** The ID for a StoreAdditionRequest. */ + StoreAdditionRequestID: { input: any; output: any; } + SupportedEntityId: { input: any; output: any; } + /** The ID for a SupportingDocument. */ + SupportingDocumentID: { input: any; output: any; } + /** An RFC 3986 and RFC 3987 compliant URI string. */ + URL: { input: string; output: string; } +}; + +export type ShopPropertyStatus = + | 'ACTIVE' + | 'INACTIVE'; + +export type Store = + | 'APP_DEVELOPMENT' + | 'CLIENT_TRANSFER' + | 'COLLABORATOR' + | 'DEVELOPMENT' + | 'DEVELOPMENT_SUPERSET' + | 'PRODUCTION'; diff --git a/packages/store/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql b/packages/store/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql new file mode 100644 index 00000000000..889f619ecbf --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql @@ -0,0 +1,19059 @@ +""" +Requires that exactly one field must be supplied and that field must not be `null`. +""" +directive @oneOf on INPUT_OBJECT + +type AccessActionAudit implements Node { + action: String! + actorName: String! + + """ + The date of the audit event. + """ + date: ISO8601DateTime! + + """ + Action audit details for the organization. + """ + details( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ActionAuditDetailConnection! + event: String! + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! + subjectType: String! +} + +""" +The connection type for AccessActionAudit. +""" +type AccessActionAuditConnection { + """ + A list of edges. + """ + edges: [AccessActionAuditEdge!]! + + """ + A list of nodes. + """ + nodes: [AccessActionAudit!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type AccessActionAuditEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: AccessActionAudit! +} + +type AccessAggregatedRoleAssignment { + role: AccessRole! + shopsCount: Int + targetType: AccessRoleAssignmentTarget! + userGroup: Group +} + +""" +The connection type for AccessAggregatedRoleAssignment. +""" +type AccessAggregatedRoleAssignmentConnection { + """ + A list of edges. + """ + edges: [AccessAggregatedRoleAssignmentEdge!]! + + """ + A list of nodes. + """ + nodes: [AccessAggregatedRoleAssignment!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type AccessAggregatedRoleAssignmentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: AccessAggregatedRoleAssignment! +} + +enum AccessLevel { + ALLOW + APPROVAL_REQUIRED + DENY +} + +input AccessOrganizationOwnerChangeInput { + """ + The email of new organization owner. + """ + email: String! +} + +type AccessOrganizationOwnerChangeResult { + """ + New organization owner. + """ + newOrganizationOwner: OrganizationUser + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +The result of enabling RBAC for a Partner organization. +""" +type AccessPartnersMigrationEnableRbacResult { + success: Boolean + userErrors: [UserError!] +} + +""" +The result of migrating Partners users to Business Platform RBAC. +""" +type AccessPartnersMigrationMigrateUsersResult { + success: Boolean + userErrors: [UserError!] +} + +type AccessPointOfSaleAccess { + """ + Indicates whether the role grants access to Point of Sale. + """ + hasPosAccess: Boolean! + + """ + Indicates whether the role grants access to initialize new Point of Sale devices. + """ + initializePos: Boolean! +} + +input AccessPointOfSaleAccessInput { + """ + Indicates whether the role grants access to Point of Sale. + """ + hasPosAccess: Boolean + + """ + Indicates whether the role grants access to initialize new Point of Sale device. + """ + initializePos: Boolean +} + +enum AccessRecordPermissionAccessLevel { + ALLOW + DENY +} + +type AccessRole implements Node { + accessConditions: [String!] + + """ + Returns a list of assignable shops for the role. + """ + assignableShops( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + assignee: AccessRoleAssignee! + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + ): AssignableShopConnection! + category: AccessRoleCategory! + description: String + + """ + The ID for an object. + """ + id: GlobalID! + name: String! + permissions: [AccessRolePermission!]! + pointOfSaleAccess: AccessPointOfSaleAccess + queryComplexity: Int! + queryDepth: Int! + + """ + Returns a list of record permissions in the role. + """ + recordPermissions( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AccessRoleRecordPermissionConnection! + roleType: AccessRoleType! + systemRoleHandle: String + usersCount: Int +} + +scalar AccessRoleAssignee + +enum AccessRoleAssignmentAssignee { + """ + An organization user. + """ + ORGANIZATION_USER + + """ + A group. + """ + USER_GROUP +} + +enum AccessRoleAssignmentRole { + """ + A point of sale role. + """ + POINT_OF_SALE + + """ + A store role. + """ + STORE +} + +enum AccessRoleAssignmentTarget { + ALL_COLLABORATOR_STORES + ALL_OWNED_STORES + ALL_STORES + INDIVIDUAL_COLLABORATOR_STORE + INDIVIDUAL_STORES + ORGANIZATION +} + +enum AccessRoleCategory { + ORGANIZATION + PARTNER + POINT_OF_SALE + STORE +} + +""" +The connection type for AccessRole. +""" +type AccessRoleConnection { + """ + A list of edges. + """ + edges: [AccessRoleEdge!]! + + """ + A list of nodes. + """ + nodes: [AccessRole!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +input AccessRoleCreateInput { + """ + The conditions of the access condition. + """ + accessConditions: [String!] + + """ + The category of the role. + """ + category: AccessRoleCategory! + + """ + The description of the role. + """ + description: String + + """ + The name of the role. + """ + name: String! + + """ + Granular permissions in a role. + """ + permissions: [AccessRolePermissionInput!]! + + """ + Point of Sale Access. + """ + pointOfSaleAccess: AccessPointOfSaleAccessInput + + """ + Record permissions in a role. + """ + recordPermissions: [AccessRoleRecordId!] +} + +type AccessRoleCreateResult { + """ + The created role. + """ + role: AccessRole + + """ + Indicates whether the creation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input AccessRoleDeleteInput { + """ + The ID of the Role to delete. + """ + id: AccessRoleID! +} + +type AccessRoleDeleteResult { + """ + The deleted role id. + """ + deletedId: AccessRoleID + + """ + Indicates whether the deletion was successful. + """ + success: Boolean + + """ + List of user errors of role delete operation. + """ + userErrors: [UserError!] +} + +input AccessRoleDuplicateInput { + """ + The custom name for the duplicated Role. + """ + customRoleName: String + + """ + The ID of the Role to duplicated. + """ + roleId: AccessRoleID! +} + +type AccessRoleDuplicateResult { + """ + The newly created duplicate role. + """ + role: AccessRole + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +An edge in a connection. +""" +type AccessRoleEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: AccessRole! +} + +""" +Field options for filtering roles queries. +""" +enum AccessRoleFilterField { + """ + The category of a role. + """ + CATEGORY + + """ + The ID of a role. + """ + ID +} + +""" +Operators for filtering roles queries. +""" +enum AccessRoleFilterOperator { + """ + Equals operator. + """ + EQUALS + + """ + In operator. + """ + IN + + """ + Not equals operator. + """ + NOT_EQUALS +} + +""" +The ID for a AccessRole. +""" +scalar AccessRoleID + +type AccessRolePermission implements Node { + """ + Access level granted for the handle. + """ + accessLevel: AccessLevel! + + """ + The handle of the permission. + """ + handle: String! + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! +} + +input AccessRolePermissionInput { + """ + Access level granted for the handle. + """ + accessLevel: AccessLevel! + + """ + The handle of the permission. + """ + handle: String! +} + +union AccessRoleRecord = ShopApp + +scalar AccessRoleRecordId + +type AccessRoleRecordPermission { + """ + The record itself. + """ + record: AccessRoleRecord! + + """ + Identifier for the record + """ + recordId: ID! +} + +""" +The connection type for AccessRoleRecordPermission. +""" +type AccessRoleRecordPermissionConnection { + """ + A list of edges. + """ + edges: [AccessRoleRecordPermissionEdge!]! + + """ + A list of nodes. + """ + nodes: [AccessRoleRecordPermission!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type AccessRoleRecordPermissionEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: AccessRoleRecordPermission! +} + +input AccessRoleRecordPermissionInput { + """ + Represents whether a record access is allowed or denied. + """ + accessLevel: AccessRecordPermissionAccessLevel! + + """ + Global Id of the record associated with the permission. + """ + recordId: AccessRoleRecordId! +} + +enum AccessRoleType { + CUSTOM + SYSTEM +} + +input AccessRoleUpdateInput { + """ + The conditions of the access condition. + """ + accessConditions: [String!] + + """ + The description of the Role. + """ + description: String + + """ + The ID of the Role to update. + """ + id: AccessRoleID! + + """ + The name of the Role. + """ + name: String + + """ + Granular permissions modified for the role. + """ + permissionsToUpdate: [AccessRolePermissionInput!] + + """ + Access to Point of Sale. + """ + pointOfSaleAccess: AccessPointOfSaleAccessInput + + """ + Record permissions the were updated for the role. + """ + recordPermissionsToUpdate: [AccessRoleRecordPermissionInput!] +} + +type AccessRoleUpdateResult { + """ + The updated role. + """ + role: AccessRole + + """ + Indicates whether the update was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input AccessRolesDeleteInput { + """ + The IDs of the Roles to delete. + """ + ids: [AccessRoleID!]! +} + +input AccessStoreOwnerChangeInput { + """ + The email of new store owner. + """ + email: String! + + """ + The ID of the store. + """ + shopifyShopId: ShopifyShopID! +} + +type AccessStoreOwnerChangeResult { + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type AccessSummary { + """ + A summary of the permissions for a user or group. + """ + permissionsSummary(shopifyShopId: PropertyPublicID): PermissionsSummary + + """ + A summary of current store access for the user (legacy or RBAC). + """ + storeAccessSummary: StoreAccessSummary +} + +enum AccountTypeOfUser { + IDENTITY + LEGACY + PIN + SAML + SCIM +} + +type ActionAuditDetail implements Node { + event: String! + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! + subjectType: String! +} + +""" +The connection type for ActionAuditDetail. +""" +type ActionAuditDetailConnection { + """ + A list of edges. + """ + edges: [ActionAuditDetailEdge!]! + + """ + A list of nodes. + """ + nodes: [ActionAuditDetail!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type ActionAuditDetailEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ActionAuditDetail! +} + +""" +Field options for filtering action audit queries. +""" +enum ActionAuditFilterField { + """ + The created at timestamp of the action audit. + """ + CREATED_AT + + """ + The subject of the action audit. + """ + SUBJECT +} + +""" +Represents a single filter option for action audit queries. +""" +input ActionAuditFilterInput { + field: ActionAuditFilterField! + operator: ActionAuditFilterOperator! + value: String! +} + +""" +Operators for filtering action audit queries. +""" +enum ActionAuditFilterOperator { + """ + Equals operator. + """ + EQUALS + + """ + Greater than operator. + """ + GREATER_THAN + + """ + Less than operator. + """ + LESS_THAN +} + +""" +The ID for a ActionAudit. +""" +scalar ActionAuditID + +input AddRoleInput { + """ + List of administrative permissions. + """ + administrativePermissions: [String!] + + """ + The name of the role. + """ + name: String! + + """ + List of shop accesses. + """ + shopAccess: [ShopAccessInput!] +} + +type AddRoleResult { + """ + The added role. + """ + role: Role + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type Address implements Node { + addressLine1: String + addressLine2: String + addressVariants: [AddressVariant!] + city: String + countryCode: CountryCode! + + """ + The ID for an object. + """ + id: GlobalID! + postalCode: String + queryComplexity: Int! + queryDepth: Int! + region: String + stateOrProvince: String + town: String +} + +""" +The connection type for Address. +""" +type AddressConnection { + """ + A list of edges. + """ + edges: [AddressEdge!]! + + """ + A list of nodes. + """ + nodes: [Address!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type AddressEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Address! +} + +""" +The ID for a Address. +""" +scalar AddressID + +input AddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + addressLine1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + addressLine2: String + + """ + The address variants. + """ + addressVariants: [AddressVariantInput!] + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The two-letter code for the country of the address. + """ + countryCode: CountryCode! + + """ + The zip or postal code of the address. + """ + postalCode: String + + """ + The code for the region of the address. + """ + stateOrProvince: String +} + +type AddressVariant { + """ + The first line of the address variant + """ + addressLine1: String + + """ + The second line of the address variant + """ + addressLine2: String + + """ + The city of the address variant + """ + city: String + + """ + The country code of the address variant + """ + countryCode: String + + """ + The postal code of the address variant + """ + postalCode: String + + """ + The region of the address variant + """ + region: String + + """ + The state or province of the address variant + """ + stateOrProvince: String + + """ + The town of the address variant + """ + town: String + + """ + The type of address variant (e.g., 'kanji', 'kana', 'formal') + """ + variantType: String! +} + +input AddressVariantInput { + """ + The first line of the address variant + """ + addressLine1: String + + """ + The second line of the address variant + """ + addressLine2: String + + """ + The city of the address variant + """ + city: String + + """ + The country code of the address variant + """ + countryCode: String + + """ + The postal code of the address variant + """ + postalCode: String + + """ + The region of the address variant + """ + region: String + + """ + The state or province of the address variant + """ + stateOrProvince: String + + """ + The type of address variant + """ + variantType: AlphabetType! +} + +type AdminBrowserSession { + """ + The date of the admin browser session. + """ + date: ISO8601Date + + """ + The IP address of the browser session. + """ + ipAddress: String + + """ + The location the browser session originated from. + """ + ipLocation: String + + """ + The name of the ISP the session originated from. + """ + ispName: String + + """ + The user agent of the browser. + """ + userAgent: String +} + +enum AlphabetType { + KANA + KANJI +} + +""" +The type of entity that metadata applies to +""" +enum ApplicableEntityType { + """ + Applies to legal entities/businesses + """ + LEGAL_ENTITY + + """ + Applies to individual persons/principals + """ + PERSON +} + +input AssignOrCreateAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + addressLine1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + addressLine2: String + + """ + The address variants. + """ + addressVariants: [AddressVariantInput!] + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The two-letter code for the country of the address. + """ + countryCode: CountryCode! + + """ + The id of the address to assign or create. + """ + id: AddressID + + """ + The zip or postal code of the address. + """ + postalCode: String + + """ + The code for the region of the address. + """ + stateOrProvince: String +} + +input AssignPartnerOrganizationOwnerInput { + """ + Whether the OrganizationUser should be assigned as organization owner (admin). + """ + admin: Boolean! + + """ + The organization user to assign as owner. + """ + organizationUserId: OrganizationUserID! + + """ + The organization user making the request. + """ + requesterOrganizationUserId: OrganizationUserID +} + +type AssignPartnerOrganizationOwnerResult { + """ + The ID of the organization user assigned as owner. + """ + organizationUserId: OrganizationUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type AssignablePointOfSalePermissions { + """ + All assignable point of sale permissions. + """ + allPermissions: [String!]! + + """ + All assignable ternary point of sale permissions. Will be a subset of all_permissions + """ + ternaryPermissions: [String!]! +} + +type AssignableShop { + assigned: Boolean! + shop: Shop! +} + +""" +The connection type for AssignableShop. +""" +type AssignableShopConnection { + """ + A list of edges. + """ + edges: [AssignableShopEdge!]! + + """ + A list of nodes. + """ + nodes: [AssignableShop!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type AssignableShopEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: AssignableShop! +} + +enum Attachment { + BACK + FRONT + PAGE +} + +""" +An attestation recorded against an organization-scoped resource. +""" +type Attestation { + """ + True when the attestation has not been revoked, superseded, or expired. + """ + active: Boolean! + + """ + Canonical GID of the resource the attestation is about. + """ + attestableGid: String! + + """ + Handle of the attestation type recorded. + """ + attestationTypeHandle: AttestationTypeHandle! + + """ + The time at which the attestation was recorded. + """ + attestedAt: ISO8601DateTime! + + """ + Domain-specific payload captured at attestation time (e.g. declared UBOs). + """ + attestedData: JSON + + """ + The time at which the attestation expires, if any. + """ + expiresAt: ISO8601DateTime + id: AttestationID! + + """ + Auxiliary metadata persisted with the attestation (e.g. ip_address, user_agent). + """ + metadata: JSON + + """ + Supporting documents linked to this attestation as evidence. + """ + supportingDocuments: [SupportingDocument!]! +} + +""" +The connection type for Attestation. +""" +type AttestationConnection { + """ + A list of edges. + """ + edges: [AttestationEdge!]! + + """ + A list of nodes. + """ + nodes: [Attestation!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type AttestationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Attestation! +} + +""" +The ID for a Attestation. +""" +scalar AttestationID + +""" +The handle of an attestation type from the catalog. +""" +enum AttestationTypeHandle { + """ + Confirms that the listed directors are accurate and complete. + """ + DIRECTORSHIP_DECLARATION + + """ + Confirms that the listed beneficial owners (UBOs) are accurate and complete. + """ + OWNERSHIP_DECLARATION +} + +type AuthorizedApplication { + """ + The number of active authorizations for the user using the app. + """ + accessCount: Int! + + """ + The GID of the app. + """ + appId: ID! + + """ + The date of the user's last access using the app. + """ + lastAccess: ISO8601DateTime! + + """ + The name of the app. + """ + title: String! +} + +input BackfillPartnerOrganizationsShopPropertiesInput { + """ + The type of the backfill event. + """ + backfillType: PartnerOrganizationsShopPropertiesBackfill! + + """ + The id of the partner organization that owns/owned the shop. + """ + organizationId: OrganizationID! + + """ + The id of the shop has/had a relationship with the partner organization. + """ + shopifyShopId: ShopifyShopID! +} + +type BackfillPartnerOrganizationsShopPropertiesResult { + """ + The ID of the re-assigned property. + """ + propertyId: PropertyID + + """ + The ID of the new property transfer request. + """ + transferRequestId: PropertyTransferRequestID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input BackfillPartnerUserInput { + """ + If the user should be deleted (for use in backfilling) + """ + isDeleted: Boolean + + """ + The ID of the Partner organization. + """ + organizationId: OrganizationID! + + """ + Identity UUID of the user. + """ + userIdentityUuid: String! +} + +type BackfillPartnerUserResult { + """ + The ID of the updated organization user. + """ + organizationUserId: OrganizationUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type BillingAccount implements PropertyInterface { + """ + Property public identifier. + """ + externalId: PropertyPublicID + + """ + Property global identifier. + """ + id: PropertyId! + + """ + The offering for this property. + """ + offering: Offering + + """ + The organization this property belongs to. + """ + organization: Organization + queryComplexity: Int! + queryDepth: Int! +} + +input BulkAssignRoleInput { + """ + The IDs of the Organization Users who are assigned a Role. + """ + organizationUserIds: [OrganizationUserID!]! + + """ + The ID of the Role to assign. + """ + roleId: RoleID! +} + +type BulkAssignRoleResult { + """ + The organization user ids with the updated role. + """ + organizationUserIds: [OrganizationUserID!] + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type BulkData implements Node { + """ + The ID for an object. + """ + id: GlobalID! + operation(id: BulkDataOperationID!): BulkDataOperation + queryComplexity: Int! + queryDepth: Int! +} + +type BulkDataOperation implements Node { + """ + The ID for an object. + """ + id: GlobalID! + operationType: BulkDataOperationType! + queryComplexity: Int! + queryDepth: Int! + sourceStore: Shop + status: BulkDataOperationStatus! + storeOperations: [BulkDataStoreOperation!]! + targetStore: Shop +} + +""" +The ID for a BulkDataOperation. +""" +scalar BulkDataOperationID + +enum BulkDataOperationStatus { + COMPLETED + CREATED + FAILED + RUNNING +} + +enum BulkDataOperationType { + STORE_COPY + STORE_EXPORT + STORE_IMPORT +} + +input BulkDataResourceConfigsCustomIdInput { + key: String! + namespace: String! +} + +input BulkDataResourceConfigsInput { + products: BulkDataResourceConfigsProductsConfigInput +} + +input BulkDataResourceConfigsProductsConfigInput { + identifier: BulkDataResourceConfigsProductsIdentifierInput! +} + +enum BulkDataResourceConfigsProductsField { + HANDLE + ID +} + +input BulkDataResourceConfigsProductsIdentifierInput @oneOf { + customId: BulkDataResourceConfigsCustomIdInput + field: BulkDataResourceConfigsProductsField +} + +input BulkDataStoreCopyStartInput { + resourceConfigs: BulkDataResourceConfigsInput + sourceStoreIdentifier: StoreIdentifierInput! + targetStoreIdentifier: StoreIdentifierInput! +} + +type BulkDataStoreCopyStartResult { + """ + The operation to track progress of the store copy. + """ + operation: BulkDataOperation + + """ + Indicates whether the creation was successful. + """ + success: Boolean! + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input BulkDataStoreExportStartInput { + sourceStoreIdentifier: StoreIdentifierInput! +} + +type BulkDataStoreExportStartResult { + """ + The operation to track progress of the store export. + """ + operation: BulkDataOperation + + """ + Indicates whether the creation was successful. + """ + success: Boolean! + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input BulkDataStoreImportStartInput { + importUrl: String! + resourceConfigs: BulkDataResourceConfigsInput + targetStoreIdentifier: StoreIdentifierInput! +} + +type BulkDataStoreImportStartResult { + """ + The operation to track progress of the store import. + """ + operation: BulkDataOperation + + """ + Indicates whether the creation was successful. + """ + success: Boolean! + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type BulkDataStoreOperation implements Node { + completedObjectCount: Int! + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! + remoteOperationStatus: String! + remoteOperationType: String! + store: Shop! + totalObjectCount: Int! + url: String +} + +input BusinessPrincipalInput { + """ + The equity ownership percentage associated with the principal. + """ + equityOwnership: Float + + """ + The job title associated with the principal. + """ + jobTitle: String + + """ + The roles associated with the principal. + """ + roles: [PrincipalRoleTypeEnum!] +} + +""" +The ID for a BusinessUser. +""" +scalar BusinessUserID + +""" +The ID for a BusinessUsersImport. +""" +scalar BusinessUsersImportID + +""" +A business users import run. +""" +type BusinessUsersImportRun implements Node { + """ + When the import record was created. + """ + createdAt: ISO8601DateTime! + + """ + Whether the CSV passed validation. + """ + csvValid: Boolean + + """ + Number of rows that failed to import. + """ + failed: Int + + """ + When processing finished. + """ + finishedAt: ISO8601DateTime + + """ + The ID for an object. + """ + id: GlobalID! + + """ + Number of successfully imported rows. + """ + imported: Int + + """ + The original filename of the uploaded CSV. + """ + originalFilename: String + queryComplexity: Int! + queryDepth: Int! + + """ + Structured per-row results with status and error details. Available once the import has finished. + """ + rowResults: [ImportRowResult!] + + """ + Total number of rows in the CSV. + """ + rows: Int + + """ + Number of rows that were skipped. + """ + skipped: Int + + """ + When processing started. + """ + startedAt: ISO8601DateTime + + """ + The current status of the import. + """ + status: BusinessUsersImportStatus! + + """ + When the import was submitted. + """ + submittedAt: ISO8601DateTime +} + +""" +The connection type for BusinessUsersImportRun. +""" +type BusinessUsersImportRunConnection { + """ + A list of edges. + """ + edges: [BusinessUsersImportRunEdge!]! + + """ + A list of nodes. + """ + nodes: [BusinessUsersImportRun!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type BusinessUsersImportRunEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: BusinessUsersImportRun! +} + +""" +The status of a business users import. +""" +enum BusinessUsersImportStatus { + """ + Import finished successfully + """ + COMPLETED + + """ + Import finished with some row failures + """ + COMPLETED_WITH_FAILURES + + """ + Import failed due to invalid CSV or unexpected error + """ + FAILED + + """ + Import record created, not yet submitted + """ + PENDING + + """ + Import is actively running + """ + PROCESSING + + """ + CSV uploaded, waiting for processing + """ + SUBMITTED +} + +input CancelShopTransferInput { + """ + The ID of the shop to cancel a pending transfer on. + """ + shopifyShopId: PropertyPublicID! +} + +type CancelShopTransferResult { + """ + The shop property which had a pending tranfer request. + """ + property: PropertyInterface + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +enum Category { + BUSINESS + INDIVIDUAL + UNSPECIFIED +} + +input ChangeDomainEnforcementStateInput { + """ + The IDs of the domains to change enforcement state. + """ + domainIds: [OrganizationDomainID!]! + + """ + The enforcement state the domains are changing to. + """ + enforcementState: OrganizationDomainStatus! +} + +type ChangeDomainEnforcementStateResult { + """ + The organization with the changed domains enforcement states. + """ + organization: Organization + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +A client transfer request for a shop. +""" +type ClientTransferRequest implements Node { + """ + When the transfer request was created. + """ + createdAt: ISO8601DateTime! + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! + + """ + The current status of the transfer request. + """ + status: ClientTransferRequestStatus! + + """ + The organization the shop is being transferred to. + """ + targetOrganization: OrganizationReference +} + +""" +The status of a client transfer request. +""" +enum ClientTransferRequestStatus { + CANCELLED + COMPLETED + EXPIRED + PENDING + REJECTED +} + +""" +TrustedToRequestCollaboration decision result for the current viewer. +""" +type CollaborationEligibility { + """ + Signed IDV challenge URL when status is `REQUIRED` or `PENDING`. Null otherwise. + """ + challengeUrl: URL + + """ + Whether IDV is required before requesting collaboration. + """ + status: CollaborationEligibilityStatus! +} + +""" +IDV gate state for requesting collaboration. See TrustedToRequestCollaboration. +""" +enum CollaborationEligibilityStatus { + """ + TrustBattery was unreachable; the operation failed open. Clients should treat as `NOT_REQUIRED`. + """ + ERROR + + """ + No IDV required. + """ + NOT_REQUIRED + + """ + IDV is processing or under appeal. No user action required. + """ + PENDING + + """ + IDV must be completed before requesting collaboration. + """ + REQUIRED + + """ + IDV completed. + """ + VERIFIED +} + +input CollaboratorAcceptInput { + """ + The role to be created and assigned to the collaborator. + """ + newRole: AccessRoleCreateInput + + """ + The ID of the user to assign the role to. + """ + organizationUserId: OrganizationUserID + + """ + The IDs of the existing roles to assign to the collaborator. + """ + roleIds: [AccessRoleID!]! +} + +type CollaboratorAcceptResult { + organizationUser: OrganizationUserInterface + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type CollaboratorAccessRequirements { + """ + The collaborator access code for the shop. + """ + accessCode: String + + """ + Whether collaborator access code is enabled. + """ + accessCodeEnabled: Boolean! + + """ + Whether partner apps are installed on the shop. + """ + hasPartnerApps: Boolean! + + """ + Whether collaborator access code is required. + """ + requiresAccessCode: Boolean! +} + +enum CollaboratorAccessStatus { + """ + The users access is pending. + """ + ACCESS_PENDING + + """ + The user is active. + """ + ACTIVE + + """ + The users access has expired. + """ + EXPIRED + + """ + The users access is inactive. + """ + INACTIVE +} + +type CollaboratorPermissionResult { + """ + Whether the user has the requested collaborator permission. True if + authorized, false if denied, null if the result is inconclusive. + """ + hasPermission: Boolean +} + +type CollaboratorRelationship implements Node { + """ + The date and time when this collaborator relationship was approved. + """ + approvedAt: ISO8601DateTime + + """ + The date and time when this collaborator relationship was created. + """ + createdAt: ISO8601DateTime! + + """ + The ID for an object. + """ + id: GlobalID! + + """ + The date and time when this collaborator relationship was last re-requested. + """ + lastRerequestAt: ISO8601DateTime + + """ + The organization user ID associated with this collaborator relationship. + """ + organizationUserId: OrganizationUserID + queryComplexity: Int! + queryDepth: Int! + + """ + The shop this collaborator relationship is associated with. + """ + shop: Shop + + """ + The Shopify collaborator user ID (GID) for this collaborator relationship. + """ + shopifyCollaboratorUserId: String + + """ + The status of this collaborator relationship. + """ + status: CollaboratorAccessStatus! +} + +""" +A summary of collaborator relationship access for the user. +""" +type CollaboratorRelationshipAccessSummary { + """ + Shop ids of shops the user has collaborator relationship access to. + """ + shopifyShopIds: [ShopifyShopID!] +} + +""" +The connection type for Shop. +""" +type ConnectedShopsConnection { + """ + A list of edges. + """ + edges: [ShopEdge!]! + + """ + A list of nodes. + """ + nodes: [Shop!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + Total count of active shops connected to this legal entity as reported by QueryEngine. Snapshot data may be stale. + """ + totalCount: Int +} + +input ConvertUsersFromSamlInput { + """ + The IDs of the Organization users to convert from SAML. + """ + organizationUserIds: [OrganizationUserID!]! +} + +type ConvertUsersFromSamlResult { + """ + The organization that was updated. + """ + organization: Organization! + + """ + List of user errors from removing SAML access. + """ + userErrors: [UserError!] +} + +input ConvertUsersToSamlInput { + """ + IDs of the users to convert to SAML. + """ + organizationUserIds: [OrganizationUserID!]! +} + +type ConvertUsersToSamlResult { + """ + The organization object. + """ + organization: Organization + + """ + List of user errors for convert users to saml operation. + """ + userErrors: [UserError!] +} + +enum CountryCode { + AC + AD + AE + AF + AG + AI + AL + AM + AO + AR + AT + AU + AW + AX + AZ + BA + BB + BD + BE + BF + BG + BH + BI + BJ + BL + BM + BN + BO + BQ + BR + BS + BT + BV + BW + BY + BZ + CA + CC + CD + CF + CG + CH + CI + CK + CL + CM + CN + CO + CR + CU + CV + CW + CX + CY + CZ + DE + DJ + DK + DM + DO + DZ + EC + EE + EG + EH + ER + ES + ET + FI + FJ + FK + FO + FR + GA + GB + GD + GE + GF + GG + GH + GI + GL + GM + GN + GP + GQ + GR + GS + GT + GW + GY + HK + HM + HN + HR + HT + HU + ID + IE + IL + IM + IN + IO + IQ + IR + IS + IT + JE + JM + JO + JP + KE + KG + KH + KI + KM + KN + KP + KR + KW + KY + KZ + LA + LB + LC + LI + LK + LR + LS + LT + LU + LV + LY + MA + MC + MD + ME + MF + MG + MK + ML + MM + MN + MO + MQ + MR + MS + MT + MU + MV + MW + MX + MY + MZ + NA + NC + NE + NF + NG + NI + NL + NO + NP + NR + NU + NZ + OM + PA + PE + PF + PG + PH + PK + PL + PM + PN + PS + PT + PY + QA + RE + RO + RS + RU + RW + SA + SB + SC + SD + SE + SG + SH + SI + SJ + SK + SL + SM + SN + SO + SR + SS + ST + SV + SX + SY + SZ + TA + TC + TD + TF + TG + TH + TJ + TK + TL + TM + TN + TO + TR + TT + TV + TW + TZ + UA + UG + UM + US + UY + UZ + VA + VC + VE + VG + VN + VU + WF + WS + XK + YE + YT + ZA + ZM + ZW +} + +enum CountryCodeWithDefault { + AC + AD + AE + AF + AG + AI + AL + AM + AO + AR + AT + AU + AW + AX + AZ + BA + BB + BD + BE + BF + BG + BH + BI + BJ + BL + BM + BN + BO + BQ + BR + BS + BT + BV + BW + BY + BZ + CA + CC + CD + CF + CG + CH + CI + CK + CL + CM + CN + CO + CR + CU + CV + CW + CX + CY + CZ + DE + + """ + The default fallback country code. + """ + DEFAULT + DJ + DK + DM + DO + DZ + EC + EE + EG + EH + ER + ES + ET + FI + FJ + FK + FO + FR + GA + GB + GD + GE + GF + GG + GH + GI + GL + GM + GN + GP + GQ + GR + GS + GT + GW + GY + HK + HM + HN + HR + HT + HU + ID + IE + IL + IM + IN + IO + IQ + IR + IS + IT + JE + JM + JO + JP + KE + KG + KH + KI + KM + KN + KP + KR + KW + KY + KZ + LA + LB + LC + LI + LK + LR + LS + LT + LU + LV + LY + MA + MC + MD + ME + MF + MG + MK + ML + MM + MN + MO + MQ + MR + MS + MT + MU + MV + MW + MX + MY + MZ + NA + NC + NE + NF + NG + NI + NL + NO + NP + NR + NU + NZ + OM + PA + PE + PF + PG + PH + PK + PL + PM + PN + PS + PT + PY + QA + RE + RO + RS + RU + RW + SA + SB + SC + SD + SE + SG + SH + SI + SJ + SK + SL + SM + SN + SO + SR + SS + ST + SV + SX + SY + SZ + TA + TC + TD + TF + TG + TH + TJ + TK + TL + TM + TN + TO + TR + TT + TV + TW + TZ + UA + UG + UM + US + UY + UZ + VA + VC + VE + VG + VN + VU + WF + WS + XK + YE + YT + ZA + ZM + ZW +} + +type CreateAppDevelopmentStoreResult { + shopAdminUrl: String + shopDomain: String + + """ + The ID of the newly created shop in Shopify. + """ + shopifyShopId: ID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Input for creating an attestation against an organization-scoped resource. +""" +input CreateAttestationInput { + """ + Canonical GID of the resource being attested (e.g. gid://organization/LegalEntity/123). + """ + attestableGid: String! + + """ + Handle of the attestation type being recorded. + """ + attestationTypeHandle: AttestationTypeHandle! + + """ + Domain-specific payload captured at attestation time (e.g. declared UBOs). Must be a JSON object. + """ + attestedData: JSON + + """ + Identity UUID of the attester. + """ + attesterIdentityUuid: String! + + """ + Auxiliary metadata (e.g. ipAddress, userAgent). Only supported keys are persisted. + """ + metadata: JSON + + """ + IDs of pre-staged supporting documents to link to this attestation as evidence. + """ + supportingDocumentIds: [SupportingDocumentID!] +} + +""" +Result of the createAttestation mutation. +""" +type CreateAttestationResult { + """ + The persisted attestation, or null when the mutation failed. + """ + attestation: Attestation + + """ + Errors encountered while attempting to create the attestation. + """ + userErrors: [UserError!]! +} + +input CreateCliTokenOrganizationUserInput { + """ + The ID of the organization. + """ + organizationId: OrganizationID! + + """ + Handle of the system role to assign (e.g. 'automated_app_development'). + """ + roleHandle: String! + + """ + Email address of the service account. + """ + userEmail: String! + + """ + Identity UUID of the service account. + """ + userIdentityUuid: String! +} + +type CreateCliTokenOrganizationUserResult { + """ + The ID of the created organization user. + """ + organizationUserId: OrganizationUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type CreateClientDevelopmentShopResult { + shopAdminUrl: String + shopDomain: String + shopId: ID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input CreateCollaboratorRelationshipInput { + """ + Whether the collaborator relationship request required an access code. + """ + accessCodeRequired: Boolean + + """ + The UTC datetime the collaborator relationship was approved. + """ + approvedAt: ISO8601DateTime + + """ + The UTC datetime the collaborator relationship ended. + """ + endedAt: ISO8601DateTime + + """ + The ID of the organization the collaborator relationship belongs to. + """ + organizationId: OrganizationID! + + """ + The UTC datetime the collaborator relationship was rejected. + """ + rejectedAt: ISO8601DateTime + + """ + The ID of the shop associated with the collaborator relationship. + """ + shopifyShopId: PropertyPublicID! + + """ + The ID of the shop user associated with the collaborator relationship. + """ + shopifyUserId: ID! + + """ + The UTC datetime the collaborator relationship started. + """ + startedAt: ISO8601DateTime +} + +type CreateCollaboratorRelationshipResult { + """ + The collaborator relationship that was created. + """ + collaboratorRelationship: CollaboratorRelationship + + """ + Errors that occurred while creating the collaborator relationship. + """ + userErrors: [UserError!] +} + +input CreateGovernmentIdentifierForLegalEntityInput { + """ + The country code of the GovernmentIdentifier. + """ + countryCode: CountryCode! + + """ + The type of the GovernmentIdentifier. + """ + identifierType: GovernmentIdentifierTypeInput! + + """ + The legal entity to create the government identifier for. + """ + legalEntityId: LegalEntityID! + + """ + The value of the GovernmentIdentifier. + """ + value: String! +} + +input CreateGovernmentIdentifierInput { + """ + The country code of the GovernmentIdentifier. + """ + countryCode: CountryCode! + + """ + The entity to create the government identifier for. + """ + entityId: SupportedEntityId! + + """ + The type of the GovernmentIdentifier. + """ + identifierType: GovernmentIdentifierTypeInput! + + """ + The value of the GovernmentIdentifier. + """ + value: String! +} + +input CreateLegalEntityInput { + """ + The address of the entity. + """ + address: AddressInput + + """ + The category of the entity. + """ + category: ValidLegalEntityCategoryInput! + + """ + The country where the entity is registered. + """ + countryCode: CountryCode! + + """ + The individual when the entity is not registered. + """ + individual: IndividualInput + + """ + Whether the entity is registered. + """ + isRegistered: Boolean + + """ + The specific type of legal entity. + """ + legalEntityType: LegalEntityTypeInput + + """ + The legal name of the entity. + """ + legalName: String + + """ + The nickname of the entity. + """ + nickname: String + + """ + The phone number associated with the entity. + """ + phoneNumber: String + + """ + The trade name of the entity. + """ + tradeName: String @deprecated(reason: "Trade name is deprecated from Legal Entity scope and will be replaced with a shop scope field.") +} + +input CreateLegalEntityOnSignupInput { + """ + The address of the entity. + """ + address: AddressInput + + """ + The country where the entity is registered. + """ + countryCode: CountryCode! + + """ + The nickname of the entity. + """ + nickname: String +} + +""" +The result of creating a legal entity tax filing preference. +""" +type CreateLegalEntityTaxFilingPreferenceResult { + """ + The legal entity tax filing preference that was created. + """ + legalEntityTaxFilingPreference: LegalEntityTaxFilingPreference + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input CreateOrganizationDomainInput { + """ + The given domain. + """ + domainName: String +} + +type CreateOrganizationDomainResult { + """ + The organization object. + """ + organization: Organization + + """ + The collection of errors. + """ + userErrors: [UserError!] + + """ + The generated domain verification code. + """ + verificationCode: String +} + +input CreateOrganizationUsersInput { + """ + List of administrative permissions to be granted to the created OrganizationUser(s). + """ + administrativePermissions: [String!] + + """ + The emails of the users to be invited / created. + """ + emails: [String!]! + + """ + The ID of the Role to grant to the user. + """ + roleId: RoleID + + """ + List of shop access to be granted to the created OrganizationUser(s). + """ + shopAccesses: [ShopAccessInput!] + + """ + Whether or not TFA is enforced for the created OrganizationUser(s). + """ + tfaEnforced: Boolean +} + +type CreateOrganizationUsersResult { + """ + The emails of the invited users. + """ + emails: [String!] + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input CreatePartnerOrganizationUserInput { + """ + The ID of the Partner organization. + """ + organizationId: OrganizationID! + + """ + The ID of the organization user requesting the new user to join. + """ + requesterOrganizationUserId: OrganizationUserID + + """ + Identity UUID of the user. + """ + userIdentityUuid: String! +} + +type CreatePartnerOrganizationUserResult { + """ + The ID of the created organization user. + """ + organizationUserId: OrganizationUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input CreatePartnerShopTransferInput { + """ + Email of the user the shop is being transferred to. + """ + externalRecipientEmail: String + + """ + The id of the organization that owns the shop to be transferred. + """ + organizationId: OrganizationID! + + """ + UUID of the user who requested transferring the shop. + """ + requesterUuid: String! + + """ + The id of the shop to be transferred. + """ + shopifyShopId: ShopifyShopID! +} + +type CreatePartnerShopTransferResult { + """ + The ID of the new owning organization. + """ + targetOrganizationId: OrganizationID + + """ + The token of the PropertyTransferRequest. + """ + token: String + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input CreatePersonAliasInput { + """ + The alias variants of the person alias. + """ + aliasVariants: [NameVariantInput!] + + """ + The first name of the person alias. + """ + firstName: String + + """ + The last name of the person alias. + """ + lastName: String + + """ + The middle name of the person alias. + """ + middleName: String + + """ + The ID of the person this alias belongs to. + """ + personId: PersonID! + + """ + The prefix of the person alias. + """ + prefix: String + + """ + The suffix of the person alias. + """ + suffix: String +} + +input CreatePersonInput { + """ + The address of the person. + """ + address: AddressInput + + """ + The date of birth of the person. + """ + dateOfBirth: ISO8601Date + + """ + The email associated with the person. + """ + email: String + + """ + The first name of the person. + """ + firstName: String + + """ + The last name of the person. + """ + lastName: String + + """ + The middle name of the person. + """ + middleName: String + + """ + The name variants of the person. + """ + nameVariants: [NameVariantInput!] + + """ + The nationalities of the person. + """ + nationalities: [CountryCode!] + + """ + The phone number associated with the person. + """ + phoneNumber: String + + """ + The prefix of the person. + """ + prefix: String + + """ + The suffix of the person. + """ + suffix: String +} + +input CreatePrincipalInput { + """ + The address of the person. + """ + applicableAddress: AssignOrCreateAddressInput + + """ + The business attributes associated with the principal. + """ + businessAttributes: BusinessPrincipalInput + + """ + The contact information associated with the principal. + """ + contactInformation: PrincipalContactInformationInput + + """ + The legal entity identifier to create the person relationship with. + """ + legalEntityId: LegalEntityID! + + """ + Additional person details. + """ + person: UpdatePersonInput + + """ + The person identifier to create the legal entity relationship with. + """ + personId: PersonID! +} + +""" +The result of creating a principal. +""" +type CreatePrincipalResult { + """ + The created principal. + """ + principal: Principal + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input CreatePropertyTransferRequestInput { + """ + The external id of the property to be transferred. + """ + externalId: PropertyPublicID! + + """ + Email of the user the property is being transferred to. + """ + externalRecipientEmail: String + + """ + Transfer type (internal/external). + """ + transferType: PropertyTransfer! +} + +type CreatePropertyTransferRequestResult { + """ + The token of the PropertyTransferRequest. + """ + token: String + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input CreateStoreAdditionRequestInput { + """ + The internal store code. + """ + customInternalStoreCode: String + + """ + The internal store name. + """ + customInternalStoreName: String + + """ + The legal entity id for the store. + """ + legalEntityId: LegalEntityID + + """ + The reason for the store addition request. + """ + reason: String + + """ + The store copy request details. + """ + storeCopyRequestDetails: StoreCopyCreationInput + + """ + The public store name. + """ + storeName: String! + + """ + The store type. + """ + storeType: Store! + + """ + The subdomain of the store. + """ + subdomain: String! + + """ + Whether the store is within the brand. + """ + withinBrand: Boolean! +} + +type CreateStoreAdditionRequestResult { + """ + The newly created store addition request. + """ + storeAdditionRequest: StoreAdditionRequest + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type CreateStoreResult { + shopAdminUrl: String + shopDomain: String + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input CreateVibeTransferRequestInput { + """ + Email of the user the shop is being transferred to. + """ + externalRecipientEmail: String! + + """ + Optional URL to redirect to after the transfer is accepted. + """ + returnUrl: String + + """ + The ID of the shop to be transferred. + """ + shopId: PropertyPublicID! +} + +type CreateVibeTransferRequestResult { + """ + The claim URL for the store transfer. + """ + claimStoreUrl: String + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Content types supported for CSV user import file uploads +""" +enum CsvFileContent { + """ + CSV file. + """ + TEXT_CSV +} + +""" +ISO currency code. +""" +enum CurrencyCode { + """ + United Arab Emirates Dirham + """ + AED + + """ + Afghan Afghani + """ + AFN + + """ + Albanian Lek + """ + ALL + + """ + Armenian Dram + """ + AMD + + """ + Netherlands Antillean Gulden + """ + ANG + + """ + Angolan Kwanza + """ + AOA + + """ + Argentine Peso + """ + ARS + + """ + Australian Dollar + """ + AUD + + """ + Aruban Florin + """ + AWG + + """ + Azerbaijani Manat + """ + AZN + + """ + Bosnia and Herzegovina Convertible Mark + """ + BAM + + """ + Barbadian Dollar + """ + BBD + + """ + Bangladeshi Taka + """ + BDT + + """ + Bulgarian Lev + """ + BGN + + """ + Bahraini Dinar + """ + BHD + + """ + Burundian Franc + """ + BIF + + """ + Bermudian Dollar + """ + BMD + + """ + Brunei Dollar + """ + BND + + """ + Bolivian Boliviano + """ + BOB + + """ + Brazilian Real + """ + BRL + + """ + Bahamian Dollar + """ + BSD + + """ + Bhutanese Ngultrum + """ + BTN + + """ + Botswana Pula + """ + BWP + + """ + Belarusian Ruble + """ + BYN + + """ + Belarusian Ruble + """ + BYR + + """ + Belize Dollar + """ + BZD + + """ + Canadian Dollar + """ + CAD + + """ + Congolese Franc + """ + CDF + + """ + Swiss Franc + """ + CHF + + """ + Unidad de Fomento + """ + CLF + + """ + Chilean Peso + """ + CLP + + """ + Chinese Renminbi Yuan + """ + CNY + + """ + Colombian Peso + """ + COP + + """ + Costa Rican Colón + """ + CRC + + """ + Cuban Convertible Peso + """ + CUC + + """ + Cuban Peso + """ + CUP + + """ + Cape Verdean Escudo + """ + CVE + + """ + Cypriot pound + """ + CYP + + """ + Czech Koruna + """ + CZK + + """ + Djiboutian Franc + """ + DJF + + """ + Danish Krone + """ + DKK + + """ + Dominican Peso + """ + DOP + + """ + Algerian Dinar + """ + DZD + + """ + Estonian Kroon + """ + EEK + + """ + Egyptian Pound + """ + EGP + + """ + Eritrean Nakfa + """ + ERN + + """ + Ethiopian Birr + """ + ETB + + """ + Euro + """ + EUR + + """ + Fijian Dollar + """ + FJD + + """ + Falkland Pound + """ + FKP + + """ + British Pound + """ + GBP + + """ + British Penny + """ + GBX + + """ + Georgian Lari + """ + GEL + + """ + Guernsey Pound + """ + GGP + + """ + Ghanaian Cedi + """ + GHC + + """ + Ghanaian Cedi + """ + GHS + + """ + Gibraltar Pound + """ + GIP + + """ + Gambian Dalasi + """ + GMD + + """ + Guinean Franc + """ + GNF + + """ + Guatemalan Quetzal + """ + GTQ + + """ + Guyanese Dollar + """ + GYD + + """ + Hong Kong Dollar + """ + HKD + + """ + Honduran Lempira + """ + HNL + + """ + Croatian Kuna + """ + HRK + + """ + Haitian Gourde + """ + HTG + + """ + Hungarian Forint + """ + HUF + + """ + Indonesian Rupiah + """ + IDR + + """ + Israeli New Shekel + """ + ILS + + """ + Isle of Man Pound + """ + IMP + + """ + Indian Rupee + """ + INR + + """ + Iraqi Dinar + """ + IQD + + """ + Iranian Rial + """ + IRR + + """ + Icelandic Króna + """ + ISK + + """ + Jersey Pound + """ + JEP + + """ + Jamaican Dollar + """ + JMD + + """ + Jordanian Dinar + """ + JOD + + """ + Japanese Yen + """ + JPY + + """ + Kenyan Shilling + """ + KES + + """ + Kyrgyzstani Som + """ + KGS + + """ + Cambodian Riel + """ + KHR + + """ + Kiribati Dollar + """ + KID + + """ + Comorian Franc + """ + KMF + + """ + North Korean Won + """ + KPW + + """ + South Korean Won + """ + KRW + + """ + Kuwaiti Dinar + """ + KWD + + """ + Cayman Islands Dollar + """ + KYD + + """ + Kazakhstani Tenge + """ + KZT + + """ + Lao Kip + """ + LAK + + """ + Lebanese Pound + """ + LBP + + """ + Sri Lankan Rupee + """ + LKR + + """ + Liberian Dollar + """ + LRD + + """ + Lesotho Loti + """ + LSL + + """ + Lithuanian Litas + """ + LTL + + """ + Latvian Lats + """ + LVL + + """ + Libyan Dinar + """ + LYD + + """ + Moroccan Dirham + """ + MAD + + """ + Moldovan Leu + """ + MDL + + """ + Malagasy Ariary + """ + MGA + + """ + Macedonian Denar + """ + MKD + + """ + Myanmar Kyat + """ + MMK + + """ + Mongolian Tögrög + """ + MNT + + """ + Macanese Pataca + """ + MOP + + """ + Mauritanian Ouguiya + """ + MRO + + """ + Mauritanian New Ouguiya + """ + MRU + + """ + Maltese Lira + """ + MTL + + """ + Mauritian Rupee + """ + MUR + + """ + Maldivian Rufiyaa + """ + MVR + + """ + Malawian Kwacha + """ + MWK + + """ + Mexican Peso + """ + MXN + + """ + Malaysian Ringgit + """ + MYR + + """ + Mozambican Metical + """ + MZN + + """ + Namibian Dollar + """ + NAD + + """ + Nigerian Naira + """ + NGN + + """ + Nicaraguan Córdoba + """ + NIO + + """ + Norwegian Krone + """ + NOK + + """ + Nepalese Rupee + """ + NPR + + """ + New Zealand Dollar + """ + NZD + + """ + Omani Rial + """ + OMR + + """ + Panamanian Balboa + """ + PAB + + """ + Peruvian Sol + """ + PEN + + """ + Papua New Guinean Kina + """ + PGK + + """ + Philippine Peso + """ + PHP + + """ + Pakistani Rupee + """ + PKR + + """ + Polish Złoty + """ + PLN + + """ + Paraguayan Guaraní + """ + PYG + + """ + Qatari Riyal + """ + QAR + + """ + Romanian Leu + """ + RON + + """ + Serbian Dinar + """ + RSD + + """ + Russian Ruble + """ + RUB + + """ + Rwandan Franc + """ + RWF + + """ + Saudi Riyal + """ + SAR + + """ + Solomon Islands Dollar + """ + SBD + + """ + Seychellois Rupee + """ + SCR + + """ + Sudanese Pound + """ + SDG + + """ + Swedish Krona + """ + SEK + + """ + Singapore Dollar + """ + SGD + + """ + Saint Helenian Pound + """ + SHP + + """ + Slovak Koruna + """ + SKK + + """ + New Leone + """ + SLE + + """ + Sierra Leonean Leone + """ + SLL + + """ + Somali Shilling + """ + SOS + + """ + Surinamese Dollar + """ + SRD + + """ + South Sudanese Pound + """ + SSP + + """ + São Tomé and Príncipe Dobra + """ + STD + + """ + São Tomé and Príncipe Dobra + """ + STN + + """ + Salvadoran Colón + """ + SVC + + """ + Syrian Pound + """ + SYP + + """ + Swazi Lilangeni + """ + SZL + + """ + Thai Baht + """ + THB + + """ + Tajikistani Somoni + """ + TJS + + """ + Turkmenistani Manat + """ + TMM + + """ + Turkmenistani Manat + """ + TMT + + """ + Tunisian Dinar + """ + TND + + """ + Tongan Paʻanga + """ + TOP + + """ + Turkish Lira + """ + TRY + + """ + Trinidad and Tobago Dollar + """ + TTD + + """ + New Taiwan Dollar + """ + TWD + + """ + Tanzanian Shilling + """ + TZS + + """ + Ukrainian Hryvnia + """ + UAH + + """ + Ugandan Shilling + """ + UGX + + """ + United States Dollar + """ + USD + + """ + Uruguayan Peso + """ + UYU + + """ + Uzbekistan Som + """ + UZS + + """ + Venezuelan Bolívar + """ + VEB + + """ + Venezuelan Bolívar soberano + """ + VED + + """ + Venezuelan Bolívar fuerte + """ + VEF + + """ + Venezuelan Bolívar Soberano + """ + VES + + """ + Vietnamese Đồng + """ + VND + + """ + Vanuatu Vatu + """ + VUV + + """ + Samoan Tala + """ + WST + + """ + Central African Cfa Franc + """ + XAF + + """ + Silver (Troy Ounce) + """ + XAG + + """ + Gold (Troy Ounce) + """ + XAU + + """ + European Composite Unit + """ + XBA + + """ + European Monetary Unit + """ + XBB + + """ + European Unit of Account 9 + """ + XBC + + """ + European Unit of Account 17 + """ + XBD + + """ + East Caribbean Dollar + """ + XCD + + """ + Special Drawing Rights + """ + XDR + + """ + UIC Franc + """ + XFU + + """ + West African Cfa Franc + """ + XOF + + """ + Palladium + """ + XPD + + """ + Cfp Franc + """ + XPF + + """ + Platinum + """ + XPT + + """ + Codes specifically reserved for testing purposes + """ + XTS + + """ + Yemeni Rial + """ + YER + + """ + South African Rand + """ + ZAR + + """ + Zambian Kwacha + """ + ZMK + + """ + Zambian Kwacha + """ + ZMW + + """ + Zimbabwean Dollar + """ + ZWD + + """ + Zimbabwean Dollar + """ + ZWL + + """ + Zimbabwean Dollar + """ + ZWN + + """ + Zimbabwean Dollar + """ + ZWR +} + +""" +A signed decimal number, which supports arbitrary precision and is serialized as a string. +""" +scalar Decimal + +input DeleteCliTokenOrganizationUserInput { + """ + The identity UUID of the CLI token service account to delete. + """ + organizationUserIdentityUuid: String! +} + +type DeleteCliTokenOrganizationUserResult { + """ + The ID of the deleted organization user. + """ + deletedOrganizationUserId: OrganizationUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Inputs for deleting government identifiers. +""" +input DeleteGovernmentIdentifiersInput { + """ + The IDs of the GovernmentIdentifiers to delete. + """ + ids: [GovernmentIdentifierID!]! +} + +""" +The result of deleting government identifiers. +""" +type DeleteGovernmentIdentifiersResult { + """ + The IDs of the deleted_government_identifiers. + """ + deletedIds: [GovernmentIdentifierID!] + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input DeleteOrganizationDomainInput { + """ + The given domain. + """ + domainName: String! +} + +type DeleteOrganizationDomainResult { + """ + The organization object. + """ + organization: Organization + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type DeleteOrganizationUsersResult { + """ + Organization User IDs that were deleted. + """ + organizationUserIds: [OrganizationUserID!] + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input DeletePartnerOrganizationUserInput { + """ + The ID of the Partner organization user to be deleted. + """ + organizationUserId: OrganizationUserID! + + """ + The ID of the organization user requesting the user to be deleted. + """ + requesterOrganizationUserId: OrganizationUserID +} + +type DeletePartnerOrganizationUserResult { + """ + Organization User ID that was deleted. + """ + deletedOrganizationUserId: OrganizationUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +The result of deleting people. +""" +type DeletePeopleResult { + """ + The IDs of the deleted people. + """ + deletedIds: [PersonID!] + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input DeletePersonAliasInput { + """ + The ID of the person alias to delete. + """ + id: PersonAliasID! +} + +""" +The result of deleting principals. +""" +type DeletePrincipalsResult { + """ + The IDs of the deleted principals. + """ + deletedIds: [PrincipalID!] + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input DeleteRoleInput { + """ + The ID of the Role to delete. + """ + id: RoleID! +} + +type DeleteRoleResult { + """ + The deleted role id. + """ + deletedId: RoleID + + """ + List of user errors of role delete operation. + """ + userErrors: [UserError!] +} + +type DeleteSamlIntegrationResult { + """ + The organization object. + """ + organization: Organization + + """ + List of user errors of SAML integration delete operation. + """ + userErrors: [UserError!] +} + +type DeleteScimTokenResult { + """ + The organization object. + """ + organization: Organization + + """ + List of user errors of remove scim token operation. + """ + userErrors: [UserError!] +} + +""" +The result of deleting supporting documents. +""" +type DeleteSupportingDocumentsResult { + """ + The IDs of the deleted supporting documents. + """ + deletedIds: [EntitySupportingDocumentID!] + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type DirectUploadParams { + """ + Attachment linked to the blob. + """ + attachment: DocumentAttachment! + + """ + Token used to refer to file with these parameters. + """ + directUploadToken: String! + + """ + Headers of a signed file upload request. + """ + headers: [UploadHeader!]! + + """ + Endpoint to upload file directly to storage service. + """ + url: String! +} + +enum Document { + """ + Bank Statement + """ + AE_BANK_STATEMENT + + """ + Digital Visa + """ + AE_DIGITAL_VISA + + """ + Drivers License + """ + AE_DRIVERS_LICENSE + + """ + Freelancer Permit + """ + AE_FREELANCER_PERMIT + + """ + Digital/Physical Emirates ID card + """ + AE_IDENTITY_CARD + + """ + Memorandum of Association + """ + AE_MEMORANDUM_OF_ASSOCIATION + + """ + Passport + """ + AE_PASSPORT + + """ + Digital/Physical Emirates ID card - issued after April 11, 2022 + """ + AE_PHYSICAL_VISA + + """ + Power of Attorney + """ + AE_POWER_OF_ATTORNEY + + """ + Proof of Bank Account + """ + AE_PROOF_OF_BANK_ACCOUNT + + """ + Residence Visa + """ + AE_RESIDENCE_VISA + + """ + Trade License + """ + AE_TRADE_LICENSE + + """ + Alien Passport + """ + AT_ALIEN_PASSPORT + + """ + Asylum Seeker Passport + """ + AT_ASYLUM_SEEKER_PASSPORT + + """ + Bank Statement + """ + AT_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + AT_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Residence + """ + AT_CERTIFICATE_OF_RESIDENCE + + """ + Commercial Register Extract + """ + AT_COMMERCIAL_REGISTER_EXTRACT + + """ + Director Attestation + """ + AT_DIRECTOR_ATTESTATION + + """ + Donation Deduction Certificate + """ + AT_DONATION_DEDUCTION_CERTIFICATE + + """ + Drivers License + """ + AT_DRIVERS_LICENSE + + """ + Financial Statement + """ + AT_FINANCIAL_STATEMENT + + """ + Foreigner Identity Card + """ + AT_FOREIGNER_IDENTITY_CARD + + """ + Government Issued Letter + """ + AT_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + AT_IDENTITY_CARD + + """ + Other Supporting Document + """ + AT_OTHER + + """ + Passport + """ + AT_PASSPORT + + """ + Phone Bill + """ + AT_PHONE_BILL + + """ + Photo Card + """ + AT_PHOTO_CARD + + """ + Proof Of Address + """ + AT_PROOF_OF_ADDRESS + + """ + Resident Permit ID + """ + AT_RESIDENT_PERMIT_ID + + """ + Signed Annual Report + """ + AT_SIGNED_ANNUAL_REPORT + + """ + Tax Registration Certificate + """ + AT_TAX_REGISTRATION_CERTIFICATE + + """ + Temporary Resident Permit + """ + AT_TEMPORARY_RESIDENT_PERMIT + + """ + UBO Attestation + """ + AT_UBO_ATTESTATION + + """ + Utility Bill + """ + AT_UTILITY_BILL + + """ + Articles Of Association + """ + AU_ARTICLES_OF_ASSOCIATION + + """ + Bank Statement + """ + AU_BANK_STATEMENT + + """ + Certificate Of Incorporation + """ + AU_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Registration + """ + AU_CERTIFICATE_OF_REGISTRATION + + """ + Commercial Register Extract + """ + AU_COMMERCIAL_REGISTER_EXTRACT + + """ + Drivers License + """ + AU_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + AU_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + AU_IDENTITY_CARD + + """ + National Health ID + """ + AU_NATIONAL_HEALTH_ID + + """ + Other Supporting Document + """ + AU_OTHER + + """ + Passport + """ + AU_PASSPORT + + """ + Phone Bill + """ + AU_PHONE_BILL + + """ + Photo Card + """ + AU_PHOTO_CARD + + """ + Proof Of Address + """ + AU_PROOF_OF_ADDRESS + + """ + Proof Of Business Registration + """ + AU_PROOF_OF_BUSINESS_REGISTRATION + + """ + Tax Registration Certificate + """ + AU_TAX_REGISTRATION_CERTIFICATE + + """ + Utility Bill + """ + AU_UTILITY_BILL + + """ + Articles of Incorporation + """ + BE_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + BE_BANK_STATEMENT + + """ + Certificate of Residence + """ + BE_CERTIFICATE_OF_RESIDENCE + + """ + Commercial Register Extract + """ + BE_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + BE_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + BE_DIRECTOR_ATTESTATION + + """ + Driver's License + """ + BE_DRIVERS_LICENSE + + """ + Financial Statement + """ + BE_FINANCIAL_STATEMENT + + """ + Foreigner Identity Card + """ + BE_FOREIGNER_IDENTITY_CARD + + """ + Government Issued Letter + """ + BE_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + BE_IDENTITY_CARD + + """ + Mortgage Statement + """ + BE_MORTGAGE_STATEMENT + + """ + Official Belgian Register Appendices + """ + BE_OFFICIAL_BELGIAN_REGISTER_APPENDICES + + """ + Passport + """ + BE_PASSPORT + + """ + Pension Book + """ + BE_PENSION_BOOK + + """ + Recent Annual Return + """ + BE_RECENT_ANNUAL_RETURN + + """ + Resident Permit + """ + BE_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + BE_SIGNED_ANNUAL_REPORT + + """ + UBO Attestation + """ + BE_UBO_ATTESTATION + + """ + Utility Bill + """ + BE_UTILITY_BILL + + """ + VAT Registration + """ + BE_VAT_REGISTRATION + + """ + Articles of Incorporation + """ + BG_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + BG_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + BG_BENEFICIAL_OWNER_REPORT + + """ + Commercial Register Extract + """ + BG_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + BG_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + BG_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + BG_DRIVERS_LICENSE + + """ + Identity Card + """ + BG_IDENTITY_CARD + + """ + Mortgage Statement + """ + BG_MORTGAGE_STATEMENT + + """ + Partnership Agreement + """ + BG_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + BG_PASSPORT + + """ + Registration Document + """ + BG_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + BG_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + BG_SIGNED_ANNUAL_REPORT + + """ + UBO Attestation + """ + BG_UBO_ATTESTATION + + """ + Utility Bill + """ + BG_UTILITY_BILL + + """ + VAT Registration + """ + BG_VAT_REGISTRATION + + """ + Bank Statement + """ + CA_BANK_STATEMENT + + """ + Birth Certificate + """ + CA_BIRTH_CERTIFICATE + + """ + Board Meeting Minutes or Resolutions + """ + CA_BOARD_MEETING_MINUTES_OR_RESOLUTIONS + + """ + Board Resolutions Account Opening + """ + CA_BOARD_RESOLUTIONS_ACCOUNT_OPENING + + """ + British Columbia Company Summary + """ + CA_BRITISH_COLUMBIA_COMPANY_SUMMARY + + """ + Charity Information Return + """ + CA_CHARITY_INFORMATION_RETURN + + """ + Corporate Profile Report + """ + CA_CORPORATE_PROFILE_REPORT + + """ + Corporate Status Certificate + """ + CA_CORPORATE_STATUS_CERTIFICATE + + """ + CRA Registration Status + """ + CA_CRA_REGISTRATION_STATUS + + """ + Drivers License + """ + CA_DRIVERS_LICENSE + + """ + Federally issued Corporate Profile Report + """ + CA_FEDERALLY_ISSUED_CORPORATE_PROFILE_REPORT + + """ + Financial Statement + """ + CA_FINANCIAL_STATEMENT + + """ + Government Issued Letter + """ + CA_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + CA_IDENTITY_CARD + + """ + Insurance Policy Document + """ + CA_INSURANCE_POLICY_DOCUMENT + + """ + Marriage Certificate + """ + CA_MARRIAGE_CERTIFICATE + + """ + Notice of Charity Registration + """ + CA_NOTICE_OF_CHARITY_REGISTRATION + + """ + Official Donation Receipts + """ + CA_OFFICIAL_DONATION_RECEIPTS + + """ + Ontario Corporate Profile Report + """ + CA_ONTARIO_CORPORATE_PROFILE_REPORT + + """ + Other Supporting Document + """ + CA_OTHER + + """ + Partnership registration or agreements + """ + CA_PARTNERSHIP_REGISTRATION_OR_AGREEMENTS + + """ + Passport + """ + CA_PASSPORT + + """ + Phone Bill + """ + CA_PHONE_BILL + + """ + Photo Card + """ + CA_PHOTO_CARD + + """ + Property Tax Statement + """ + CA_PROPERTY_TAX_STATEMENT + + """ + Quebec Enterprise Register Company Summary + """ + CA_QUEBEC_ENTERPRISE_REGISTER_COMPANY_SUMMARY + + """ + Registered Charity Information Report + """ + CA_REGISTERED_CHARITY_INFORMATION_REPORT + + """ + Signed Annual Report + """ + CA_SIGNED_ANNUAL_REPORT + + """ + Utility Bill + """ + CA_UTILITY_BILL + + """ + Articles of Incorporation + """ + CH_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + CH_BANK_STATEMENT + + """ + Certificate of Incorporation + """ + CH_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Incumbency + """ + CH_CERTIFICATE_OF_INCUMBENCY + + """ + Commercial Register Entry + """ + CH_COMMERCIAL_REGISTER_ENTRY + + """ + Commercial Register Extract + """ + CH_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + CH_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + CH_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + CH_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + CH_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + CH_IDENTITY_CARD + + """ + Passport + """ + CH_PASSPORT + + """ + Recent Annual Return + """ + CH_RECENT_ANNUAL_RETURN + + """ + Registration Document + """ + CH_REGISTRATION_DOCUMENT + + """ + Residence Certificate + """ + CH_RESIDENCE_CERTIFICATE + + """ + Resident Permit + """ + CH_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + CH_SIGNED_ANNUAL_REPORT + + """ + UBO Attestation + """ + CH_UBO_ATTESTATION + + """ + Utility Bill + """ + CH_UTILITY_BILL + + """ + VAT Registration + """ + CH_VAT_REGISTRATION + + """ + Articles of Association + """ + CY_ARTICLES_OF_ASSOCIATION + + """ + Articles of Incorporation + """ + CY_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + CY_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + CY_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Incorporation + """ + CY_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Registration + """ + CY_CERTIFICATE_OF_REGISTRATION + + """ + Commercial Register Extract + """ + CY_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + CY_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + CY_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + CY_DRIVERS_LICENSE + + """ + Financial Statement + """ + CY_FINANCIAL_STATEMENT + + """ + Identity Card + """ + CY_IDENTITY_CARD + + """ + Mortgage Statement + """ + CY_MORTGAGE_STATEMENT + + """ + Partnership Agreement + """ + CY_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + CY_PASSPORT + + """ + Registration Document + """ + CY_REGISTRATION_DOCUMENT + + """ + Signed Annual Report + """ + CY_SIGNED_ANNUAL_REPORT + + """ + Tax Bill + """ + CY_TAX_BILL + + """ + UBO Attestation + """ + CY_UBO_ATTESTATION + + """ + Utility Bill + """ + CY_UTILITY_BILL + + """ + VAT Registration + """ + CY_VAT_REGISTRATION + + """ + Articles of Association + """ + CZ_ARTICLES_OF_ASSOCIATION + + """ + Articles of Incorporation + """ + CZ_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + CZ_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + CZ_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Registration + """ + CZ_CERTIFICATE_OF_REGISTRATION + + """ + Commercial Register Extract + """ + CZ_COMMERCIAL_REGISTER_EXTRACT + + """ + Contract for Sale of Property + """ + CZ_CONTRACT_FOR_SALE_OF_PROPERTY + + """ + Director Attestation + """ + CZ_DIRECTOR_ATTESTATION + + """ + Driver's License + """ + CZ_DRIVERS_LICENSE + + """ + Financial Statement + """ + CZ_FINANCIAL_STATEMENT + + """ + Government Issued Letter + """ + CZ_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + CZ_IDENTITY_CARD + + """ + Mortgage Statement + """ + CZ_MORTGAGE_STATEMENT + + """ + Partnership Agreement + """ + CZ_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + CZ_PASSPORT + + """ + Property Register Extract + """ + CZ_PROPERTY_REGISTER_EXTRACT + + """ + Registration Document + """ + CZ_REGISTRATION_DOCUMENT + + """ + Residence Permit + """ + CZ_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + CZ_SIGNED_ANNUAL_REPORT + + """ + Tenancy Agreement + """ + CZ_TENANCY_AGREEMENT + + """ + Trade Registration + """ + CZ_TRADE_REGISTRATION + + """ + UBO Attestation + """ + CZ_UBO_ATTESTATION + + """ + Utility Bill + """ + CZ_UTILITY_BILL + + """ + VAT Registration + """ + CZ_VAT_REGISTRATION + + """ + Drivers License + """ + DEFAULT_DRIVERS_LICENSE + + """ + Other Supporting Document + """ + DEFAULT_OTHER + + """ + Passport + """ + DEFAULT_PASSPORT + + """ + Phone Bill + """ + DEFAULT_PHONE_BILL + + """ + Photo Card + """ + DEFAULT_PHOTO_CARD + + """ + Utility Bill + """ + DEFAULT_UTILITY_BILL + + """ + Bank Statement + """ + DE_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + DE_BENEFICIAL_OWNER_REPORT + + """ + Board Meeting Minutes or Resolutions + """ + DE_BOARD_MEETING_MINUTES_OR_RESOLUTIONS + + """ + Certificate of Incumbency + """ + DE_CERTIFICATE_OF_INCUMBENCY + + """ + Certificate of Residence + """ + DE_CERTIFICATE_OF_RESIDENCE + + """ + Commercial Register Extract + """ + DE_COMMERCIAL_REGISTER_EXTRACT + + """ + Director Attestation + """ + DE_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + DE_DRIVERS_LICENSE + + """ + Exemption Notice + """ + DE_EXEMPTION_NOTICE + + """ + Government Issued Letter + """ + DE_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + DE_IDENTITY_CARD + + """ + Landlord Letter + """ + DE_LANDLORD_LETTER + + """ + Mortgage Statement + """ + DE_MORTGAGE_STATEMENT + + """ + Other Supporting Document + """ + DE_OTHER + + """ + Passport + """ + DE_PASSPORT + + """ + Phone Bill + """ + DE_PHONE_BILL + + """ + Photo Card + """ + DE_PHOTO_CARD + + """ + Proof Of Address + """ + DE_PROOF_OF_ADDRESS + + """ + Register of Associations Extract + """ + DE_REGISTER_OF_ASSOCIATIONS_EXTRACT + + """ + Registration Document + """ + DE_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + DE_RESIDENT_PERMIT + + """ + Shareholder Register + """ + DE_SHAREHOLDER_REGISTER + + """ + Signed Annual Report + """ + DE_SIGNED_ANNUAL_REPORT + + """ + Signed Rental Tenancy Agreement + """ + DE_SIGNED_RENTAL_TENANCY_AGREEMENT + + """ + Tax Registration Certificate + """ + DE_TAX_REGISTRATION_CERTIFICATE + + """ + Trade License + """ + DE_TRADE_LICENSE + + """ + Trade Registration + """ + DE_TRADE_REGISTRATION + + """ + UBO Attestation + """ + DE_UBO_ATTESTATION + + """ + Utility Bill + """ + DE_UTILITY_BILL + + """ + Bank Statement + """ + DK_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + DK_BENEFICIAL_OWNER_REPORT + + """ + Bylaws Memorandum + """ + DK_BY_LAWS_MEMORANDUM + + """ + Certificate of Registration + """ + DK_CERTIFICATE_OF_REGISTRATION + + """ + City of Copenhagen Identity Card + """ + DK_CITY_OF_COPENHAGEN_IDENTITY_CARD + + """ + Commercial Register Extract + """ + DK_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + DK_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + DK_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + DK_DRIVERS_LICENSE + + """ + Financial Statements + """ + DK_FINANCIAL_STATEMENT + + """ + Identity Card + """ + DK_IDENTITY_CARD + + """ + Insurance Policy Document + """ + DK_INSURANCE_POLICY_DOCUMENT + + """ + Landlord Letter + """ + DK_LANDLORD_LETTER + + """ + Military Identity Card + """ + DK_MILITARY_IDENTITY_CARD + + """ + Mortgage Statement + """ + DK_MORTGAGE_STATEMENT + + """ + Other Supporting Document + """ + DK_OTHER + + """ + Partnership Agreement + """ + DK_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + DK_PASSPORT + + """ + Police Identity Card + """ + DK_POLICE_IDENTITY_CARD + + """ + Registration Document + """ + DK_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + DK_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + DK_SIGNED_ANNUAL_REPORT + + """ + Tax Registration Certificate + """ + DK_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + DK_UBO_ATTESTATION + + """ + Utility Bill + """ + DK_UTILITY_BILL + + """ + Articles of Incorporation + """ + EE_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + EE_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + EE_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Residence + """ + EE_CERTIFICATE_OF_RESIDENCE + + """ + Commercial Register Extract + """ + EE_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + EE_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + EE_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + EE_DRIVERS_LICENSE + + """ + Identity Card + """ + EE_IDENTITY_CARD + + """ + Partnership Agreement + """ + EE_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + EE_PASSPORT + + """ + Registration Document + """ + EE_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + EE_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + EE_SIGNED_ANNUAL_REPORT + + """ + Tax Certificate + """ + EE_TAX_CERTIFICATE + + """ + Trash Disposal Bill + """ + EE_TRASH_BILL + + """ + UBO Attestation + """ + EE_UBO_ATTESTATION + + """ + Utility Bill + """ + EE_UTILITY_BILL + + """ + VAT Registration + """ + EE_VAT_REGISTRATION + + """ + Articles of Incorporation + """ + ES_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + ES_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + ES_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Registration + """ + ES_CERTIFICATE_OF_REGISTRATION + + """ + Certificate of Residence + """ + ES_CERTIFICATE_OF_RESIDENCE + + """ + Director Attestation + """ + ES_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + ES_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + ES_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + ES_IDENTITY_CARD + + """ + NIF Document + """ + ES_NIF_DOCUMENT + + """ + Other Supporting Document + """ + ES_OTHER + + """ + Passport + """ + ES_PASSPORT + + """ + Phone Bill + """ + ES_PHONE_BILL + + """ + Photo Card + """ + ES_PHOTO_CARD + + """ + Proof Of Address + """ + ES_PROOF_OF_ADDRESS + + """ + Proof Of Business Registration + """ + ES_PROOF_OF_BUSINESS_REGISTRATION + + """ + Recent Annual Return + """ + ES_RECENT_ANNUAL_RETURN + + """ + Resident Permit ID + """ + ES_RESIDENT_PERMIT_ID + + """ + Shareholder Register + """ + ES_SHAREHOLDER_REGISTER + + """ + Signed Annual Report + """ + ES_SIGNED_ANNUAL_REPORT + + """ + Tax Registration Certificate + """ + ES_TAX_REGISTRATION_CERTIFICATE + + """ + Trade License + """ + ES_TRADE_LICENSE + + """ + UBO Attestation + """ + ES_UBO_ATTESTATION + + """ + Utility Bill + """ + ES_UTILITY_BILL + + """ + Articles of Association + """ + FI_ARTICLES_OF_ASSOCIATION + + """ + Articles of Incorporation + """ + FI_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + FI_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + FI_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Incumbency + """ + FI_CERTIFICATE_OF_INCUMBENCY + + """ + Commercial Register Extract + """ + FI_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + FI_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + FI_DIRECTOR_ATTESTATION + + """ + Driver's License + """ + FI_DRIVERS_LICENSE + + """ + Financial Statement + """ + FI_FINANCIAL_STATEMENT + + """ + Government Issued Letter + """ + FI_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + FI_IDENTITY_CARD + + """ + Mortgage Statement + """ + FI_MORTGAGE_STATEMENT + + """ + Passport + """ + FI_PASSPORT + + """ + Resident Permit + """ + FI_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + FI_SIGNED_ANNUAL_REPORT + + """ + Trade Registration + """ + FI_TRADE_REGISTRATION + + """ + UBO Attestation + """ + FI_UBO_ATTESTATION + + """ + Utility Bill + """ + FI_UTILITY_BILL + + """ + VAT Registration + """ + FI_VAT_REGISTRATION + + """ + Articles of Association + """ + FR_ARTICLES_OF_ASSOCIATION + + """ + Articles of Incorporation + """ + FR_ARTICLES_OF_INCORPORATION + + """ + Assignment Agreements + """ + FR_ASSIGNMENT_AGREEMENTS + + """ + Bank Statement + """ + FR_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + FR_BENEFICIAL_OWNER_REPORT + + """ + Board Meeting Minutes or Resolutions + """ + FR_BOARD_MEETING_MINUTES_OR_RESOLUTIONS + + """ + Certificate of Incorporation + """ + FR_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Incumbency + """ + FR_CERTIFICATE_OF_INCUMBENCY + + """ + Commercial Register Extract + """ + FR_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + FR_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + FR_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + FR_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + FR_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + FR_IDENTITY_CARD + + """ + Other Supporting Document + """ + FR_OTHER + + """ + Partnership Agreement + """ + FR_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + FR_PASSPORT + + """ + Phone Bill + """ + FR_PHONE_BILL + + """ + Photo Card + """ + FR_PHOTO_CARD + + """ + Proof of Address + """ + FR_PROOF_OF_ADDRESS + + """ + Proof of Business Registration + """ + FR_PROOF_OF_BUSINESS_REGISTRATION + + """ + Proof of VAT ID + """ + FR_PROOF_OF_VAT_ID + + """ + Recent Annual Return + """ + FR_RECENT_ANNUAL_RETURN + + """ + Registration Document + """ + FR_REGISTRATION_DOCUMENT + + """ + Securities Register + """ + FR_SECURITIES_REGISTER + + """ + Shareholder Agreements + """ + FR_SHAREHOLDER_AGREEMENTS + + """ + Shareholder Register + """ + FR_SHAREHOLDER_REGISTER + + """ + UBO Attestation + """ + FR_UBO_ATTESTATION + + """ + Utility Bill + """ + FR_UTILITY_BILL + + """ + Bank Statement + """ + GB_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + GB_BENEFICIAL_OWNER_REPORT + + """ + Benefits Agency Document + """ + GB_BENEFITS_AGENCY_DOCUMENT + + """ + Certificate of Incorporation + """ + GB_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Incumbency + """ + GB_CERTIFICATE_OF_INCUMBENCY + + """ + Charity Commission Document + """ + GB_CHARITY_COMMISSION_DOCUMENT + + """ + Companies House Document + """ + GB_COMPANIES_HOUSE_DOCUMENT + + """ + Confirmation Statement + """ + GB_CONFIRMATION_STATEMENT + + """ + Corporate Status Certificate + """ + GB_CORPORATE_STATUS_CERTIFICATE + + """ + Council Document + """ + GB_COUNCIL_DOCUMENT + + """ + Director Attestation + """ + GB_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + GB_DRIVERS_LICENSE + + """ + Electoral Register Entry Document + """ + GB_ELECTORAL_REGISTER_ENTRY_DOCUMENT + + """ + General Practitioner Letter of Registration + """ + GB_GENERAL_PRACTICIONER_LETTER_OF_REGISTRATION + + """ + Government Issued Letter + """ + GB_GOVERNMENT_ISSUED_LETTER + + """ + HM Revenue and Customs Account Statement + """ + GB_HM_REVENUE_AND_CUSTOMS_ACCOUNT_STATEMENT + + """ + HM Revenue and Customs VAT Certificate + """ + GB_HM_REVENUE_AND_CUSTOMS_VAT_CERTIFICATE + + """ + Housing Association Document + """ + GB_HOUSING_ASSOCIATION_DOCUMENT + + """ + Identity Card + """ + GB_IDENTITY_CARD + + """ + NHS Medical Card + """ + GB_NHS_MEDICAL_CARD + + """ + OSCR Scottish Charity Regulator Document + """ + GB_OSCR_SCOTTISH_CHARITY_REGULATOR_DOCUMENT + + """ + Other Supporting Document + """ + GB_OTHER + + """ + Passport + """ + GB_PASSPORT + + """ + Phone Bill + """ + GB_PHONE_BILL + + """ + Photo Card + """ + GB_PHOTO_CARD + + """ + Proof Of Address + """ + GB_PROOF_OF_ADDRESS + + """ + Recent Annual Return + """ + GB_RECENT_ANNUAL_RETURN + + """ + Registration Document + """ + GB_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + GB_RESIDENT_PERMIT + + """ + Shareholder Register + """ + GB_SHAREHOLDER_REGISTER + + """ + Solicitors Letter + """ + GB_SOLICITORS_LETTER + + """ + Tax Registration Certificate + """ + GB_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + GB_UBO_ATTESTATION + + """ + Utility Bill + """ + GB_UTILITY_BILL + + """ + Bank Statement + """ + GI_BANK_STATEMENT + + """ + Certificate of Incorporation + """ + GI_CERTIFICATE_OF_INCORPORATION + + """ + Companies House Document + """ + GI_COMPANIES_HOUSE_DOCUMENT + + """ + Director Attestation + """ + GI_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + GI_DRIVERS_LICENSE + + """ + Identity Card + """ + GI_IDENTITY_CARD + + """ + Passport + """ + GI_PASSPORT + + """ + UBO Attestation + """ + GI_UBO_ATTESTATION + + """ + Utility Bill + """ + GI_UTILITY_BILL + + """ + Articles of Incorporation + """ + GR_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + GR_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + GR_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Incumbency + """ + GR_CERTIFICATE_OF_INCUMBENCY + + """ + Certificate of Registration + """ + GR_CERTIFICATE_OF_REGISTRATION + + """ + Commercial Register Extract + """ + GR_COMMERCIAL_REGISTER_EXTRACT + + """ + Commercial Registration + """ + GR_COMMERCIAL_REGISTRATION + + """ + Corporate Status Certificate + """ + GR_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + GR_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + GR_DRIVERS_LICENSE + + """ + Government Issued Address Document + """ + GR_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + GR_IDENTITY_CARD + + """ + Mortgage Statement + """ + GR_MORTGAGE_STATEMENT + + """ + Partnership Agreement + """ + GR_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + GR_PASSPORT + + """ + Registration Document + """ + GR_REGISTRATION_DOCUMENT + + """ + Residence Certificate + """ + GR_RESIDENCE_CERTIFICATE + + """ + Resident Certificate + """ + GR_RESIDENT_CERTIFICATE + + """ + Signed Annual Report + """ + GR_SIGNED_ANNUAL_REPORT + + """ + UBO Attestation + """ + GR_UBO_ATTESTATION + + """ + Utility Bill + """ + GR_UTILITY_BILL + + """ + VAT Registration + """ + GR_VAT_REGISTRATION + + """ + Bank Statement + """ + HK_BANK_STATEMENT + + """ + Business Registration Certificate + """ + HK_BUSINESS_REGISTRATION_CERTIFICATE + + """ + Certificate of Exemption + """ + HK_CERTIFICATE_OF_EXEMPTION + + """ + Certificate of Incorporation + """ + HK_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Registered Particulars + """ + HK_CERTIFICATE_OF_REGISTERED_PARTICULARS + + """ + Commercial Register Entry + """ + HK_COMMERCIAL_REGISTER_ENTRY + + """ + Commercial Register Extract + """ + HK_COMMERCIAL_REGISTER_EXTRACT + + """ + Contract for Sale of Property + """ + HK_CONTRACT_FOR_SALE_OF_PROPERTY + + """ + Drivers License + """ + HK_DRIVERS_LICENSE + + """ + Government or Judiciary Issued Document + """ + HK_GOVERNMENT_OR_JUDICIARY_ISSUED_DOCUMENT + + """ + Identity Card + """ + HK_IDENTITY_CARD + + """ + Insurance Company Statement + """ + HK_INSURANCE_COMPANY_STATEMENT + + """ + Passport + """ + HK_PASSPORT + + """ + Phone Bill + """ + HK_PHONE_BILL + + """ + Tenancy Agreement + """ + HK_TENANCY_AGREEMENT + + """ + University Bill or Letter + """ + HK_UNIVERSITY_BILL_OR_LETTER + + """ + Utility Bill + """ + HK_UTILITY_BILL + + """ + Vietnamese Refugee Card + """ + HK_VIETNAMESE_REFUGEE_CARD + + """ + Articles of Association + """ + HR_ARTICLES_OF_ASSOCIATION + + """ + Articles of Incorporation + """ + HR_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + HR_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + HR_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Incorporation + """ + HR_CERTIFICATE_OF_INCORPORATION + + """ + Corporate Status Certificate + """ + HR_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + HR_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + HR_DRIVERS_LICENSE + + """ + Identity Card + """ + HR_IDENTITY_CARD + + """ + Partnership Agreement + """ + HR_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + HR_PASSPORT + + """ + Registration Document + """ + HR_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + HR_RESIDENT_PERMIT + + """ + UBO Attestation + """ + HR_UBO_ATTESTATION + + """ + Utility Bill + """ + HR_UTILITY_BILL + + """ + VAT Registration + """ + HR_VAT_REGISTRATION + + """ + Address Card + """ + HU_ADDRESS_CARD + + """ + Articles of Incorporation + """ + HU_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + HU_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + HU_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Incorporation + """ + HU_CERTIFICATE_OF_INCORPORATION + + """ + Commercial Register Extract + """ + HU_COMMERCIAL_REGISTER_EXTRACT + + """ + Director Attestation + """ + HU_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + HU_DRIVERS_LICENSE + + """ + Identity Card + """ + HU_IDENTITY_CARD + + """ + Mortgage Statement + """ + HU_MORTGAGE_STATEMENT + + """ + Partnership Agreement + """ + HU_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + HU_PASSPORT + + """ + Registration Document + """ + HU_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + HU_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + HU_SIGNED_ANNUAL_REPORT + + """ + UBO Attestation + """ + HU_UBO_ATTESTATION + + """ + Utility Bill + """ + HU_UTILITY_BILL + + """ + VAT Registration + """ + HU_VAT_REGISTRATION + + """ + Articles of Association + """ + IE_ARTICLES_OF_ASSOCIATION + + """ + Articles of Incorporation + """ + IE_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + IE_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + IE_BENEFICIAL_OWNER_REPORT + + """ + Car Insurance Policy + """ + IE_CAR_INSURANCE_POLICY + + """ + Certificate of Incorporation + """ + IE_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Registration + """ + IE_CERTIFICATE_OF_REGISTRATION + + """ + Companies Registration Office Document + """ + IE_COMPANIES_REGISTRATION_OFFICE_DOCUMENT + + """ + Corporate Filings + """ + IE_CORPORATE_FILINGS + + """ + Director Attestation + """ + IE_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + IE_DRIVERS_LICENSE + + """ + Financial Statement + """ + IE_FINANCIAL_STATEMENT + + """ + Government Issued Letter + """ + IE_GOVERNMENT_ISSUED_LETTER + + """ + National Age Card + """ + IE_NATIONAL_AGE_CARD + + """ + Other Supporting Document + """ + IE_OTHER + + """ + Partnership Agreement + """ + IE_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + IE_PASSPORT + + """ + Phone Bill + """ + IE_PHONE_BILL + + """ + Photo Card + """ + IE_PHOTO_CARD + + """ + Proof of Home Insurance + """ + IE_PROOF_OF_HOME_INSURANCE + + """ + RBO Screenshot + """ + IE_RBO_SCREENSHOT + + """ + Recent Annual Return + """ + IE_RECENT_ANNUAL_RETURN + + """ + Registration Document + """ + IE_REGISTRATION_DOCUMENT + + """ + Social Insurance Document + """ + IE_SOCIAL_INSURANCE_DOCUMENT + + """ + Statement of Liability from Revenue + """ + IE_STATEMENT_OF_LIABILITY_FROM_REVENUE + + """ + Tax Credit Certificate + """ + IE_TAX_CREDIT_CERTIFICATE + + """ + Tax Registration Certificate + """ + IE_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + IE_UBO_ATTESTATION + + """ + Utility Bill + """ + IE_UTILITY_BILL + + """ + Bank Statement + """ + IT_BANK_STATEMENT + + """ + Boat License + """ + IT_BOAT_LICENSE + + """ + By-laws Memorandum + """ + IT_BY_LAWS_MEMORANDUM + + """ + Certificate of Incorporation + """ + IT_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Registration + """ + IT_CERTIFICATE_OF_REGISTRATION + + """ + Certificate of Residence + """ + IT_CERTIFICATE_OF_RESIDENCE + + """ + Corporate Status Certificate + """ + IT_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + IT_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + IT_DRIVERS_LICENSE + + """ + Financial Statement + """ + IT_FINANCIAL_STATEMENT + + """ + Government Issued Letter + """ + IT_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + IT_IDENTITY_CARD + + """ + Other Supporting Document + """ + IT_OTHER + + """ + Passport + """ + IT_PASSPORT + + """ + Pension Book + """ + IT_PENSION_BOOK + + """ + Phone Bill + """ + IT_PHONE_BILL + + """ + Photo Card + """ + IT_PHOTO_CARD + + """ + Proof Of Address + """ + IT_PROOF_OF_ADDRESS + + """ + Recent Annual Return + """ + IT_RECENT_ANNUAL_RETURN + + """ + Registers and Lists of Authorized Entities + """ + IT_REGISTERS_AND_LISTS_OF_AUTHORIZED_ENTITIES + + """ + Signed Annual Report + """ + IT_SIGNED_ANNUAL_REPORT + + """ + Tax Registration Certificate + """ + IT_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + IT_UBO_ATTESTATION + + """ + Utility Bill + """ + IT_UTILITY_BILL + + """ + Weapons License + """ + IT_WEAPONS_LICENSE + + """ + Drivers License + """ + JP_DRIVERS_LICENSE + + """ + My Number Card, with photo + """ + JP_MY_NUMBER_CARD + + """ + Other Supporting Document + """ + JP_OTHER + + """ + Passport + """ + JP_PASSPORT + + """ + Phone Bill + """ + JP_PHONE_BILL + + """ + Photo Card + """ + JP_PHOTO_CARD + + """ + Residence Card + """ + JP_RESIDENCE_CARD + + """ + Residence Certificate + """ + JP_RESIDENCE_CERTIFICATE + + """ + Seal Registration Certificate + """ + JP_SEAL_REGISTRATION_CERTIFICATE + + """ + Touki Copy of Company Registrar + """ + JP_TOUKI_COPY_OF_COMPANY_REGISTRAR + + """ + Bank Statement + """ + LI_BANK_STATEMENT + + """ + Commercial Register Extract + """ + LI_COMMERCIAL_REGISTER_EXTRACT + + """ + Director Attestation + """ + LI_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + LI_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + LI_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + LI_IDENTITY_CARD + + """ + Passport + """ + LI_PASSPORT + + """ + Residence Certificate + """ + LI_RESIDENCE_CERTIFICATE + + """ + UBO Attestation + """ + LI_UBO_ATTESTATION + + """ + Utility Bill + """ + LI_UTILITY_BILL + + """ + Bank Statement + """ + LT_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + LT_BENEFICIAL_OWNER_REPORT + + """ + Extract from the register of entities + """ + LT_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + LT_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + LT_DIRECTOR_ATTESTATION + + """ + Driver's License + """ + LT_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + LT_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + LT_IDENTITY_CARD + + """ + Passport + """ + LT_PASSPORT + + """ + Registration Document + """ + LT_REGISTRATION_DOCUMENT + + """ + Signed Annual Report + """ + LT_SIGNED_ANNUAL_REPORT + + """ + Tax registration certifiate + """ + LT_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + LT_UBO_ATTESTATION + + """ + Utility Bill + """ + LT_UTILITY_BILL + + """ + VAT Registration + """ + LT_VAT_REGISTRATION + + """ + Address ID Document + """ + LU_ADDRESS_ID_DOCUMENT + + """ + Articles of Association + """ + LU_ARTICLES_OF_ASSOCIATION + + """ + Articles of Incorporation + """ + LU_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + LU_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + LU_BENEFICIAL_OWNER_REPORT + + """ + Corporate Status Certificate + """ + LU_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + LU_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + LU_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + LU_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + LU_IDENTITY_CARD + + """ + Passport + """ + LU_PASSPORT + + """ + Recent Annual Return + """ + LU_RECENT_ANNUAL_RETURN + + """ + Resident Permit + """ + LU_RESIDENT_PERMIT + + """ + Trade License + """ + LU_TRADE_LICENSE + + """ + UBO Attestation + """ + LU_UBO_ATTESTATION + + """ + Utility Bill + """ + LU_UTILITY_BILL + + """ + VAT Registration + """ + LU_VAT_REGISTRATION + + """ + Assignment Agreements + """ + LV_ASSIGNMENT_AGREEMENTS + + """ + Bank Statement + """ + LV_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + LV_BENEFICIAL_OWNER_REPORT + + """ + Board Meeting Minutes or Resolutions + """ + LV_BOARD_MEETING_MINUTES_OR_RESOLUTIONS + + """ + Director Attestation + """ + LV_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + LV_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + LV_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + LV_IDENTITY_CARD + + """ + lursoft document + """ + LV_LURSOFT_DOCUMENT + + """ + merchant registration certificate + """ + LV_MERCHANT_REGISTRATION_CERTIFICATE + + """ + Partnership Agreement + """ + LV_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + LV_PASSPORT + + """ + proof of business registration + """ + LV_PROOF_OF_BUSINESS_REGISTRATION + + """ + Registration Document + """ + LV_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + LV_RESIDENT_PERMIT + + """ + tax registration certificate + """ + LV_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + LV_UBO_ATTESTATION + + """ + Utility Bill + """ + LV_UTILITY_BILL + + """ + vat number from register + """ + LV_VAT_NUMBER_FROM_REGISTER + + """ + Articles of Incorporation + """ + MT_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + MT_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + MT_BENEFICIAL_OWNER_REPORT + + """ + Commercial Register Extract + """ + MT_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + MT_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + MT_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + MT_DRIVERS_LICENSE + + """ + Identity Card + """ + MT_IDENTITY_CARD + + """ + Mortgage Statement + """ + MT_MORTGAGE_STATEMENT + + """ + Partnership Agreement + """ + MT_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + MT_PASSPORT + + """ + Registration Document + """ + MT_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + MT_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + MT_SIGNED_ANNUAL_REPORT + + """ + UBO Attestation + """ + MT_UBO_ATTESTATION + + """ + Utility Bill + """ + MT_UTILITY_BILL + + """ + Bank Statement + """ + MX_BANK_STATEMENT + + """ + Birth Certificate + """ + MX_BIRTH_CERTIFICATE + + """ + By Laws Memorandum + """ + MX_BY_LAWS_MEMORANDUM + + """ + Certificate of Incorporation + """ + MX_CERTIFICATE_OF_INCORPORATION + + """ + Consular ID Card + """ + MX_CONSULAR_ID_CARD + + """ + CURP (Clave Única de Registro de Población) + """ + MX_CURP + + """ + Drivers License + """ + MX_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + MX_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + MX_IDENTITY_CARD + + """ + Other Supporting Document + """ + MX_OTHER + + """ + Passport + """ + MX_PASSPORT + + """ + Power of Attorney + """ + MX_POWER_OF_ATTORNEY + + """ + Tax Registration Certificate + """ + MX_TAX_REGISTRATION_CERTIFICATE + + """ + Tax Status Certificate + """ + MX_TAX_STATUS_CERTIFICATE + + """ + Utility Bill + """ + MX_UTILITY_BILL + + """ + Voter ID Card + """ + MX_VOTER_ID_CARD + + """ + Bank Statement + """ + NL_BANK_STATEMENT + + """ + By Laws Memorandum + """ + NL_BY_LAWS_MEMORANDUM + + """ + Corporate Status Certificate + """ + NL_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + NL_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + NL_DRIVERS_LICENSE + + """ + Dutch Aliens Document + """ + NL_DUTCH_ALIENS_DOCUMENT + + """ + Government Issued Letter + """ + NL_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + NL_IDENTITY_CARD + + """ + KVK Document + """ + NL_KVK_DOCUMENT + + """ + Other Supporting Document + """ + NL_OTHER + + """ + Passport + """ + NL_PASSPORT + + """ + Phone Bill + """ + NL_PHONE_BILL + + """ + Photo Card + """ + NL_PHOTO_CARD + + """ + Proof Of Address + """ + NL_PROOF_OF_ADDRESS + + """ + Proof of Home Insurance + """ + NL_PROOF_OF_HOME_INSURANCE + + """ + Recent Annual Return + """ + NL_RECENT_ANNUAL_RETURN + + """ + Registration Document + """ + NL_REGISTRATION_DOCUMENT + + """ + Resident Permit ID + """ + NL_RESIDENT_PERMIT_ID + + """ + Signed Annual Report + """ + NL_SIGNED_ANNUAL_REPORT + + """ + Tax Registration Certificate + """ + NL_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + NL_UBO_ATTESTATION + + """ + Utility Bill + """ + NL_UTILITY_BILL + + """ + Bank Statement + """ + NO_BANK_STATEMENT + + """ + Certificate of Incorporation + """ + NO_CERTIFICATE_OF_INCORPORATION + + """ + Director Attestation + """ + NO_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + NO_DRIVERS_LICENSE + + """ + Financial Statement + """ + NO_FINANCIAL_STATEMENT + + """ + Government Issued Letter + """ + NO_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + NO_IDENTITY_CARD + + """ + Passport + """ + NO_PASSPORT + + """ + Residence Certificate + """ + NO_RESIDENCE_CERTIFICATE + + """ + Resident Permit + """ + NO_RESIDENT_PERMIT + + """ + UBO Attestation + """ + NO_UBO_ATTESTATION + + """ + Utility Bill + """ + NO_UTILITY_BILL + + """ + Bank Statement + """ + NZ_BANK_STATEMENT + + """ + Boat License + """ + NZ_BOAT_LICENSE + + """ + Business Number Registration Extract + """ + NZ_BUSINESS_NUMBER_REGISTRATION_EXTRACT + + """ + Car Registration Notification Demand + """ + NZ_CAR_REGISTRATION_NOTIFICATION_DEMAND + + """ + Central Government Agency Document + """ + NZ_CENTRAL_GOVERNMENT_AGENCY_DOCUMENT + + """ + Certificate of Good Standing + """ + NZ_CERTIFICATE_OF_GOOD_STANDING + + """ + Certificate of Identity + """ + NZ_CERTIFICATE_OF_IDENTITY + + """ + Certificate of Incorporation + """ + NZ_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Residence + """ + NZ_CERTIFICATE_OF_RESIDENCE + + """ + Companies Office Company Extract + """ + NZ_COMPANIES_OFFICE_COMPANY_EXTRACT + + """ + Drivers License + """ + NZ_DRIVERS_LICENSE + + """ + Electoral Roll Papers + """ + NZ_ELECTORAL_ROLL_PAPERS + + """ + Emergency Travel Document + """ + NZ_EMERGENCY_TRAVEL_DOCUMENT + + """ + Financial Statement + """ + NZ_FINANCIAL_STATEMENT + + """ + Government Issued Letter + """ + NZ_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + NZ_IDENTITY_CARD + + """ + Insurance Policy Document + """ + NZ_INSURANCE_POLICY_DOCUMENT + + """ + Local Council Government Letter + """ + NZ_LOCAL_COUNCIL_GOVERNMENT_LETTER + + """ + Memorandum of Association + """ + NZ_MEMORANDUM_OF_ASSOCIATION + + """ + Other Supporting Document + """ + NZ_OTHER + + """ + Passport + """ + NZ_PASSPORT + + """ + Pension Book + """ + NZ_PENSION_BOOK + + """ + Phone Bill + """ + NZ_PHONE_BILL + + """ + Proof Of Address + """ + NZ_PROOF_OF_ADDRESS + + """ + Refugee Travel Document + """ + NZ_REFUGEE_TRAVEL_DOCUMENT + + """ + Register of Associations Extract + """ + NZ_REGISTER_OF_ASSOCIATIONS_EXTRACT + + """ + Signed Rental Tenancy Agreement + """ + NZ_SIGNED_RENTAL_TENANCY_AGREEMENT + + """ + Tax Registration Certificate + """ + NZ_TAX_REGISTRATION_CERTIFICATE + + """ + Utility Bill + """ + NZ_UTILITY_BILL + + """ + VAT Registration + """ + NZ_VAT_REGISTRATION + + """ + Weapons License + """ + NZ_WEAPONS_LICENSE + + """ + Articles of Incorporation + """ + PL_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + PL_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + PL_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Incumbency + """ + PL_CERTIFICATE_OF_INCUMBENCY + + """ + Certificate of Residence + """ + PL_CERTIFICATE_OF_RESIDENCE + + """ + Corporate Status Certificate + """ + PL_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + PL_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + PL_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + PL_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + PL_IDENTITY_CARD + + """ + Insurance Policy Document + """ + PL_INSURANCE_POLICY_DOCUMENT + + """ + National Court Register + """ + PL_NATIONAL_COURT_REGISTER + + """ + Passport + """ + PL_PASSPORT + + """ + Recent Annual Return + """ + PL_RECENT_ANNUAL_RETURN + + """ + Registration Document + """ + PL_REGISTRATION_DOCUMENT + + """ + REGON Certificate + """ + PL_REGON_CERTIFICATE + + """ + Resident Permit + """ + PL_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + PL_SIGNED_ANNUAL_REPORT + + """ + Social Insurance Document + """ + PL_SOCIAL_INSURANCE_DOCUMENT + + """ + Tax Return + """ + PL_TAX_RETURN + + """ + Temporary Residence Registration Certificate + """ + PL_TEMPORARY_RESIDENCE_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + PL_UBO_ATTESTATION + + """ + Utility Bill + """ + PL_UTILITY_BILL + + """ + Articles of Incorporation + """ + PT_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + PT_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + PT_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Good Standing + """ + PT_CERTIFICATE_OF_GOOD_STANDING + + """ + Certificate of Incorporation + """ + PT_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Incumbency + """ + PT_CERTIFICATE_OF_INCUMBENCY + + """ + Certificate of Residence + """ + PT_CERTIFICATE_OF_RESIDENCE + + """ + Citizen Card + """ + PT_CITIZEN_CARD + + """ + Corporate Status Certificate + """ + PT_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + PT_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + PT_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + PT_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + PT_IDENTITY_CARD + + """ + Other Supporting Document + """ + PT_OTHER + + """ + Passport + """ + PT_PASSPORT + + """ + Recent Annual Return + """ + PT_RECENT_ANNUAL_RETURN + + """ + Registration Document + """ + PT_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + PT_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + PT_SIGNED_ANNUAL_REPORT + + """ + Tax Registration Certificate + """ + PT_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + PT_UBO_ATTESTATION + + """ + Utility Bill + """ + PT_UTILITY_BILL + + """ + Articles of Incorporation + """ + RO_ARTICLES_OF_INCORPORATION + + """ + Assessment Certificate + """ + RO_ASSESSMENT_CERTIFICATE + + """ + Bank Statement + """ + RO_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + RO_BENEFICIAL_OWNER_REPORT + + """ + Board Meeting Minutes or Resolutions + """ + RO_BOARD_MEETING_MINUTES_OR_RESOLUTIONS + + """ + Corporate Status Certificate + """ + RO_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + RO_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + RO_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + RO_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + RO_IDENTITY_CARD + + """ + Other Supporting Document + """ + RO_OTHER + + """ + Partnership Agreement + """ + RO_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + RO_PASSPORT + + """ + Phone Bill + """ + RO_PHONE_BILL + + """ + Photo Card + """ + RO_PHOTO_CARD + + """ + Proof of Address + """ + RO_PROOF_OF_ADDRESS + + """ + Registration Document + """ + RO_REGISTRATION_DOCUMENT + + """ + Signed Annual Report + """ + RO_SIGNED_ANNUAL_REPORT + + """ + Tax Registration Certificate + """ + RO_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + RO_UBO_ATTESTATION + + """ + Utility Bill + """ + RO_UTILITY_BILL + + """ + Articles of Association + """ + SE_ARTICLES_OF_ASSOCIATION + + """ + Bank Statement + """ + SE_BANK_STATEMENT + + """ + Birth Certificate + """ + SE_BIRTH_CERTIFICATE + + """ + Certificate of Incorporation + """ + SE_CERTIFICATE_OF_INCORPORATION + + """ + Certificate of Registration + """ + SE_CERTIFICATE_OF_REGISTRATION + + """ + Director Attestation + """ + SE_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + SE_DRIVERS_LICENSE + + """ + Financial Statement + """ + SE_FINANCIAL_STATEMENT + + """ + Government Issued Letter + """ + SE_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + SE_IDENTITY_CARD + + """ + Official Gazette Notice + """ + SE_OFFICIAL_GAZETTE_NOTICE + + """ + Other Supporting Document + """ + SE_OTHER + + """ + Passport + """ + SE_PASSPORT + + """ + Phone Bill + """ + SE_PHONE_BILL + + """ + Photo Card + """ + SE_PHOTO_CARD + + """ + Recent Annual Return + """ + SE_RECENT_ANNUAL_RETURN + + """ + Registration Document + """ + SE_REGISTRATION_DOCUMENT + + """ + Resident Permit ID + """ + SE_RESIDENT_PERMIT_ID + + """ + Signed Annual Report + """ + SE_SIGNED_ANNUAL_REPORT + + """ + Swedish Standards Institute approved ID cards + """ + SE_SIS_ID_CARD + + """ + Tax Registration Certificate + """ + SE_TAX_REGISTRATION_CERTIFICATE + + """ + UBO Attestation + """ + SE_UBO_ATTESTATION + + """ + Utility Bill + """ + SE_UTILITY_BILL + + """ + ACRA Bizfile + """ + SG_ACRA_BIZFILE + + """ + ACRA Bizfile + """ + SG_ACRA_BIZFILE_RELATIONSHIP + + """ + Bank Statement + """ + SG_BANK_STATEMENT + + """ + Board Meeting Minutes or Resolutions + """ + SG_BOARD_MEETING_MINUTES_OR_RESOLUTIONS + + """ + Director Attestation + """ + SG_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + SG_DRIVERS_LICENSE + + """ + Government Agency Correspondence + """ + SG_GOVERNMENT_AGENCY_CORRESPONDENCE + + """ + Government Issued Identity Document + """ + SG_GOVERNMENT_ISSUED_IDENTITY_DOCUMENT + + """ + Identity Card + """ + SG_IDENTITY_CARD + + """ + Letter of Authorization + """ + SG_LETTER_OF_AUTHORIZATION + + """ + Other Supporting Document + """ + SG_OTHER + + """ + Passport + """ + SG_PASSPORT + + """ + Phone Bill + """ + SG_PHONE_BILL + + """ + Photo Card + """ + SG_PHOTO_CARD + + """ + Recent Annual Return + """ + SG_RECENT_ANNUAL_RETURN + + """ + Recent Constitution Document + """ + SG_RECENT_CONSTITUTION_DOCUMENT + + """ + Registry of Societies Certificate + """ + SG_REGISTRY_OF_SOCIETIES_CERTIFICATE + + """ + UBO Attestation + """ + SG_UBO_ATTESTATION + + """ + Utility Bill + """ + SG_UTILITY_BILL + + """ + Articles of Incorporation + """ + SI_ARTICLES_OF_INCORPORATION + + """ + Beneficial Owner Report + """ + SI_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Incorporation + """ + SI_CERTIFICATE_OF_INCORPORATION + + """ + Corporate Status Certificate + """ + SI_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + SI_DIRECTOR_ATTESTATION + + """ + Drivers License + """ + SI_DRIVERS_LICENSE + + """ + Electronic Business Extract + """ + SI_ELECTRONIC_BUSINESS_EXTRACT + + """ + Financial Statement + """ + SI_FINANCIAL_STATEMENT + + """ + Government Issued Letter + """ + SI_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + SI_IDENTITY_CARD + + """ + Notice of Identification and Classification of Activities + """ + SI_NOTICE_OF_IDENTIFICATION_AND_CLASSIFICATION_OF_ACTIVITIES + + """ + Partnership Agreement + """ + SI_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + SI_PASSPORT + + """ + Registration Document + """ + SI_REGISTRATION_DOCUMENT + + """ + Resident Permit + """ + SI_RESIDENT_PERMIT + + """ + Signed Annual Report + """ + SI_SIGNED_ANNUAL_REPORT + + """ + UBO Attestation + """ + SI_UBO_ATTESTATION + + """ + Utility Bill + """ + SI_UTILITY_BILL + + """ + VAT Registration + """ + SI_VAT_REGISTRATION + + """ + Articles of Incorporation + """ + SK_ARTICLES_OF_INCORPORATION + + """ + Bank Statement + """ + SK_BANK_STATEMENT + + """ + Beneficial Owner Report + """ + SK_BENEFICIAL_OWNER_REPORT + + """ + Certificate of Residence + """ + SK_CERTIFICATE_OF_RESIDENCE + + """ + Commercial Register Extract + """ + SK_COMMERCIAL_REGISTER_EXTRACT + + """ + Corporate Status Certificate + """ + SK_CORPORATE_STATUS_CERTIFICATE + + """ + Director Attestation + """ + SK_DIRECTOR_ATTESTATION + + """ + Driver's License + """ + SK_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + SK_GOVERNMENT_ISSUED_LETTER + + """ + Identity Card + """ + SK_IDENTITY_CARD + + """ + Mortgage Statement + """ + SK_MORTGAGE_STATEMENT + + """ + Partnership Agreement + """ + SK_PARTNERSHIP_AGREEMENT + + """ + Passport + """ + SK_PASSPORT + + """ + Pension Book + """ + SK_PENSION_BOOK + + """ + Registration Document + """ + SK_REGISTRATION_DOCUMENT + + """ + Signed Annual Report + """ + SK_SIGNED_ANNUAL_REPORT + + """ + UBO Attestation + """ + SK_UBO_ATTESTATION + + """ + Utility Bill + """ + SK_UTILITY_BILL + + """ + Bank Statement + """ + US_BANK_STATEMENT + + """ + Credit Card Statement + """ + US_CREDIT_CARD_STATEMENT + + """ + Drivers License + """ + US_DRIVERS_LICENSE + + """ + Government Issued Letter + """ + US_GOVERNMENT_ISSUED_LETTER + + """ + Insurance Statement + """ + US_INSURANCE_STATEMENT + + """ + IRS Letter 147c + """ + US_IRS_LETTER_147C + + """ + IRS SS-4 Confirmation Letter + """ + US_IRS_SS_4_CONFIRMATION_LETTER + + """ + Other Supporting Document + """ + US_OTHER + + """ + Passport + """ + US_PASSPORT + + """ + Phone Bill + """ + US_PHONE_BILL + + """ + Photo Card + """ + US_PHOTO_CARD + + """ + Proof Of Address + """ + US_PROOF_OF_ADDRESS + + """ + Proof of Business Registration + """ + US_PROOF_OF_BUSINESS_REGISTRATION + + """ + State ID + """ + US_STATE_ID + + """ + Tax Assessment Notice + """ + US_TAX_ASSESSMENT_NOTICE + + """ + Utility Bill + """ + US_UTILITY_BILL +} + +type DocumentAttachment implements Node { + attachmentType: Attachment! + contentType: FileContent + filename: String + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! +} + +""" +The connection type for DocumentAttachment. +""" +type DocumentAttachmentConnection { + """ + A list of edges. + """ + edges: [DocumentAttachmentEdge!]! + + """ + A list of nodes. + """ + nodes: [DocumentAttachment!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type DocumentAttachmentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: DocumentAttachment! +} + +""" +The ID for a DocumentAttachment. +""" +scalar DocumentAttachmentID + +type DocumentField implements Node { + confidenceScore: Float + fieldName: String! + + """ + The ID for an object. + """ + id: GlobalID! + + """ + The field value. Returns a redacted string for sensitive fields (e.g. license + numbers). Non-sensitive fields return the full value. + """ + maskedValue: String + queryComplexity: Int! + queryDepth: Int! + + """ + The unmasked field value. Always returns the full value regardless of sensitivity. + """ + value: String +} + +""" +The connection type for DocumentField. +""" +type DocumentFieldConnection { + """ + A list of edges. + """ + edges: [DocumentFieldEdge!]! + + """ + A list of nodes. + """ + nodes: [DocumentField!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type DocumentFieldEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: DocumentField! +} + +enum DocumentPurpose { + PROOF_OF_ADDRESS + PROOF_OF_AUTHORITY + PROOF_OF_BANK_ACCOUNT_OWNERSHIP + PROOF_OF_BUSINESS_ADDRESS + PROOF_OF_BUSINESS_REGISTRATION + PROOF_OF_GOVERNMENT_REGISTRATION + PROOF_OF_IDENTITY + PROOF_OF_LICENSE + PROOF_OF_MEMORANDUM_OF_ASSOCIATION + PROOF_OF_PASSPORT + PROOF_OF_RELATIONSHIP + PROOF_OF_TAX_ID + PROOF_OF_VAT_ID + PROOF_OF_VISA +} + +""" +Metadata about a document purpose, including required fields that must be visible on supporting documents +""" +type DocumentPurposeMetadata { + """ + Description of what this document type proves + """ + description: String + + """ + Fields that must be visible on documents of this type + """ + mustInclude: [RequiredField!]! + + """ + Display name for this purpose + """ + name: String! + + """ + The document purpose handle + """ + purpose: DocumentPurpose! +} + +type EasyToGuessPinResponse { + """ + Whether the PIN is easy to guess. + """ + isEasyToGuess: Boolean! + + """ + An array of reasons why the PIN is easy to guess. Empty if the PIN isn't easy to guess. + """ + ruleViolations: [String!]! +} + +input EndCollaborationInput { + """ + The ID of the shop to end collaborator access for. + """ + shopifyShopId: PropertyPublicID! +} + +type EndCollaborationResult { + """ + The collaborator relationship that was ended. + """ + collaboratorRelationship: CollaboratorRelationship + + """ + Errors that occurred while ending collaborator access. + """ + userErrors: [UserError!] +} + +input EnforceSamlOrganizationDomainsInput { + """ + The IDs of the domain to be enforced. + """ + domainIds: [OrganizationDomainID!]! +} + +type EnforceSamlOrganizationDomainsResult { + """ + The organization with the enforced organization domains. + """ + organization: Organization + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +A government identifier supplied to a person or legal entity match check. +""" +input EntityMatchGovIdInput { + """ + The country code for this identifier. + """ + countryCode: CountryCode! + + """ + The type of government identifier. + """ + identifierType: GovernmentIdentifierTypeInput! + + """ + The raw value of the government identifier. + """ + value: String! +} + +""" +Verdict from a person or legal entity match check. +""" +enum EntityMatchVerdict { + """ + Exactly one existing record is identified by the input with no contradicting identifiers. + """ + CONFIRMED_MATCH + + """ + One or more existing records match on non-unique identifiers but unique identifiers do not single one out. + """ + DISAMBIGUATION_CANDIDATES + + """ + The input contradicts an existing record on a unique identifier. + """ + MATCH_CONFLICT + + """ + No existing record matches. + """ + NO_MATCH +} + +""" +The ID for a EntitySupportingDocument. +""" +scalar EntitySupportingDocumentID + +type ExpireCollaboratorRelationshipResult { + """ + The collaborator relationship that was expired. + """ + collaboratorRelationship: CollaboratorRelationship + + """ + Errors that occurred while expiring the collaborator relationship. + """ + userErrors: [UserError!] +} + +input ExportResourceInput { + """ + The resource type to export. + """ + exportModel: ExportableResource! +} + +type ExportResourceResult { + """ + Indicates whether the export was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +enum ExportableResource { + """ + Export action audits + """ + ACTION_AUDIT + + """ + Export organization users + """ + ORGANIZATION_USER + + """ + Export roles + """ + ROLE + + """ + Export user groups + """ + USER_GROUP +} + +type ExternalShopTransferRequest implements Node { + """ + The email of the transfer recipient + """ + externalRecipientEmail: String! + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! +} + +input FileAttachmentInput { + """ + Whether this attachment is the Front, Back or Page of the document. + """ + attachmentType: Attachment! + + """ + Metadata for the file to be uploaded. + """ + fileMetadata: FileMetadataInput! +} + +""" +The content_types for file uploads supported by this app +""" +enum FileContent { + APPLICATION_PDF + IMAGE_JPEG + IMAGE_PNG +} + +""" +The metadata of the file that the client will upload directly to the storage service. +""" +input FileMetadataInput { + """ + The size of the file in bytes + """ + byteSize: Int! + + """ + A base64 MD5 digest of the file + """ + checksum: String! + + """ + the content type of the file + """ + contentType: FileContent! + + """ + The name of the file + """ + filename: String! +} + +input FinalizeOrganizationUserImportCsvUploadInput { + """ + Token returned from stageOrganizationUserImportCsvUpload. + """ + directUploadToken: String! +} + +type FinalizeOrganizationUserImportCsvUploadResult { + """ + The import record created for this upload. Use its ID to poll for progress. + """ + businessUsersImport: BusinessUsersImportRun + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type FinalizeSupportingDocumentResult { + supportingDocument: SupportingDocument + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input FinalizeSupportingDocumentUploadInput { + supportingDocumentAttachments: [SupportingDocumentAttachmentInput!]! + supportingDocumentId: SupportingDocumentID! +} + +input GenerateDomainVerificationCodeInput { + """ + The given domain. + """ + domainName: String +} + +type GenerateDomainVerificationCodeResult { + """ + The collection of errors. + """ + userErrors: [UserError!] + + """ + The generated domain verification code. + """ + verificationCode: String +} + +type GeneratePosPinResult { + """ + The generated POS pin. + """ + posPin: String! +} + +type GenerateScimTokenResult { + """ + The organization object. + """ + organization: Organization + + """ + The generated scim token. + """ + scimToken: String + + """ + List of user errors of generate scim token operation. + """ + userErrors: [UserError!] +} + +scalar GlobalID + +type GovernmentIdentifier implements Node { + countryCode: CountryCode! + + """ + The ID for an object. + """ + id: GlobalID! + identifierType: GovernmentIdentifierType! + maskedValue: String! + queryComplexity: Int! + queryDepth: Int! + + """ + The unmasked value of the government identifier. Warning: querying this field + in a mutation response can return a trust challenge error on mutation success. + """ + value: String! +} + +enum GovernmentIdentifierCategoryEnum { + IDENTIFYING_ID + OTHER + TAX_ID +} + +""" +The connection type for GovernmentIdentifier. +""" +type GovernmentIdentifierConnection { + """ + A list of edges. + """ + edges: [GovernmentIdentifierEdge!]! + + """ + A list of nodes. + """ + nodes: [GovernmentIdentifier!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +type GovernmentIdentifierDuplicationCheck { + """ + The GID of the entity that owns the duplicate. + """ + identifiableId: ID! + + """ + Display name of the entity that owns the duplicate. + """ + identifiableName: String + + """ + The masked value of the duplicate government identifier. + """ + maskedValue: String! +} + +""" +An edge in a connection. +""" +type GovernmentIdentifierEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: GovernmentIdentifier! +} + +""" +The ID for a GovernmentIdentifier. +""" +scalar GovernmentIdentifierID + +type GovernmentIdentifierResult { + governmentIdentifier: GovernmentIdentifier + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type GovernmentIdentifierType { + category: GovernmentIdentifierCategoryEnum! + countryCode: CountryCodeWithDefault! + deprecated: Boolean! + description: String + fields: [GovernmentIdentifierTypeField!]! + handle: String! + multipleAllowed: Boolean! + name: String! + shortName: String + type: GovernmentIdentifierTypeEnum! +} + +enum GovernmentIdentifierTypeEnum { + BUSINESS_IDENTIFICATION_NUMBER + DRIVERS_LICENSE + PASSPORT + PERSONAL_IDENTIFICATION_NUMBER + TAX_ID +} + +type GovernmentIdentifierTypeField { + format: String + mask: String + name: String! + placeholder: String +} + +enum GovernmentIdentifierTypeInput { + AE_EMIRATES_ID + AE_TIN_COMPANY + AE_VAT_ID + AO_NIF + AR_CUIL + AR_DNI + AT_DRIVERS_LICENSE + AT_FBN + AT_PASSPORT + AT_STEUER_NR + AT_VAT_ID + AU_ABN + AU_ACN + AU_DRIVERS_LICENSE + AU_PASSPORT + AU_TFN + AZ_PIN + BE_BTW + BE_DRIVERS_LICENSE + BE_KBO + BE_KVK + BE_NATIONAL_NUMBER + BE_PASSPORT + BE_TVA + BE_VAT_ID + BG_EGN + BG_TIN_COMPANY + BG_VAT_ID + BN_NRIC + BO_CI + BR_CPF + BS_TIN + BT_CID + BW_TIN + CA_BUSINESS_NUMBER + CA_CORPORATION_NUMBER + CA_CRA + CA_DRIVERS_LICENSE + CA_NEQ + CA_PASSPORT + CA_SIN + CH_AHV + CH_DRIVERS_LICENSE + CH_PASSPORT + CH_TIN_COMPANY + CH_UID + CH_VAT_ID + CL_RUT + CN_PASSPORT + CO_CC + CR_CI + CR_CPF + CR_DIMEX + CR_NITE + CY_TIC + CY_TIN_COMPANY + CY_VAT_ID + CZ_DIC + CZ_DRIVERS_LICENSE + CZ_ICO + CZ_PASSPORT + CZ_RODNE_CISLO + CZ_VAT_ID + DEFAULT_BUSINESS_ID + DEFAULT_DRIVERS_LICENSE + DEFAULT_NATIONAL_ID + DEFAULT_PASSPORT + DEFAULT_PERSONAL_ID_NUMBER + DEFAULT_TAX_ID + DE_DRIVERS_LICENSE + DE_HRN + DE_HR_COURT + DE_PASSPORT + DE_STEUER_ID_NR + DE_VAT_ID + DK_CPR + DK_CVR + DK_DRIVERS_LICENSE + DK_PASSPORT + DK_VAT_ID + DO_CIE + EC_CI + EE_BUSINESS_REGISTRY_CODE + EE_ISIKUKOOD + EE_VAT_ID + ES_DNI + ES_DRIVERS_LICENSE + ES_NIF + ES_PASSPORT + ES_VAT_ID + ET_TIN + FI_HENKILOTUNNUS + FI_VAT_ID + FI_Y_TUNNUS + FR_BUSINESS_REGISTRATION_NUMBER + FR_DRIVERS_LICENSE + FR_NIR + FR_PASSPORT + FR_SPI + FR_VAT_ID + GA_NIF + GB_CRN + GB_DRIVERS_LICENSE + GB_NINO + GB_PASSPORT + GB_VAT_ID + GI_TIN_COMPANY + GR_AFM + GR_IDENTITY_CARD + GR_PASSPORT + GR_TIN_COMPANY + GR_VAT_ID + GT_NIT + HK_BRN + HK_CRN + HK_DRIVERS_LICENSE + HK_HKID + HK_PASSPORT + HK_TIN_COMPANY + HR_OIB + HR_TIN_COMPANY + HR_VAT_ID + HU_ADOAZONOSITO + HU_HUNGARY_TAX_ID + HU_IDENTITY_CARD + HU_PASSPORT + HU_VAT_ID + ID_KTP + IE_CRN + IE_DRIVERS_LICENSE + IE_PASSPORT + IE_PPS + IE_VAT_ID + IN_PAN + IS_KENNITALA + IT_CODICE_FISCALE + IT_DRIVERS_LICENSE + IT_PASSPORT + IT_REA + IT_VAT_ID + JP_CORPORATE_REGISTRATION_NUMBER + JP_DRIVERS_LICENSE + JP_MY_NUMBER + JP_PASSPORT + KE_KRA_PIN + KZ_IIN + LA_TIN + LI_PEID + LI_TIN_COMPANY + LI_VAT_ID + LT_ASMENS_KODAS + LT_TIN_COMPANY + LT_VAT_ID + LU_NIF + LU_RCS + LU_VAT_ID + LV_PASSPORT + LV_PERSONAS_KODS + LV_TIN_COMPANY + LV_VAT_ID + MD_NI + MG_NIF + MK_PIN + MN_TIN + MO_TIN + MT_TIN + MT_TIN_COMPANY + MT_VAT_ID + MX_CURP + MX_RFC_BUSINESS + MX_RFC_PERSON + MY_MYKAD + MZ_NUIT + NG_NIN + NL_BSN + NL_DRIVERS_LICENSE + NL_KVK + NL_PASSPORT + NL_VAT_ID + NO_FODSELSNUMMER + NO_ORGNR + NO_VAT_ID + NZ_DRIVERS_LICENSE + NZ_GST + NZ_IRD + NZ_NZBN + NZ_PASSPORT + PE_CUI + PK_CNIC + PK_SNIC + PL_PESEL + PL_REGON + PL_VAT_ID + PT_DRIVERS_LICENSE + PT_NIF + PT_NIPC + PT_PASSPORT + PT_VAT_ID + PY_CI + RO_CNP + RO_DRIVERS_LICENSE + RO_PASSPORT + RO_ROMANIA_TAX_ID + RO_VAT_ID + RW_TIN + SA_TIN + SE_DRIVERS_LICENSE + SE_ORGANISATIONSNUMMER + SE_PASSPORT + SE_PERSONNUMMER + SE_VAT_ID + SG_DRIVERS_LICENSE + SG_FIN + SG_NRIC + SG_PASSPORT + SG_UEN + SG_UIN + SI_TIN + SI_TIN_COMPANY + SI_VAT_ID + SK_BUSINESS_REGISTRATION_NUMBER + SK_DIC + SK_VAT_ID + TH_PIN + TR_TIN + US_BUSINESS_LICENSE_NUMBER + US_DRIVERS_LICENSE + US_EIN + US_ITIN + US_PASSPORT + US_SSN + US_SSN_LAST4 + UY_CI + ZA_SAID +} + +""" +A group of users. +""" +type Group implements Node { + """ + Returns a summary of the group's access permissions. + """ + accessSummary: AccessSummary! + + """ + Returns all aggregated role assignments for the group. + """ + aggregatedRoleAssignments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AccessAggregatedRoleAssignmentConnection + description: String + + """ + The ID for an object. + """ + id: GlobalID! + name: String! + + """ + Returns the plus role for the group if the group is un-migrated. + """ + plusRole: Role + queryComplexity: Int! + queryDepth: Int! + + """ + Returns a list of Roles in alphabetical order. + """ + shopsAssignedFromRole( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + roleId: AccessRoleID! + ): ShopConnection! + storesList: StoresList! + type: GroupType! + useRbacAccess: Boolean! + usersCount: Int! +} + +""" +The connection type for Group. +""" +type GroupConnection { + """ + A list of edges. + """ + edges: [GroupEdge!]! + + """ + A list of nodes. + """ + nodes: [Group!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +Inputs for creating a group. +""" +input GroupCreateInput { + """ + The description of the group. + """ + description: String + + """ + The name of the group. + """ + name: String! + + """ + The array of role assignments to create for the group. + """ + roleAssignments: [RoleAssignmentInput!] +} + +""" +The result of creating a group. +""" +type GroupCreateResult { + """ + The group that was created. + """ + group: Group + + """ + Indicates whether the creation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +An edge in a connection. +""" +type GroupEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Group! +} + +""" +The ID for a Group. +""" +scalar GroupID + +enum GroupType { + STORE_GROUP + USER_GROUP +} + +""" +Inputs for updating a group. +""" +input GroupUpdateInput { + """ + The description of the group. + """ + description: String + + """ + The ID of the group. + """ + id: GroupID! + + """ + The name of the group. + """ + name: String + + """ + The array of role assignments to create or update for the group. + """ + roleAssignmentsToUpdate: [RoleAssignmentInput!] + + """ + The array of IDs of the roles to fully unassign from the group. + """ + rolesToUnassign: [AccessRoleID!] +} + +""" +The result of updating a group. +""" +type GroupUpdateResult { + """ + The group that was updated. + """ + group: Group + + """ + Indicates whether the creation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Inputs for deleting groups. +""" +input GroupsDeleteInput { + """ + The IDs of the Groups to delete. + """ + ids: [GroupID!]! +} + +""" +The result of deleting groups. +""" +type GroupsDeleteResult { + """ + The IDs of the deleted_groups. + """ + deletedIds: [GroupID!] + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +An ISO 8601-encoded date +""" +scalar ISO8601Date @specifiedBy(url: "https://tools.ietf.org/html/rfc3339") + +""" +An ISO 8601-encoded datetime +""" +scalar ISO8601DateTime @specifiedBy(url: "https://tools.ietf.org/html/rfc3339") + +""" +A single row result from a staff CSV import. +""" +type ImportRowResult { + """ + Error code for CSV validation errors. + """ + code: String + + """ + The email address from the CSV row. + """ + email: String + + """ + Error message if the row failed. + """ + error: String + + """ + Validation error message for CSV-level errors. + """ + message: String + + """ + The operation attempted: create, suspend, or reactivate. + """ + operation: String + + """ + The CSV row number this result corresponds to. + """ + rowNumber: Int + + """ + The result status: imported, failed, or skipped. + """ + status: String +} + +input IndividualInput { + """ + The existing person to associate with the entity. + """ + existingPerson: UpdatePersonInput + + """ + The first name of the individual. + """ + firstName: String @deprecated(reason: "Use person argument instead") + + """ + The last name of the individual. + """ + lastName: String @deprecated(reason: "Use person argument instead") + + """ + The new individual associated to the entity. + """ + person: CreatePersonInput + + """ + The person in the organization to associate with the entity. + """ + personId: PersonID @deprecated(reason: "Use existing_person argument instead") +} + +""" +Represents untyped JSON +""" +scalar JSON + +type LegacyOrganizationUser implements Node & OrganizationUserInterface { + """ + Returns a summary of the user's access permissions. + """ + accessSummary: AccessSummary + admin: Boolean! + administrativePermissions: [String!] + + """ + Returns all aggregated role assignments for the user. + """ + aggregatedRoleAssignments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AccessAggregatedRoleAssignmentConnection + + """ + Returns all groups that can be assigned to the user. + """ + assignableGroups( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GroupConnection + + """ + Returns whether the requester can resend the invitation for the target. + """ + canResendInvite( + """ + The target invited organization user. + """ + targetOrganizationUserId: OrganizationUserID! + ): Boolean! + collaboratorAccess: CollaboratorAccessStatus + + """ + A summary of collaborator relationship access for the user. + """ + collaboratorRelationshipAccessSummary: CollaboratorRelationshipAccessSummary + createdAt: ISO8601DateTime! + createdBy: OrganizationUser + email: String! + generatePinForShop(length: Int, shopifyShopId: PropertyPublicID!): String + + """ + Returns a list of groups assigned to the user. + """ + groups( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GroupConnection! + hasManageCollaboratorShopPermission: Boolean! + id: GlobalID! + isPinEasyToGuessForShop(pin: String!, shopifyShopId: PropertyPublicID!): EasyToGuessPinResponse + isShopifyEmployee: Boolean! + legacyUserType: LegacyUser! + migratableToRbacByRequester: Boolean! + + """ + Organization-wide access conditions applied to the user. + """ + organizationAccessConditions: [String!]! + organizationPermissions: [String!]! + partnerPermissions: [String!] + privateData: PrivateData! + queryComplexity: Int! + queryDepth: Int! + rbacBannerCode: String + + """ + Returns a list of retail accesses for the user. + """ + retailAccesses( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): RetailAccessConnection! + role: Role + + """ + Returns a list of roles assigned to the user. + """ + roles( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AccessRoleConnection! + samlEnforcementState: UserSamlEnforcementState! + shopAccess: ShopAccess + shopAccessDetailsByShopifyShopId(shopifyShopId: PropertyPublicID!): UserShopAccessDetails + shopifyUserId: String + + """ + Returns a list of Roles in alphabetical order. + """ + shopsAssignedFromRole( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + roleId: AccessRoleID! + ): ShopConnection! + status: OrganizationUserStatus! + + """ + A summary of current store access for the user (legacy or RBAC). + """ + storeAccessSummary: StoreAccessSummary + tfaEnforced: Boolean! + useRbacAccess: Boolean! + verifiedOrganizationDomain: Boolean! + wasSubAdmin: Boolean! +} + +enum LegacyUser { + """ + The user is a collaborator account. + """ + COLLABORATOR + + """ + The user is a Legacy Shopify account. + """ + LEGACY_STAFF + + """ + The user has POS access. + """ + POS_ACCESS +} + +type LegalEntity implements Node { + accountRepresentative: Principal + addresses: [Address!] + + """ + Whether the legal entity can be archived. + """ + archivable: Boolean! + + """ + Archival status of the legal entity. + """ + archived: Boolean! + + """ + People that can be associated with the legal entity as a principal + """ + assignablePeople( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + ): PersonConnection + + """ + Attestations recorded against this legal entity. + """ + attestations( + activeOnly: Boolean + + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + attestationTypeHandle: AttestationTypeHandle + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AttestationConnection + category: Category! + + """ + Connected shops for the legal entity + """ + connectedShops: [Shop!] @deprecated(reason: "Use connectedShopsConnection for paginated access.") + + """ + Paginated connected shops for this legal entity. Pagination is limited to 1000 results; Snapshot data may be stale. + """ + connectedShopsConnection( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ConnectedShopsConnection + countryCode: CountryCode! + + """ + The date and time when the legal entity was created. + """ + createdAt: ISO8601DateTime! + displayName: String + entityPrincipals( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + sort: PrincipalSortField + ): PrincipalConnection + + """ + Returns a GovernmentIdentifier by the specified ID. + """ + governmentIdentifier(id: GovernmentIdentifierID!): GovernmentIdentifier + governmentIdentifiers: [GovernmentIdentifier!] + + """ + The ID for an object. + """ + id: GlobalID! + isRegistered: Boolean! + legalEntityType: LegalEntityType + + """ + The legal name of the entity. For individuals, returns the person's full name. + For businesses, returns the registered business name. + """ + legalName: String + + """ + The legal name variants (e.g., kanji, kana) + """ + legalNameVariants: [NameVariant!] + nickname: String + + """ + The total equity owned by all principals + """ + ownedEquity: Float + phoneNumber: String + + """ + Returns a Principal by the specified ID. + """ + principal(id: PrincipalID!): Principal + principals: [Principal!] @deprecated(reason: "Use the 'entity_principals' connection instead") + principalsCount: Int! + queryComplexity: Int! + queryDepth: Int! + + """ + The registered business name. Only applicable for business entities. Returns nil for individuals. + """ + registeredBusinessName: String + + """ + Returns a SupportingDocument by the specified ID. + """ + supportingDocument(id: SupportingDocumentID!): SupportingDocument + supportingDocuments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): SupportingDocumentConnection + taxPreferenceGovernmentIdentifier: GovernmentIdentifier + tradeName: String @deprecated(reason: "Trade name is deprecated from Legal Entity scope and will be replaced with a shop scope field.") + + """ + The trade name variants (e.g., kanji, kana) + """ + tradeNameVariants: [NameVariant!] @deprecated(reason: "Trade name is deprecated from Legal Entity scope and will be replaced with a shop scope field.") + + """ + The date and time when the legal entity was last updated. + """ + updatedAt: ISO8601DateTime! +} + +""" +The connection type for LegalEntity. +""" +type LegalEntityConnection { + """ + A list of edges. + """ + edges: [LegalEntityEdge!]! + + """ + A list of nodes. + """ + nodes: [LegalEntity!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type LegalEntityEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: LegalEntity! +} + +""" +Filter fields for legal entities. +""" +enum LegalEntityFilterField { + """ + Filter by archived status. + """ + ARCHIVED + + """ + Filter by category. + """ + CATEGORY + + """ + Filter by country code. + """ + COUNTRY_CODE + + """ + Filter by legal entity type. + """ + LEGAL_ENTITY_TYPE +} + +""" +Filter for legal entities. +""" +input LegalEntityFilterInput { + field: LegalEntityFilterField! + operator: LegalEntityFilterOperator! + value: String! +} + +""" +Operators for filtering legal entities. +""" +enum LegalEntityFilterOperator { + """ + Equals operator. + """ + EQUALS + + """ + Not equals operator. + """ + NOT_EQUALS +} + +""" +The ID for a LegalEntity. +""" +scalar LegalEntityID + +""" +Input describing a legal entity being added to an organization, to check for existing conflicts. +""" +input LegalEntityMatchInput { + """ + Government identifiers for the entity. + """ + governmentIdentifiers: [EntityMatchGovIdInput!] + + """ + Legal entity type handle. Individual handles resolve to NO_MATCH; use resolvePersonMatch instead. + """ + legalEntityType: LegalEntityTypeInput! + + """ + Registered business name. Compared after sanitization. If neither + registeredBusinessName nor governmentIdentifiers is provided, the matcher + returns NO_MATCH. + """ + registeredBusinessName: String +} + +type LegalEntityResult { + legalEntity: LegalEntity + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Sort options for legal entities queries. +""" +enum LegalEntitySortField { + """ + Sort by country code ascending. + """ + COUNTRY_CODE_ASC + + """ + Sort by country code descending. + """ + COUNTRY_CODE_DESC + + """ + Sort by display name ascending. + """ + DISPLAY_NAME_ASC + + """ + Sort by display name descending. + """ + DISPLAY_NAME_DESC + + """ + Sort by legal entity type ascending. + """ + LEGAL_ENTITY_TYPE_ASC + + """ + Sort by legal entity type descending. + """ + LEGAL_ENTITY_TYPE_DESC + + """ + Sort by legal name ascending. + """ + LEGAL_NAME_ASC + + """ + Sort by legal name descending. + """ + LEGAL_NAME_DESC + + """ + Sort by nickname ascending. + """ + NICKNAME_ASC + + """ + Sort by nickname descending. + """ + NICKNAME_DESC +} + +type LegalEntityTaxFilingPreference implements Node { + governmentIdentifier: GovernmentIdentifier! + + """ + The ID for an object. + """ + id: GlobalID! + preferredEntity: LegalEntity! + preferredEntityType: String! + queryComplexity: Int! + queryDepth: Int! +} + +type LegalEntityType { + category: String! + country: String! + countryCode: CountryCodeWithDefault! + description: String + handle: String! + jurisdiction: String! + name: String! + nativeName: String! @deprecated(reason: "This field is deprecated. Please use native_names instead.") + nativeNames: [String!]! + subcategory: String +} + +enum LegalEntityTypeInput { + AE_COMPANY_FREE_ZONE_ESTABLISHMENT + AE_COMPANY_FREE_ZONE_LLC + AE_COMPANY_LLC + AE_COMPANY_SOLE_ESTABLISHMENT + AT_COMPANY_INCORPORATED_PARTNERSHIP + AT_COMPANY_PRIVATE_CORPORATION + AT_COMPANY_UNINCORPORATED_PARTNERSHIP + AT_INDIVIDUAL_INDIVIDUAL + AT_NON_PROFIT_INCORPORATED_NON_PROFIT + AT_NON_PROFIT_UNINCORPORATED_NON_PROFIT + AU_COMPANY_PRIVATE_CORPORATION + AU_COMPANY_PRIVATE_PARTNERSHIP + AU_COMPANY_PUBLIC_COMPANY + AU_COMPANY_PUBLIC_CORPORATION + AU_COMPANY_PUBLIC_PARTNERSHIP + AU_COMPANY_SOLE_PROPRIETORSHIP + AU_INDIVIDUAL_INDIVIDUAL + AU_NON_PROFIT_NON_PROFIT + AU_NON_PROFIT_UNINCORPORATED_ASSOCIATION + BE_COMPANY_INCORPORATED_PARTNERSHIP + BE_COMPANY_PRIVATE_CORPORATION + BE_COMPANY_PUBLIC_CORPORATION + BE_COMPANY_UNINCORPORATED_PARTNERSHIP + BE_INDIVIDUAL_INDIVIDUAL + BE_NON_PROFIT_INCORPORATED_NON_PROFIT + BE_NON_PROFIT_UNINCORPORATED_NON_PROFIT + BG_COMPANY_INCORPORATED_PARTNERSHIP + BG_COMPANY_PRIVATE_CORPORATION + BG_COMPANY_PUBLIC_CORPORATION + BG_COMPANY_UNINCORPORATED_PARTNERSHIP + BG_INDIVIDUAL_INDIVIDUAL + BG_NON_PROFIT_INCORPORATED_NON_PROFIT + BG_NON_PROFIT_UNINCORPORATED_NON_PROFIT + CA_COMPANY_PRIVATE_CORPORATION + CA_COMPANY_PRIVATE_PARTNERSHIP + CA_COMPANY_SOLE_PROPRIETORSHIP + CA_INDIVIDUAL_INDIVIDUAL + CA_NON_PROFIT_NON_PROFIT + CA_NON_PROFIT_REGISTERED_CHARITY + CH_COMPANY_INCORPORATED_PARTNERSHIP + CH_COMPANY_PRIVATE_CORPORATION + CH_COMPANY_PUBLIC_CORPORATION + CH_COMPANY_UNINCORPORATED_PARTNERSHIP + CH_INDIVIDUAL_INDIVIDUAL + CH_NON_PROFIT_INCORPORATED_NON_PROFIT + CH_NON_PROFIT_UNINCORPORATED_NON_PROFIT + CY_COMPANY_INCORPORATED_PARTNERSHIP + CY_COMPANY_PRIVATE_CORPORATION + CY_COMPANY_PUBLIC_CORPORATION + CY_COMPANY_UNINCORPORATED_PARTNERSHIP + CY_INDIVIDUAL_INDIVIDUAL + CY_NON_PROFIT_INCORPORATED_NON_PROFIT + CY_NON_PROFIT_UNINCORPORATED_NON_PROFIT + CZ_COMPANY_INCORPORATED_PARTNERSHIP + CZ_COMPANY_PRIVATE_CORPORATION + CZ_COMPANY_PUBLIC_CORPORATION + CZ_COMPANY_UNINCORPORATED_PARTNERSHIP + CZ_INDIVIDUAL_INDIVIDUAL + CZ_NON_PROFIT_INCORPORATED_NON_PROFIT + CZ_NON_PROFIT_UNINCORPORATED_NON_PROFIT + DEFAULT_COMPANY + DEFAULT_INDIVIDUAL + DEFAULT_NON_PROFIT + DE_COMPANY_INCORPORATED_PARTNERSHIP + DE_COMPANY_PRIVATE_CORPORATION + DE_COMPANY_PUBLIC_CORPORATION + DE_COMPANY_UNINCORPORATED_PARTNERSHIP + DE_NON_PROFIT_INCORPORATED_NON_PROFIT + DE_NON_PROFIT_UNINCORPORATED_NON_PROFIT + DK_COMPANY_INCORPORATED_PARTNERSHIP + DK_COMPANY_PRIVATE_CORPORATION + DK_COMPANY_UNINCORPORATED_PARTNERSHIP + DK_INDIVIDUAL_INDIVIDUAL + DK_NON_PROFIT_INCORPORATED_NON_PROFIT + DK_NON_PROFIT_UNINCORPORATED_NON_PROFIT + EE_COMPANY_INCORPORATED_PARTNERSHIP + EE_COMPANY_PRIVATE_CORPORATION + EE_COMPANY_UNINCORPORATED_PARTNERSHIP + EE_INDIVIDUAL_INDIVIDUAL + EE_NON_PROFIT_INCORPORATED_NON_PROFIT + EE_NON_PROFIT_UNINCORPORATED_NON_PROFIT + ES_COMPANY_INCORPORATED_PARTNERSHIP + ES_COMPANY_PRIVATE_CORPORATION + ES_COMPANY_UNINCORPORATED_PARTNERSHIP + ES_INDIVIDUAL_INDIVIDUAL + ES_NON_PROFIT_INCORPORATED_NON_PROFIT + ES_NON_PROFIT_UNINCORPORATED_NON_PROFIT + FI_COMPANY_INCORPORATED_PARTNERSHIP + FI_COMPANY_PRIVATE_CORPORATION + FI_COMPANY_PUBLIC_CORPORATION + FI_COMPANY_UNINCORPORATED_PARTNERSHIP + FI_INDIVIDUAL_INDIVIDUAL + FI_NON_PROFIT_INCORPORATED_NON_PROFIT + FI_NON_PROFIT_UNINCORPORATED_NON_PROFIT + FR_COMPANY_INCORPORATED_PARTNERSHIP + FR_COMPANY_PRIVATE_CORPORATION + FR_COMPANY_PUBLIC_COMPANY + FR_COMPANY_SOLE_PROPRIETORSHIP + FR_GOVERNMENT_GOVERNMENT_AGENCY + FR_NON_PROFIT_INCORPORATED_NON_PROFIT + GB_COMPANY_INCORPORATED_PARTNERSHIP + GB_COMPANY_PRIVATE_CORPORATION + GB_COMPANY_UNINCORPORATED_PARTNERSHIP + GB_INDIVIDUAL_INDIVIDUAL + GB_NON_PROFIT_INCORPORATED_NON_PROFIT + GB_NON_PROFIT_UNINCORPORATED_NON_PROFIT + GI_COMPANY_INCORPORATED_PARTNERSHIP + GI_COMPANY_PRIVATE_CORPORATION + GI_COMPANY_PUBLIC_CORPORATION + GI_COMPANY_UNINCORPORATED_PARTNERSHIP + GI_INDIVIDUAL_INDIVIDUAL + GI_NON_PROFIT_INCORPORATED_NON_PROFIT + GI_NON_PROFIT_UNINCORPORATED_NON_PROFIT + GR_COMPANY_INCORPORATED_PARTNERSHIP + GR_COMPANY_PRIVATE_CORPORATION + GR_COMPANY_PUBLIC_CORPORATION + GR_COMPANY_UNINCORPORATED_PARTNERSHIP + GR_INDIVIDUAL_INDIVIDUAL + GR_NON_PROFIT_INCORPORATED_NON_PROFIT + GR_NON_PROFIT_UNINCORPORATED_NON_PROFIT + HK_COMPANY_PRIVATE_CORPORATION + HK_COMPANY_PRIVATE_PARTNERSHIP + HK_COMPANY_SOLE_PROPRIETORSHIP + HK_INDIVIDUAL_INDIVIDUAL + HK_NON_PROFIT_INCORPORATED_NON_PROFIT + HK_NON_PROFIT_UNINCORPORATED_NON_PROFIT + HR_COMPANY_INCORPORATED_PARTNERSHIP + HR_COMPANY_PRIVATE_CORPORATION + HR_COMPANY_PUBLIC_CORPORATION + HR_COMPANY_UNINCORPORATED_PARTNERSHIP + HR_INDIVIDUAL_INDIVIDUAL + HR_NON_PROFIT_INCORPORATED_NON_PROFIT + HR_NON_PROFIT_UNINCORPORATED_NON_PROFIT + HU_COMPANY_INCORPORATED_PARTNERSHIP + HU_COMPANY_PRIVATE_CORPORATION + HU_COMPANY_PUBLIC_CORPORATION + HU_COMPANY_UNINCORPORATED_PARTNERSHIP + HU_INDIVIDUAL_INDIVIDUAL + HU_NON_PROFIT_INCORPORATED_NON_PROFIT + HU_NON_PROFIT_UNINCORPORATED_NON_PROFIT + IE_COMPANY_INCORPORATED_PARTNERSHIP + IE_COMPANY_PRIVATE_CORPORATION + IE_COMPANY_PUBLIC_CORPORATION + IE_COMPANY_UNINCORPORATED_PARTNERSHIP + IE_INDIVIDUAL_INDIVIDUAL + IE_NON_PROFIT_INCORPORATED_NON_PROFIT + IE_NON_PROFIT_UNINCORPORATED_NON_PROFIT + IN_COMPANY_LIMITED_LIABILITY_PARTNERSHIP + IN_COMPANY_PRIVATE_COMPANY + IN_COMPANY_PUBLIC_COMPANY + IN_COMPANY_SOLE_PROPRIETORSHIP + IS_COMPANY_INCORPORATED_PARTNERSHIP + IS_COMPANY_PRIVATE_CORPORATION + IS_COMPANY_PUBLIC_CORPORATION + IS_COMPANY_UNINCORPORATED_PARTNERSHIP + IS_NON_PROFIT_INCORPORATED_NON_PROFIT + IS_NON_PROFIT_UNINCORPORATED_NON_PROFIT + IT_COMPANY_INCORPORATED_PARTNERSHIP + IT_COMPANY_PRIVATE_CORPORATION + IT_COMPANY_UNINCORPORATED_PARTNERSHIP + IT_INDIVIDUAL_INDIVIDUAL + IT_NON_PROFIT_INCORPORATED_NON_PROFIT + IT_NON_PROFIT_UNINCORPORATED_NON_PROFIT + JP_COMPANY_PRIVATE_CORPORATION + JP_COMPANY_SOLE_PROPRIETORSHIP + JP_NON_PROFIT_NON_PROFIT + LI_COMPANY_INCORPORATED_PARTNERSHIP + LI_COMPANY_PRIVATE_CORPORATION + LI_COMPANY_PUBLIC_CORPORATION + LI_COMPANY_UNINCORPORATED_PARTNERSHIP + LI_INDIVIDUAL_INDIVIDUAL + LI_NON_PROFIT_INCORPORATED_NON_PROFIT + LI_NON_PROFIT_UNINCORPORATED_NON_PROFIT + LT_COMPANY_INCORPORATED_PARTNERSHIP + LT_COMPANY_PRIVATE_CORPORATION + LT_COMPANY_PUBLIC_CORPORATION + LT_COMPANY_UNINCORPORATED_PARTNERSHIP + LT_INDIVIDUAL_INDIVIDUAL + LT_NON_PROFIT_INCORPORATED_NON_PROFIT + LT_NON_PROFIT_UNINCORPORATED_NON_PROFIT + LU_COMPANY_INCORPORATED_PARTNERSHIP + LU_COMPANY_PRIVATE_CORPORATION + LU_COMPANY_PUBLIC_CORPORATION + LU_COMPANY_UNINCORPORATED_PARTNERSHIP + LU_INDIVIDUAL_INDIVIDUAL + LU_NON_PROFIT_INCORPORATED_NON_PROFIT + LU_NON_PROFIT_UNINCORPORATED_NON_PROFIT + LV_COMPANY_INCORPORATED_PARTNERSHIP + LV_COMPANY_PRIVATE_CORPORATION + LV_COMPANY_PUBLIC_CORPORATION + LV_COMPANY_UNINCORPORATED_PARTNERSHIP + LV_INDIVIDUAL_INDIVIDUAL + LV_NON_PROFIT_INCORPORATED_NON_PROFIT + LV_NON_PROFIT_UNINCORPORATED_NON_PROFIT + MC_COMPANY_INCORPORATED_PARTNERSHIP + MC_COMPANY_PRIVATE_CORPORATION + MC_COMPANY_PUBLIC_CORPORATION + MC_COMPANY_UNINCORPORATED_PARTNERSHIP + MC_NON_PROFIT_INCORPORATED_NON_PROFIT + MC_NON_PROFIT_UNINCORPORATED_NON_PROFIT + MT_COMPANY_INCORPORATED_PARTNERSHIP + MT_COMPANY_PRIVATE_CORPORATION + MT_COMPANY_PUBLIC_CORPORATION + MT_COMPANY_UNINCORPORATED_PARTNERSHIP + MT_INDIVIDUAL_INDIVIDUAL + MT_NON_PROFIT_INCORPORATED_NON_PROFIT + MT_NON_PROFIT_UNINCORPORATED_NON_PROFIT + MX_COMPANY_PRIVATE_CORPORATION + MX_INDIVIDUAL_INDIVIDUAL + MX_NON_PROFIT_NON_PROFIT + NL_COMPANY_INCORPORATED_PARTNERSHIP + NL_COMPANY_PRIVATE_CORPORATION + NL_COMPANY_SOLE_PROPRIETORSHIP + NL_COMPANY_UNINCORPORATED_PARTNERSHIP + NL_INDIVIDUAL_INDIVIDUAL + NL_NON_PROFIT_INCORPORATED_NON_PROFIT + NL_NON_PROFIT_UNINCORPORATED_NON_PROFIT + NO_COMPANY_INCORPORATED_PARTNERSHIP + NO_COMPANY_PRIVATE_CORPORATION + NO_COMPANY_UNINCORPORATED_PARTNERSHIP + NO_INDIVIDUAL_INDIVIDUAL + NO_NON_PROFIT_INCORPORATED_NON_PROFIT + NO_NON_PROFIT_UNINCORPORATED_NON_PROFIT + NZ_COMPANY_PRIVATE_CORPORATION + NZ_COMPANY_PRIVATE_PARTNERSHIP + NZ_COMPANY_SOLE_PROPRIETORSHIP + NZ_INDIVIDUAL_INDIVIDUAL + NZ_NON_PROFIT_INCORPORATED_NON_PROFIT + NZ_NON_PROFIT_NON_PROFIT + NZ_NON_PROFIT_UNINCORPORATED_NON_PROFIT + PL_COMPANY_INCORPORATED_PARTNERSHIP + PL_COMPANY_PRIVATE_CORPORATION + PL_COMPANY_PUBLIC_CORPORATION + PL_COMPANY_UNINCORPORATED_PARTNERSHIP + PL_INDIVIDUAL_INDIVIDUAL + PL_NON_PROFIT_INCORPORATED_NON_PROFIT + PL_NON_PROFIT_UNINCORPORATED_NON_PROFIT + PT_COMPANY_INCORPORATED_PARTNERSHIP + PT_COMPANY_PRIVATE_CORPORATION + PT_COMPANY_UNINCORPORATED_PARTNERSHIP + PT_INDIVIDUAL_INDIVIDUAL + PT_NON_PROFIT_INCORPORATED_NON_PROFIT + PT_NON_PROFIT_UNINCORPORATED_NON_PROFIT + RO_COMPANY_INCORPORATED_PARTNERSHIP + RO_COMPANY_PRIVATE_CORPORATION + RO_COMPANY_PUBLIC_CORPORATION + RO_COMPANY_UNINCORPORATED_PARTNERSHIP + RO_INDIVIDUAL_INDIVIDUAL + SE_COMPANY_INCORPORATED_PARTNERSHIP + SE_COMPANY_PRIVATE_CORPORATION + SE_COMPANY_PUBLIC_CORPORATION + SE_COMPANY_UNINCORPORATED_PARTNERSHIP + SE_INDIVIDUAL_INDIVIDUAL + SE_NON_PROFIT_INCORPORATED_NON_PROFIT + SE_NON_PROFIT_UNINCORPORATED_NON_PROFIT + SG_COMPANY_PRIVATE_CORPORATION + SG_COMPANY_PRIVATE_PARTNERSHIP + SG_COMPANY_SOLE_PROPRIETORSHIP + SG_NON_PROFIT_NON_PROFIT + SI_COMPANY_INCORPORATED_PARTNERSHIP + SI_COMPANY_PRIVATE_CORPORATION + SI_COMPANY_PUBLIC_CORPORATION + SI_COMPANY_UNINCORPORATED_PARTNERSHIP + SI_INDIVIDUAL_INDIVIDUAL + SI_NON_PROFIT_INCORPORATED_NON_PROFIT + SI_NON_PROFIT_UNINCORPORATED_NON_PROFIT + SK_COMPANY_INCORPORATED_PARTNERSHIP + SK_COMPANY_PRIVATE_CORPORATION + SK_COMPANY_PUBLIC_CORPORATION + SK_COMPANY_SOLE_PROPRIETORSHIP + SK_COMPANY_UNINCORPORATED_PARTNERSHIP + SK_NON_PROFIT_INCORPORATED_NON_PROFIT + SK_NON_PROFIT_UNINCORPORATED_NON_PROFIT + SM_COMPANY_INCORPORATED_PARTNERSHIP + SM_COMPANY_PRIVATE_CORPORATION + SM_COMPANY_PUBLIC_CORPORATION + SM_COMPANY_UNINCORPORATED_PARTNERSHIP + SM_NON_PROFIT_INCORPORATED_NON_PROFIT + SM_NON_PROFIT_UNINCORPORATED_NON_PROFIT + TH_COMPANY_INCORPORATED_PARTNERSHIP + TH_COMPANY_PRIVATE_CORPORATION + TH_COMPANY_SOLE_PROPRIETORSHIP + TH_COMPANY_UNINCORPORATED_PARTNERSHIP + US_COMPANY_LLC + US_COMPANY_MULTI_MEMBER_LLC + US_COMPANY_PRIVATE_CORPORATION + US_COMPANY_PRIVATE_PARTNERSHIP + US_COMPANY_PUBLIC_CORPORATION + US_COMPANY_PUBLIC_PARTNERSHIP + US_COMPANY_SINGLE_MEMBER_LLC + US_COMPANY_SOLE_PROPRIETORSHIP + US_COMPANY_UNINCORPORATED_ASSOCIATION + US_INDIVIDUAL_INDIVIDUAL + US_NON_PROFIT_INCORPORATED_NON_PROFIT + US_NON_PROFIT_NON_PROFIT + US_NON_PROFIT_UNINCORPORATED_NON_PROFIT +} + +input LegalNameVariantInput { + """ + The legal entity name in this variant + """ + name: String + + """ + The type of name variant + """ + variantType: AlphabetType! +} + +""" +The input fields used to determine which locations a retail user has access to. +""" +input LocationAssignmentsInput { + """ + Whether the retail user should have access to all locations. + """ + allLocationsAccess: Boolean = false + + """ + The locations to add to the retail user, i.e. ['gid://shopify/Location/11']. + """ + shopifyLocationIdsToAdd: [ID!] + + """ + The locations to remove from the retail user, i.e. ['gid://shopify/Location/12']. + """ + shopifyLocationIdsToRemove: [ID!] + + """ + The shopify shop id to assign locations to, i.e. 'gid://organization/ShopifyShop/10'. + """ + shopifyShopId: PropertyPublicID! +} + +type MarketsHomeRollbackCompatibleResult { + """ + The reasons why the shop cannot rollback from Markets Home + """ + incompatibleReasons: [String!]! + + """ + Whether the shop can rollback from Markets Home + """ + isCompatible: Boolean! +} + +type MarketsHomeRolloutCompatibleResult { + """ + The apps that are incompatible with Markets Home + """ + incompatibleApps: [String!]! + + """ + Whether the shop can rollout Markets Home + """ + isCompatible: Boolean! +} + +""" +A monetary value with currency +""" +type Money { + """ + Amount of the money + """ + amount: Decimal! + + """ + Currency of the money + """ + currencyCode: CurrencyCode! +} + +type Mutation { + """ + Change organization owner. + """ + accessOrganizationOwnerChange(input: AccessOrganizationOwnerChangeInput!): AccessOrganizationOwnerChangeResult! + + """ + Add access role (RBAC based) for an organization. + """ + accessRoleCreate(roleCreateInput: AccessRoleCreateInput!): AccessRoleCreateResult + + """ + Delete role for an organization. + """ + accessRoleDelete(accessRoleDeleteInput: AccessRoleDeleteInput!): AccessRoleDeleteResult! + + """ + Duplicate a role for an organization. + """ + accessRoleDuplicate(accessRoleDuplicateInput: AccessRoleDuplicateInput!): AccessRoleDuplicateResult! + + """ + Update role for an organization. + """ + accessRoleUpdate(accessRoleUpdateInput: AccessRoleUpdateInput!): AccessRoleUpdateResult! + + """ + Delete roles for an organization. + """ + accessRolesDelete(accessRolesDeleteInput: AccessRolesDeleteInput!): RolesDeleteResult! + + """ + Change store owner. + """ + accessStoreOwnerChange(input: AccessStoreOwnerChangeInput!): AccessStoreOwnerChangeResult! + + """ + Add role for an organization. + """ + addRole(addRoleInput: AddRoleInput!): AddRoleResult! + + """ + Grant an organization user access to one or more shop properties. + """ + addShopAccess(newShopAccesses: [ShopAccessInput!]!, organizationUserId: OrganizationUserID!): UpdateOrganizationUserResult! + + """ + Archive a legal entity. + """ + archiveLegalEntity(id: LegalEntityID!): LegalEntityResult! + + """ + Returns generated HMAC token used for authentication with Async notifications. + """ + argusToken: String + + """ + Assign organization owner (admin) for a Partner Organization User. + """ + assignPartnerOrganizationOwner(assignPartnerOrganizationOwnerInput: AssignPartnerOrganizationOwnerInput!): AssignPartnerOrganizationOwnerResult! + + """ + Adds a property to an Organization + """ + assignProperty(externalId: PropertyPublicID!, idempotencyKey: String!, offeringHandle: String!, organizationId: OrganizationID): PropertyResult! + + """ + Backfill partner organizations to shops relationships. + """ + backfillPartnerOrganizationsShopProperties(input: BackfillPartnerOrganizationsShopPropertiesInput!): BackfillPartnerOrganizationsShopPropertiesResult + + """ + Backfills Partner Organization User + """ + backfillPartnerUser(backfillPartnerUserInput: BackfillPartnerUserInput!): BackfillPartnerUserResult! + + """ + Bulk update role of organization users. + """ + bulkAssignOrganizationUserRole(bulkAssignRoleInput: BulkAssignRoleInput!): BulkAssignRoleResult! + + """ + Start a store copy operation. + """ + bulkDataStoreCopyStart(input: BulkDataStoreCopyStartInput!): BulkDataStoreCopyStartResult! + + """ + Start a store export operation. + """ + bulkDataStoreExportStart(input: BulkDataStoreExportStartInput!): BulkDataStoreExportStartResult! + + """ + Start a store import operation. + """ + bulkDataStoreImportStart(input: BulkDataStoreImportStartInput!): BulkDataStoreImportStartResult! + + """ + Bulk update test drive for shops. + """ + bulkUpdateTestDrive(input: TestDriveBulkUpdateInput!): TestDriveBulkUpdateResult + + """ + Cancel a pending shop transfer + """ + cancelShopTransfer(cancelShopTransferInput: CancelShopTransferInput!): CancelShopTransferResult! + + """ + Change Organization Domain enforcement states. + """ + changeDomainEnforcementState(changeDomainEnforcementStateInput: ChangeDomainEnforcementStateInput!): ChangeDomainEnforcementStateResult! + + """ + Accept collaborator request. + """ + collaboratorAccept(input: CollaboratorAcceptInput!): CollaboratorAcceptResult! + + """ + Convert users from SAML to standard login. + """ + convertUsersFromSaml(convertUsersFromSamlInput: ConvertUsersFromSamlInput!): ConvertUsersFromSamlResult! + + """ + Convert users to SAML users. + """ + convertUsersToSaml(convertUsersToSamlInput: ConvertUsersToSamlInput!): ConvertUsersToSamlResult! + + """ + Create an App Development Store. + """ + createAppDevelopmentStore( + """ + The developer preview handle if one is being enabled on this store. + """ + developerPreviewHandle: String + + """ + Whether the development store should have prepopulated test data. + """ + prepopulateTestData: Boolean = false + + """ + The key to lookup the price. This determines the entitlements for the shop. + """ + priceLookupKey: String! + + """ + The name of the shop. + """ + shopName: String! + ): CreateAppDevelopmentStoreResult! + + """ + Create an attestation. + """ + createAttestation(input: CreateAttestationInput!): CreateAttestationResult! + + """ + Creates a CLI token service account as an organization user with apps developer role. + """ + createCliTokenOrganizationUser(createCliTokenOrganizationUserInput: CreateCliTokenOrganizationUserInput!): CreateCliTokenOrganizationUserResult! + + """ + Creates a client development shop. + """ + createClientDevelopmentShop( + """ + The shops intended country code. + """ + countryCode: String! + + """ + The name of the shop. + """ + shopName: String! + + """ + Whether to create a Shopify Plus shop. + """ + withPlus: Boolean + ): CreateClientDevelopmentShopResult! + + """ + Create a collaborator relationship. + """ + createCollaboratorRelationship(collaboratorRelationshipCreateInput: CreateCollaboratorRelationshipInput!): CreateCollaboratorRelationshipResult! + + """ + Create a government identifier for a legal entity or for a person. + """ + createGovernmentIdentifier(createGovernmentIdentifierInput: CreateGovernmentIdentifierInput!): GovernmentIdentifierResult! + + """ + Create a government identifier for a legal entity. + """ + createGovernmentIdentifierForLegalEntity(createGovernmentIdentifierForLegalEntityInput: CreateGovernmentIdentifierForLegalEntityInput!): GovernmentIdentifierResult! @deprecated(reason: "Deprecated by createGovernmentIdentifier") + + """ + Create new legal entity and assign it to an organization. + """ + createLegalEntity(createLegalEntityInput: CreateLegalEntityInput!): LegalEntityResult! + + """ + Create new individual legal entity for a shop as part of the signup flow. + """ + createLegalEntityOnSignup(createLegalEntityOnSignupInput: CreateLegalEntityOnSignupInput!): LegalEntityResult! + + """ + Create a tax filing preference for a legal entity + """ + createLegalEntityTaxFilingPreference(governmentIdentifierId: GovernmentIdentifierID!, legalEntityId: LegalEntityID!): CreateLegalEntityTaxFilingPreferenceResult! + + """ + Create an Organization. + """ + createOrganization(organizationCreateInput: OrganizationCreateInput!): OrganizationResult! + + """ + Create an organization domain. + """ + createOrganizationDomain(createOrganizationDomainInput: CreateOrganizationDomainInput!): CreateOrganizationDomainResult! + + """ + Create one or more organization users. + """ + createOrganizationUsers(createOrganizationUsersInput: CreateOrganizationUsersInput!): CreateOrganizationUsersResult! + + """ + Create a Partner Organization. + """ + createPartnerOrganization(input: PartnerOrganizationCreateInput!): OrganizationResult! + + """ + Creates Partner Organization User + """ + createPartnerOrganizationUser(createPartnerOrganizationUserInput: CreatePartnerOrganizationUserInput!): CreatePartnerOrganizationUserResult! + + """ + Create a transfer record for a partner shop. + """ + createPartnerShopTransfer(input: CreatePartnerShopTransferInput!): CreatePartnerShopTransferResult + + """ + Create a person. + """ + createPerson(createPersonInput: CreatePersonInput!): PersonResult! + + """ + Create a person alias. + """ + createPersonAlias(createPersonAliasInput: CreatePersonAliasInput!): PersonAliasResult! + + """ + Create a principal. + """ + createPrincipal(createPrincipalInput: CreatePrincipalInput!): CreatePrincipalResult! + + """ + Create a property transfer request. + """ + createPropertyTransferRequest(input: CreatePropertyTransferRequestInput!): CreatePropertyTransferRequestResult + + """ + Creates a client development shop and the associated reseller relationship. + """ + createResellerDevelopmentShop( + """ + The email of the client to create the shop for. + """ + clientEmail: String! + + """ + The client's purchase order number. + """ + clientPurchaseOrderNumber: String + + """ + The shop's intended country code. + """ + countryCode: String! + + """ + The plan to use for the shop once transferred to the client. + """ + planName: String! + + """ + The number of POS Pro locations to create for the shop. + """ + posProLocationCount: Int! + + """ + The reseller's purchase order number. + """ + resellerPurchaseOrderNumber: String + + """ + The name of the shop. + """ + shopName: String! + + """ + The plan to use for the shop once transferred to the client. + """ + supportedPlanName: ResellerRelationshipSupportedPlans + + """ + Whether to transfer the shop to the client immediately after creation. + """ + transferToClientImmediately: Boolean! + ): CreateClientDevelopmentShopResult! + + """ + Create a Sandbox Organization. + """ + createSandboxOrganization(sandboxOrganizationCreateInput: OrganizationCreateInput!): OrganizationResult! + + """ + Create a store. + """ + createStore( + """ + The full store creation payload (shop signup input). + """ + storeCreatePayload: StoreCreatePayloadInput + ): CreateStoreResult! + + """ + Create a store addition request. + """ + createStoreAdditionRequest(input: CreateStoreAdditionRequestInput!): CreateStoreAdditionRequestResult + + """ + Create a vibe transfer request. + """ + createVibeTransferRequest(input: CreateVibeTransferRequestInput!): CreateVibeTransferRequestResult + + """ + Deletes a CLI token service account organization user. + """ + deleteCliTokenOrganizationUser(deleteCliTokenOrganizationUserInput: DeleteCliTokenOrganizationUserInput!): DeleteCliTokenOrganizationUserResult! + + """ + Delete a government identifier. + """ + deleteGovernmentIdentifiers(deleteGovernmentIdentifiersInput: DeleteGovernmentIdentifiersInput!): DeleteGovernmentIdentifiersResult! + + """ + Delete an organization domain. + """ + deleteOrganizationDomain(deleteOrganizationDomainInput: DeleteOrganizationDomainInput!): DeleteOrganizationDomainResult! + + """ + Bulk deletes Organization Users + """ + deleteOrganizationUsers(organizationUserIds: [OrganizationUserID!]!): DeleteOrganizationUsersResult! + + """ + Deletes Partner Organization User + """ + deletePartnerOrganizationUser(deletePartnerOrganizationUserInput: DeletePartnerOrganizationUserInput!): DeletePartnerOrganizationUserResult! + + """ + Delete people. + """ + deletePeople( + """ + The IDs of the people to delete. + """ + ids: [PersonID!]! + ): DeletePeopleResult! + + """ + Delete a person alias. + """ + deletePersonAlias(deletePersonAliasInput: DeletePersonAliasInput!): PersonAliasResult! + + """ + Delete principals. + """ + deletePrincipals( + """ + The IDs of the principals to delete. + """ + ids: [PrincipalID!]! + ): DeletePrincipalsResult! + + """ + Delete role for an organization. + """ + deleteRole(deleteRoleInput: DeleteRoleInput!): DeleteRoleResult! + + """ + Delete SAML integration. + """ + deleteSamlIntegration: DeleteSamlIntegrationResult! + + """ + Delete SCIM token for an organization. + """ + deleteScimToken: DeleteScimTokenResult! + + """ + Delete supporting documents. + """ + deleteSupportingDocuments( + """ + The IDs of the supporting documents to delete. + """ + ids: [SupportingDocumentID!]! + ): DeleteSupportingDocumentsResult! + + """ + End collaborator access for a shop. + """ + endCollaboration(endCollaborationInput: EndCollaborationInput!): EndCollaborationResult! + + """ + Enforce SAML organization domains onto organization. + """ + enforceSamlOrganizationDomains(enforceSamlOrganizationDomainsInput: EnforceSamlOrganizationDomainsInput!): EnforceSamlOrganizationDomainsResult! + + """ + Expire a collaborator relationship. + """ + expireCollaboratorRelationship(organizationId: OrganizationID!, shopifyShopId: PropertyPublicID!): ExpireCollaboratorRelationshipResult! + + """ + Export a resource. + """ + exportResource(exportResourceInput: ExportResourceInput!): ExportResourceResult + + """ + Finalize a CSV file upload for importing organization users. + """ + finalizeOrganizationUserImportCsvUpload(finalizeOrganizationUserImportCsvUploadInput: FinalizeOrganizationUserImportCsvUploadInput!): FinalizeOrganizationUserImportCsvUploadResult! + + """ + Finalize an upload for a supporting document. + """ + finalizeSupportingDocumentUpload(finalizeSupportingDocumentUploadInput: FinalizeSupportingDocumentUploadInput!): FinalizeSupportingDocumentResult! + + """ + Generate domain verification code for an organization. + """ + generateDomainVerificationCode(generateDomainVerificationCodeInput: GenerateDomainVerificationCodeInput!): GenerateDomainVerificationCodeResult! + + """ + Generate SCIM token for an organization. + """ + generateScimToken: GenerateScimTokenResult! + + """ + Create group on an organization. + """ + groupCreate(groupCreateInput: GroupCreateInput!): GroupCreateResult + + """ + Updates a group on an organization. + """ + groupUpdate(groupUpdateInput: GroupUpdateInput!): GroupUpdateResult + + """ + Delete groups on an organization. + """ + groupsDelete(groupsDeleteInput: GroupsDeleteInput!): GroupsDeleteResult! + + """ + Rollback an organization from using organization billing + """ + migrateFromOrganizationBilling(organizationId: OrganizationID): OrganizationResult! + + """ + Migrate an organization to use organization billing + """ + migrateToOrganizationBilling(organizationId: OrganizationID): OrganizationResult! + + """ + Update the status of a Partner Organization. + """ + organizationUpdateStatus(organizationUpdateStatusInput: OrganizationUpdateStatusInput!): OrganizationResult! + + """ + Deletes organization user. + """ + organizationUserDelete(input: OrganizationUserDeleteInput!): OrganizationUserDeleteResult! + + """ + Provision access to a shop for the requester + """ + organizationUserProvisionShopAccess(organizationUserProvisionShopAccessInput: OrganizationUserProvisionShopAccessInput!): OrganizationUserProvisionShopAccessResult! + + """ + Updates an organization user. + """ + organizationUserUpdate(organizationUserUpdateInput: OrganizationUserUpdateInput!): OrganizationUserUpdateResult! + + """ + Bulk assign a group to organization users. + """ + organizationUsersBulkGroupAssign(organizationUsersBulkGroupAssignInput: OrganizationUsersBulkGroupAssignInput!): OrganizationUserIdsResult! + + """ + Bulk assign roles to organization users. + """ + organizationUsersBulkRoleAssign(organizationUsersBulkRoleAssignInput: OrganizationUsersBulkRoleAssignInput!): OrganizationUserIdsResult! + + """ + Create organization users. + """ + organizationUsersCreate(organizationUsersCreateInput: OrganizationUsersCreateInput!): OrganizationUsersCreateResult! + + """ + Deletes an array of organization users. + """ + organizationUsersDelete(organizationUserIdsInput: OrganizationUserIdsInput!): OrganizationUsersDeleteResult! + + """ + Suspends or reactivates an array of organization users. + """ + organizationUsersUpdateStatus(organizationUsersUpdateStatusInput: OrganizationUsersUpdateStatusInput!): OrganizationUserIdsResult! + + """ + Enable RBAC for a Partner organization. Call this after inspecting migrated role data from partnersMigrationMigrateUsers. + """ + partnersMigrationEnableRbac(input: PartnersMigrationEnableRbacInput!): AccessPartnersMigrationEnableRbacResult + + """ + Migrate Partners users to Business Platform RBAC. + """ + partnersMigrationMigrateUsers(input: PartnersMigrationMigrateUsersInput!): AccessPartnersMigrationMigrateUsersResult + + """ + Removes store access from a legacy plus role. + """ + plusRoleRemoveStoreAccess(plusRoleRemoveStoreAccessInput: PlusRoleRemoveStoreAccessInput!): UpdateRoleResult! + + """ + Provision collaborator access for a shop. + """ + provisionCollaboratorAccess(provisionCollaboratorAccessInput: ProvisionCollaboratorAccessInput!): ProvisionCollaboratorAccessResult! + + """ + Updates an organization user, this mutation is only designed to be used by shopify proxy for POS App requests. + """ + proxyOrganizationUserUpdate(input: ProxyOrganizationUserUpdateInput!): ProxyOrganizationUserUpdateResult! + + """ + Creates a retail only organization user, this mutation is only designed to be used by shopify proxy for POS App requests. + """ + proxyRetailOnlyOrganizationUserCreate(input: ProxyRetailOnlyOrganizationUserCreateInput!): ProxyRetailOnlyOrganizationUserCreateResult! + + """ + Updates a retail only organization user, this mutation is only designed to be used by shopify proxy for POS App requests. + """ + proxyRetailOnlyOrganizationUserUpdate(input: ProxyRetailOnlyOrganizationUserUpdateInput!): ProxyRetailOnlyOrganizationUserUpdateResult! + + """ + Deletes a retail only user from the organization's shop, this mutation is only + designed to be used by shopify proxy for POS App requests. + """ + proxyRetailOnlyShopUserDelete(input: ProxyRetailOnlyShopUserDeleteInput!): ProxyRetailOnlyShopUserDeleteResult! + + """ + Reactivate suspended shop property access state. + """ + reactivateShopAccess(organizationUserId: OrganizationUserID!, shopifyShopId: PropertyPublicID!): UpdateOrganizationUserResult! + + """ + Remove role of an organization user. + """ + removeOrganizationUserRole(removeOrganizationUserRoleInput: RemoveOrganizationUserRoleInput!): RemoveOrganizationUserRoleResult! + + """ + Remove shop property access. + """ + removeShopAccess(organizationUserId: OrganizationUserID!, shopifyShopId: PropertyPublicID!): RemoveShopAccessResult! + + """ + Remove shop from an explicit non-plus organization. + """ + removeShopFromNonPlusOrganization(input: RemoveShopFromNonPlusOrganizationInput!): RemoveShopFromNonPlusOrganizationResult! + + """ + Request collaborator access for a shop. + """ + requestCollaboration(requestCollaborationInput: RequestCollaborationInput!): RequestCollaborationResult! + + """ + Re-request access for an expired collaborator relationship. + """ + rerequestCollaboratorRelationship(shopifyShopId: PropertyPublicID!): RerequestCollaboratorRelationshipResult! + + """ + Resends the invite email for an invited organization user. + """ + resendInviteEmail(organizationUserId: OrganizationUserID!): OrganizationUserIdResult! + + """ + Reset the TFA enforcement setting for an organization user. + """ + resetOrganizationUserTfa(resetOrganizationUserTfaInput: ResetOrganizationUserTfaInput!): ResetOrganizationUserTfaResult! + + """ + Re-syncs user data after a Partner hand-off ownership transfer + """ + resyncUserDataAfterPartnerHandoff(shopifyShopId: PropertyPublicID!, sourceOrganizationId: OrganizationID): ResyncUserDataAfterPartnerHandoffResult! + + """ + Update a retail only organization user. + """ + retailOnlyOrganizationUserUpdate(input: RetailOnlyOrganizationUserUpdateInput!): RetailOnlyOrganizationUserUpdateResult! + + """ + Create a retail only organization users. + """ + retailOnlyOrganizationUsersCreate(input: RetailOnlyOrganizationUsersCreateInput!): RetailOnlyOrganizationUsersCreateResult! + + """ + Set the billing_account_id and initial_billing_account_id for a shop in an organization. + """ + setOrganizationShopBillingAccountId(setOrganizationShopBillingAccountIdInput: SetOrganizationShopBillingAccountIdInput!): SetOrganizationShopBillingAccountIdResult! + + """ + Set the test drive status for a shop + """ + setShopTestDriveStatus(handle: String!, shopId: PropertyPublicID!, status: TestDriveShopStatus!): SetShopTestDriveStatusResult + + """ + Setting up SAML integration. + """ + setupSamlIntegration(setupSamlIntegrationInput: SetupSamlIntegrationInput!): SetupSamlIntegrationResult! + + """ + Update shop identification settings. + """ + shopIdentificationSettingsUpdate(code: String, icon: String, internalName: String, shopifyShopId: PropertyPublicID!): ShopIdentificationSettingsUpdateResult + + """ + Stage a CSV file upload for importing organization users. + """ + stageOrganizationUserImportCsvUpload(stageOrganizationUserImportCsvUploadInput: StageOrganizationUserImportCsvUploadInput!): StageOrganizationUserImportCsvUploadResult! + + """ + Stage an upload for a supporting document. + """ + stageSupportingDocumentUpload(stageSupportingDocumentUploadInput: StageSupportingDocumentUploadInput!): StageSupportingDocumentUploadResult! + + """ + Suspend shop property access state. + """ + suspendShopAccess(organizationUserId: OrganizationUserID!, shopifyShopId: PropertyPublicID!): UpdateOrganizationUserResult! + + """ + Sync the test drive status for a shop + """ + syncShopTestDriveStatus(handle: String!, shopId: PropertyPublicID!): SyncShopTestDriveStatusResult + + """ + Activate or deactivate a test drive feature for all shops in an organization + """ + toggleTestDriveForAllShops(input: ToggleTestDriveForAllShopsInput!): ToggleTestDriveForAllShopsResult + + """ + Transfer ownership of an Organization to another user + """ + transferOrganizationOwnership(input: OrganizationTransferOwnershipInput!): OrganizationTransferOwnershipResult! + + """ + Unarchive a legal entity. + """ + unarchiveLegalEntity(id: LegalEntityID!): LegalEntityResult! + + """ + Update a government identifier. + """ + updateGovernmentIdentifier(updateGovernmentIdentifierInput: UpdateGovernmentIdentifierInput!): GovernmentIdentifierResult! + + """ + Updates legacy partner user permissions + """ + updateLegacyPartnerUserPermissions(updateLegacyPartnerUserPermissionsInput: UpdateLegacyPartnerUserPermissionsInput!): UpdateLegacyPartnerUserPermissionsResult! + + """ + Update attributes of a legal entity. + """ + updateLegalEntity(updateLegalEntityInput: UpdateLegalEntityInput!): LegalEntityResult! + + """ + Update the organization name. + """ + updateOrganizationName(name: String!): OrganizationResult! + + """ + Update the TFA enforcement setting for an organization. + """ + updateOrganizationTfaEnforcement(updateOrganizationTfaEnforcementInput: UpdateOrganizationTfaEnforcementInput!): UpdateOrganizationTfaEnforcementResult! + + """ + Update an Organization User. + """ + updateOrganizationUser(updateOrganizationUserInput: UpdateOrganizationUserInput!): UpdateOrganizationUserResult! + + """ + Bulk updates Organization Users access state. + """ + updateOrganizationUserAccessState(active: Boolean!, organizationUserIds: [OrganizationUserID!]!): UpdateOrganizationUserAccessResult! + + """ + Update role of an organization user. + """ + updateOrganizationUserRole(updateOrganizationUserRoleInput: UpdateOrganizationUserRoleInput!): UpdateOrganizationUserRoleResult! + + """ + Update a Partner Organization. + """ + updatePartnerOrganization(updatePartnerOrganizationInput: UpdatePartnerOrganizationInput!): OrganizationResult! + + """ + Update a person. + """ + updatePerson(updatePersonInput: UpdatePersonInput!): PersonResult! + + """ + Update a person alias. + """ + updatePersonAlias(updatePersonAliasInput: UpdatePersonAliasInput!): PersonAliasResult! + + """ + Update a principal. + """ + updatePrincipal(updatePrincipalInput: UpdatePrincipalInput!): UpdatePrincipalResult! + + """ + Updates a reseller relationship. + """ + updateResellerRelationship( + """ + The input for updating the reseller relationship. + """ + resellerRelationshipUpdateInput: UpdateResellerRelationshipInput! + ): UpdateResellerRelationshipResult! + + """ + Update role for an organization. + """ + updateRole(updateRoleInput: UpdateRoleInput!): UpdateRoleResult! + + """ + Update the SAML certificate for an organization. + """ + updateSamlCertificate: UpdateSamlCertificateResult! + + """ + Update an Organization User's single shop access profile. + """ + updateShopAccessProfile(updateShopAccessProfileInput: UpdateShopAccessProfileInput!): UpdateShopAccessProfileResult! + + """ + Create or update a legal entity with all related entities in a single atomic operation. + """ + upsertLegalEntity(input: UpsertLegalEntityInput!): LegalEntityResult! + + """ + Update or create a test drive business feature setting + """ + upsertTestDriveBusinessFeatureSetting(input: UpsertTestDriveBusinessFeatureSettingInput!): UpsertTestDriveBusinessFeatureSettingResult +} + +type NameVariant { + firstName: String + fullName: String + lastName: String + middleName: String + + """ + The name in this variant + """ + name: String + prefix: String + suffix: String + + """ + The type of name variant (e.g., 'kanji', 'kana') + """ + variantType: String! +} + +input NameVariantInput { + """ + The first name in this variant. + """ + firstName: String + + """ + The last name in this variant. + """ + lastName: String + + """ + The middle name in this variant. + """ + middleName: String + + """ + The prefix in this variant. + """ + prefix: String + + """ + The suffix in this variant. + """ + suffix: String + + """ + The type of name variant + """ + variantType: AlphabetType! +} + +type NavigationSettings { + navigationItems: [NavigationSettingsItem!]! +} + +type NavigationSettingsItem { + children: [NavigationSettingsItem!]! + id: String! + title: String! + url: String! +} + +interface Node { + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! +} + +type Offering { + """ + Name of the offering + """ + handle: String! + + """ + Handle of the offering + """ + name: String! +} + +""" +Operators for filter queries. +""" +enum Operator { + """ + Between operator. + """ + BETWEEN + + """ + Equals operator. + """ + EQUALS + + """ + In operator. Accepts a comma-separated string of values (e.g. + "value1,value2,value3"). Not supported for all filter fields. + """ + IN +} + +type Organization implements Node { + """ + Returns a role if it exists. + """ + accessRole(id: AccessRoleID!): AccessRole + + """ + Returns a list of roles in the organization. + """ + accessRoles( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + filters: [RoleFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + includeNonAssignableRoles: Boolean = false + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + sort: RoleSort + ): AccessRoleConnection! + + """ + Returns a single shop that the user has access to. + """ + accessibleShop( + """ + The ID of the shop. + """ + id: ShopifyShopID! + ): Shop + + """ + Distinct raw plan_name values across all shops accessible to the current user. + """ + accessibleShopPlans( + """ + Distinct raw plan_name values for the requested accessible store type.When + store_type is omitted, returns plan names from owned shops only. + """ + storeType: Store + ): [String!]! + + """ + Returns a list of shops that the user has access to. + """ + accessibleShops( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + filters: [ShopFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Search query for shops. + """ + search: String + + """ + Sort order for shops. + """ + sort: ShopSort + ): ShopConnection + + """ + Returns an action audit if it exists. + """ + actionAudit(id: ActionAuditID!): AccessActionAudit + + """ + Action audits for the organization. + """ + actionAudits( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + filters: [ActionAuditFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AccessActionAuditConnection! + + """ + Returns a list of roles in the organization that could be assigned by requesting user. + """ + assignableAccessRoles( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + assigneeType: AccessRoleAssignmentAssignee + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + filters: [RoleFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + ): AccessRoleConnection! + + """ + Returns all shops with active collaborator relationships that can be assigned to roles. + """ + assignableCollaboratorShops( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + ): ShopConnection! + + """ + Returns the list of assignable organization permissions for the organization. + """ + assignableOrganizationPermissions: [String!] + + """ + Returns the list of assignable partner permissions for the organization. + """ + assignablePartnerPermissions: [String!] + + """ + Returns the list of assignable point of sale permissions for the organization. + """ + assignablePointOfSalePermissions: AssignablePointOfSalePermissions + + """ + Returns the list of assignable shop permissions for the organization. + """ + assignableShopPermissions: [String!] + + """ + Returns a list of shops that can be managed by the requesting user. + """ + assignableShops( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + assigneeType: AccessRoleAssignmentAssignee! + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + roleType: AccessRoleAssignmentRole = STORE + search: String + shopifyShopIds: String + ): ShopConnection! + + """ + Returns a list of payment method options the organization can onboard + """ + availablePaymentMethods: [PaymentMethodOption!]! + + """ + Bulk data for the organization. + """ + bulkData: BulkData! + + """ + Organizations connected to this organization through client transfers - whether as the transferring or receiving party. + """ + clientTransferOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationReferenceConnection! + + """ + Organizations on the other side of collaborator relationships with this organization. + """ + collaboratorOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationReferenceConnection! + + """ + Returns the collaborator relationship for the organization and the given shop. + """ + collaboratorRelationship(shopifyShopId: ShopifyShopID!): CollaboratorRelationship + + """ + Organizations on the other side of client transfers and collaborator relationships with this organization. + """ + counterpartOrganizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationReferenceConnection! + + """ + Organization creation date. + """ + createdAt: ISO8601DateTime! + + """ + Returns a single CSV import run by ID. + """ + csvImport( + """ + The ID of the import run. + """ + id: BusinessUsersImportID! + ): BusinessUsersImportRun + + """ + Returns a list of CSV import runs for the organization. + """ + csvImports( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Filter import runs by status. + """ + status: BusinessUsersImportStatus + ): BusinessUsersImportRunConnection! + + """ + Returns the requester. + """ + currentUser: OrganizationUserInterface + + """ + Scopes for the requester's ability to manage role assignments across stores. + """ + currentUserScopesForManagingRoleAssignments: ScopesForManagingRoleAssignments! + + """ + Returns a list of domains in the organization. + """ + domains( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationDomainConnection + + """ + Returns true/false values indicating if each flag is enabled for the organization. + """ + enabledFlags( + """ + The hashed handles of the flags to check. + """ + flagHandles: [String!]! + ): [Boolean!]! + + """ + Returns a list of people that can be associated to legal entities in the organization. + """ + entityPeople( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + filters: [PersonFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + ): PersonConnection + + """ + Feature set for the organization. + """ + featureSet: [OrganizationFeature!]! + + """ + Checks if a government identifier already exists in the organization. + """ + governmentIdentifierDuplicationCheck( + """ + Optionally exclude a specific entity from the check. + """ + excludeIdentifiableId: SupportedEntityId + + """ + The government identifier type handle (e.g., us_ssn, ca_passport). + """ + identifierType: String! + + """ + The raw government identifier value to check. + """ + value: String! + ): [GovernmentIdentifierDuplicationCheck!] + + """ + Returns a group if it exists. + """ + group(id: GroupID!): Group + + """ + Returns a list of groups in the organization. + """ + groups( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + filters: [UserGroupFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + includeNonAssignableGroups: Boolean = true + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + sort: UserGroupSort + type: GroupType + ): GroupConnection! + + """ + Cached status of a feature flag for the organization. + """ + hasFeatureFlag( + """ + The handle for the feature flag. + """ + handle: String! + ): Boolean! + + """ + Returns true if the organization has users that are not TFA enforced. + """ + hasTfaUnenforcedUsers: Boolean + + """ + The ID for an object. + """ + id: GlobalID! + + """ + Returns a list of applications installed on organization shops. + """ + installedShopApps( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Search query for shop apps. + """ + search: String + ): ShopAppConnection + + """ + Returns true if the organization has been auto migrated to RBAC. + """ + isAutoMigratedToRbac: Boolean! + + """ + Whether the organization is a partner organization. + """ + isPartner: Boolean! + + """ + Whether the organization is a plus organization. + """ + isPlus: Boolean! + + """ + Whether the organization is a reseller partner organization. + """ + isResellerPartner: Boolean! + + """ + Returns a list of the organization's legal entities. + """ + legalEntities( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + excludeUnspecifiedEntities: Boolean = false + filters: [LegalEntityFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + sort: LegalEntitySortField + ): LegalEntityConnection + + """ + Returns a Legal Entity by the specified ID. + """ + legalEntity(id: LegalEntityID!): LegalEntity + + """ + Returns the reseller relationship for a shop owned by this organization. + """ + merchantResellerRelationship(shopifyShopId: ShopifyShopID!): ResellerRelationship + + """ + Organization name. + """ + name: String! + + """ + Returns the navigation settings for the organization user. + """ + navigationSettings( + """ + When true, returns navigation settings scoped to organization context only. + """ + organizationContextOnly: Boolean = false + shopifyUserId: String + ): NavigationSettings + + """ + The organization owner. + """ + owner: OrganizationUserInterface + + """ + Returns a single pending store addition request. + """ + pendingStoreAdditionRequest(id: StoreAdditionRequestID!): StoreAdditionRequest + + """ + Returns a list of pending store addition requests. + """ + pendingStoreAdditionRequests( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + filters: [ShopPropertyFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + sort: StoreAdditionRequestSort + ): StoreAdditionRequestConnection + + """ + Returns a Person by the specified ID. + """ + person(id: PersonID!): Person + + """ + Organization primary handle + """ + primaryHandle: String + + """ + Returns the primary payment method for the organization's billing account. + """ + primaryPaymentMethod: OrganizationPrimaryPaymentMethod + + """ + Returns all the organization's properties. + """ + properties( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + filters: [ShopPropertyFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Offering handles of the requested properties. Leave blank to get all properties. + """ + offeringHandles: [String!] + + """ + Search query for shop properties. + """ + search: String + sort: ShopPropertySort + ): PropertyInterfaceConnection + + """ + Returns a single property. + """ + property(externalId: PropertyPublicID!, offeringHandle: String!): PropertyInterface + queryComplexity: Int! + queryDepth: Int! + + """ + Returns the reseller for the organization. + """ + reseller: Reseller + + """ + Returns the reseller relationship between the organization and the specified shop. + """ + resellerRelationship(shopifyShopId: ShopifyShopID!): ResellerRelationship + + """ + Returns all reseller relationships for the organization. + """ + resellerRelationships( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ResellerRelationshipWithShopConnection! + + """ + Returns shops for the organization that have an associated reseller relationship. + """ + resellerShops( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ShopConnection! + + """ + Resolves whether a legal entity being added to the organization matches, + conflicts with, or is ambiguous against existing legal entities. + """ + resolveLegalEntityMatch(input: LegalEntityMatchInput!): ResolveLegalEntityMatchPayload! + + """ + Resolves whether a person being added to the organization matches, conflicts + with, or is ambiguous against existing people. + """ + resolvePersonMatch(input: PersonMatchInput!): ResolvePersonMatchPayload! + + """ + Returns the Retail specific data for the organization. + """ + retailData: OrganizationRetailData + + """ + Returns a role if it exists. + """ + role(id: RoleID!): Role + + """ + Returns a list of Roles in alphabetical order. + """ + roles( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + sort: OrganizationRoleSort + ): RoleConnection + + """ + SAML integration settings and metadata. + """ + samlConfiguration: SamlConfiguration + + """ + Returns SAML Single Sign-on url for the organization. + """ + samlSsoUrl: String + + """ + Returns SCIM token for the organization. + """ + scimToken: String + + """ + Returns number of active shops in the organization. + """ + shopCount: Int + + """ + Returns a shop for retail/POS user management purposes. + """ + shopForRetailManagement(shopifyShopId: ShopifyShopID!): RetailShop + shopIdentificationSettingsDuplicationCheck(internalStoreCode: String, internalStoreName: String): [ShopIdentificationSettingsDuplicationCheck!] + + """ + Whether the organization has reached its shop limit. + """ + shopLimitReached: Boolean! + + """ + Returns a single pending app dev store addition request. + """ + storeCreation(shopDomain: String!): StoreCreation + + """ + Organization tags + """ + tags: [Tag!] @deprecated(reason: "Use isPartner/isPlus or similar fields.") + + """ + Returns a test drive feature by its handle if it exists. + """ + testDriveFeature(handle: String!): TestDriveFeature + + """ + Returns a list of test drive features for the organization. + """ + testDriveFeatures: [TestDriveFeature!] + + """ + Returns the state of TFA enforcement for the organization. + """ + tfaEnforcement: TfaEnforcement! + timezone: String + + """ + Returns an organization user if they exist. + """ + userById(id: OrganizationUserID!): OrganizationUserInterface + + """ + Returns an organization user located by their identity uuid if they exist. + """ + userByIdentityUuid(identityUuid: String!): OrganizationUserInterface + + """ + Returns an organization user located by their shopify user id if they exist (example id: gid://shopify/StaffMember/54). + """ + userByShopifyUserId(shopifyUserId: String!): OrganizationUserInterface + + """ + User limits for the organization. + """ + userLimits: UserLimits! + + """ + List of all users that can be managed within the organization. + """ + users( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + filters: [OrganizationUserFilterInput!] + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + sort: OrganizationUserSort + ): OrganizationUserInterfaceConnection! + + """ + Returns the organization user(s) located by their email if they exist. + """ + usersByEmail(emails: [String!]!): [OrganizationUserInterface!] +} + +""" +The connection type for Organization. +""" +type OrganizationConnection { + """ + A list of edges. + """ + edges: [OrganizationEdge!]! + + """ + A list of nodes. + """ + nodes: [Organization!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +input OrganizationCreateInput { + """ + Unique key associated with the request. + """ + idempotencyKey: String! + + """ + Organization name + """ + name: String! + + """ + Identity UUID of the organization owner. + """ + ownerUuid: String! +} + +type OrganizationDomain implements Node { + domainName: String! + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! + status: OrganizationDomainStatus! + verificationCode: String + verified: Boolean! +} + +""" +The connection type for OrganizationDomain. +""" +type OrganizationDomainConnection { + """ + A list of edges. + """ + edges: [OrganizationDomainEdge!]! + + """ + A list of nodes. + """ + nodes: [OrganizationDomain!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type OrganizationDomainEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: OrganizationDomain! +} + +""" +The ID for a OrganizationDomain. +""" +scalar OrganizationDomainID + +enum OrganizationDomainStatus { + """ + The domain has been declined. + """ + DECLINED + + """ + The domain is currently being enforced. + """ + ENFORCED + + """ + The domain is in the process of being enforced. + """ + ENFORCING + + """ + The domain has been verified and is manually enforced. + """ + MANUALLY_ENFORCED + + """ + The domain is not being enforced. + """ + NOT_ENFORCED + + """ + The domain is in the process of having enforcement revoked. + """ + UNENFORCING + + """ + The domain has not been verified. + """ + UNVERIFIED + + """ + The domain has conflicts with other organization(s). + """ + UNVERIFIED_CONFLICTED +} + +""" +An edge in a connection. +""" +type OrganizationEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Organization! +} + +enum OrganizationFeature { + """ + All collaborator stores role assignment is enabled for the organization. + """ + ALL_COLLABORATOR_STORES_ROLE_ASSIGNMENT + + """ + All owned stores role assignment is enabled for the organization. + """ + ALL_OWNED_STORES_ROLE_ASSIGNMENT + + """ + Analytics overview is enabled for the organization. + """ + ANALYTICS_OVERVIEW + + """ + App development is enabled for the organization. + """ + APP_DEVELOPMENT + + """ + Central legal entities experience is enabled for the organization. + """ + CENTRAL_LEGAL_ENTITIES + + """ + Client transfer store management is enabled for the organization. + """ + CLIENT_TRANSFER_STORE_MANAGEMENT + + """ + Collaboration with shops in other organizations is enabled for the organization. + """ + COLLABORATORS + + """ + Direct access to Organization Settings is enabled for the organization. + """ + DIRECT_ACCESS + + """ + Domain verification is enabled for the organization. + """ + DOMAIN_VERIFICATION + + """ + First-party employee provisioning via SCIM is enabled for the organization. + When present, allows specific 1P Okta configurations to provision shopify.com + users without requiring a verified domain. + """ + FIRST_PARTY_SCIM_PROVISIONING + + """ + Group management is enabled for the organization. + """ + GROUPS + + """ + MFA management is enabled for the organization. + """ + MFA_MANAGEMENT + + """ + Organization billing is enabled for the organization. + """ + ORGANIZATION_BILLING + + """ + Organization settings are enabled for the organization. + """ + ORGANIZATION_SETTINGS + + """ + Partner functionality is enabled for the organization. + """ + PARTNER + + """ + Role management is enabled for the organization. + """ + ROLES + + """ + SAML is enabled for the organization. + """ + SAML + + """ + SCIM is enabled for the organization. + """ + SCIM + + """ + Store builder affiliate store creation flow is enabled for the organization. + Suppresses claim store invitation emails for affiliate-created store transfers. + """ + STORE_BUILDER_AFFILIATE_STORE_CREATION + + """ + Store creation is enabled for the organization. + """ + STORE_CREATION + + """ + Store removal is enabled for the organization. + """ + STORE_REMOVAL + + """ + Stores can be transferred between organizations. + """ + STORE_TRANSFER + + """ + Strict organization data boundary is enforced. Store-only users cannot access organization-level data like legal entities. + """ + STRICT_ORG_DATA_BOUNDARY + + """ + Test Drive is enabled for the organization. + """ + TEST_DRIVE + + """ + Organization-level user seat limits are not enforced for this organization. + """ + UNLIMITED_ORG_USERS +} + +""" +The ID for a Organization. +""" +scalar OrganizationID + +""" +The primary payment method for the organization's billing account. +""" +type OrganizationPrimaryPaymentMethod { + """ + User-visible label for the payment method, varying by `paymentType`. Non-PII + for cards (card brand, e.g. 'visa') and bank accounts (bank name). **Contains + user-identifying PII for PayPal (account email) and UPI (UPI ID)** — gated by + the field's billing/store-management permissions. Null when no label is available. + """ + displayLabel: String + + """ + The card expiry month (1-12). Null when not a card. + """ + expiryMonth: Int + + """ + The card expiry year (four-digit). Null when not a card. + """ + expiryYear: Int + + """ + The last four digits of the card or account number. Null when not applicable. + """ + lastFourDigits: String + + """ + The type of payment method (e.g. credit_card, bank_account, paypal). + """ + paymentType: PaymentMethodOption +} + +""" +A lightweight reference to an organization. +""" +type OrganizationReference implements Node { + """ + The ID for an object. + """ + id: GlobalID! + + """ + The organization name. + """ + name: String! + queryComplexity: Int! + queryDepth: Int! +} + +""" +The connection type for OrganizationReference. +""" +type OrganizationReferenceConnection { + """ + A list of edges. + """ + edges: [OrganizationReferenceEdge!]! + + """ + A list of nodes. + """ + nodes: [OrganizationReference!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type OrganizationReferenceEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: OrganizationReference! +} + +type OrganizationResult { + """ + Created or mutated organization. + """ + organization: Organization + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type OrganizationRetailData { + hasPosProSubscription: Boolean! +} + +""" +Sort options for roles queries. +""" +enum OrganizationRoleSort { + """ + Sort by name ascending. + """ + NAME_ASC + + """ + Sort by name descending. + """ + NAME_DESC + + """ + Sort by number of users ascending. + """ + USER_COUNT_ASC + + """ + Sort by number of users descending. + """ + USER_COUNT_DESC +} + +""" +A summary of the permissions for an organization role. +""" +type OrganizationRoleSummary { + permissions: [AccessRolePermission!] +} + +enum OrganizationStatus { + """ + The organization is active. + """ + ACTIVE + + """ + The organization is locked. + """ + LOCKED +} + +type OrganizationTransferOwnershipError { + """ + The error code. + """ + code: OrganizationTransferOwnershipErrorCode! + + """ + Path to the input field which caused the error + """ + field: [String!]! + + """ + The error message + """ + message: String! +} + +enum OrganizationTransferOwnershipErrorCode { + """ + The organization has a Canadian contract. The ownership transfer is not allowed. + """ + CANADIAN_CONTRACT + + """ + The user is not active. + """ + INACTIVE + + """ + The user is invited. They need to accept their invite to transfer ownership. + """ + INVITED + + """ + Email doesn’t exist in this organization. + """ + NOT_FOUND + + """ + The user is pending deletion. Ownership can't be transferred to them. + """ + PENDING_DELETION + + """ + Email matches current organization owner. + """ + SAME_EMAIL + + """ + The user is suspended. They need to be reactived to transfer ownership. + """ + SUSPENDED +} + +input OrganizationTransferOwnershipInput { + """ + An email of new organization owner. + """ + newOwnerEmail: String! +} + +type OrganizationTransferOwnershipResult { + """ + New organization owner. + """ + newOrganizationOwner: OrganizationUser + + """ + Mutated organization. + """ + organization: Organization + + """ + The collection of errors. + """ + userErrors: [OrganizationTransferOwnershipError!] +} + +input OrganizationUpdateStatusInput { + organizationId: OrganizationID! + + """ + The new status for the organization. + """ + status: OrganizationStatus! +} + +type OrganizationUser implements Node & OrganizationUserInterface { + """ + Returns all the organization's properties the requesting user can grant access to. + """ + accessGrantableProperties( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Offering handles of the requested properties. Leave blank to get all properties. + """ + offeringHandles: [String!] + + """ + Search shop's name or uri. Only returns shop properties. + """ + search: String + + """ + Sort shop's name or uri. + """ + sort: ShopPropertySort + + """ + Filter out properties the target organization user already has access to. + """ + targetOrganizationUserId: OrganizationUserID + + """ + Filter out properties the target role already has access to. + """ + targetRoleId: RoleID + ): PropertyInterfaceConnection + + """ + Returns a summary of the user's access permissions. + """ + accessSummary: AccessSummary + admin: Boolean! + administrativePermissions: [String!] + + """ + Returns all aggregated role assignments for the user. + """ + aggregatedRoleAssignments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AccessAggregatedRoleAssignmentConnection + + """ + Returns all groups that can be assigned to the user. + """ + assignableGroups( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GroupConnection + + """ + Returns whether the requester can resend the invitation for the target. + """ + canResendInvite( + """ + The target invited organization user. + """ + targetOrganizationUserId: OrganizationUserID! + ): Boolean! + + """ + TrustedToRequestCollaboration result for the current viewer. Self-only: raises + when queried on any OrganizationUser other than `currentUser`. Null when the + viewer has no identity account. + """ + collaborationEligibility( + """ + URL to redirect to after IDV completes. Embedded in `challengeUrl` only when + `status` is `REQUIRED` and the host is on the IDV redirect allowlist; + otherwise ignored. + """ + returnUrl: URL + ): CollaborationEligibility + collaboratorAccess: CollaboratorAccessStatus + + """ + A summary of collaborator relationship access for the user. + """ + collaboratorRelationshipAccessSummary: CollaboratorRelationshipAccessSummary + createdAt: ISO8601DateTime! + createdBy: OrganizationUser + email: String! + generatePinForShop(length: Int, shopifyShopId: PropertyPublicID!): String + + """ + Returns a list of groups assigned to the user. + """ + groups( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GroupConnection! + hasManageCollaboratorShopPermission: Boolean! + id: GlobalID! + isPinEasyToGuessForShop(pin: String!, shopifyShopId: PropertyPublicID!): EasyToGuessPinResponse + isShopifyEmployee: Boolean! + migratableToRbacByRequester: Boolean! + + """ + Organization-wide access conditions applied to the user. + """ + organizationAccessConditions: [String!]! + organizationPermissions: [String!]! + partnerPermissions: [String!] + privateData: PrivateData! + queryComplexity: Int! + queryDepth: Int! + rbacBannerCode: String + + """ + Returns a list of retail accesses for the user. + """ + retailAccesses( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): RetailAccessConnection! + role: Role + + """ + Returns a list of roles assigned to the user. + """ + roles( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AccessRoleConnection! + samlEnforcementState: UserSamlEnforcementState! + shopAccessDetailsByShopifyShopId(shopifyShopId: PropertyPublicID!): UserShopAccessDetails + shopAccesses( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + search: String + shopifyShopIds: [PropertyPublicID!] + sort: ShopPropertySort + ): ShopAccessConnection + + """ + Returns a list of Roles in alphabetical order. + """ + shopsAssignedFromRole( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + roleId: AccessRoleID! + ): ShopConnection! + status: OrganizationUserStatus! + + """ + A summary of current store access for the user (legacy or RBAC). + """ + storeAccessSummary: StoreAccessSummary + tfaEnforced: Boolean! + useRbacAccess: Boolean! + verifiedOrganizationDomain: Boolean! + wasSubAdmin: Boolean! +} + +input OrganizationUserDeleteInput { + """ + The ID of the user to delete. + """ + organizationUserId: OrganizationUserID +} + +type OrganizationUserDeleteResult { + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + Whether the user was deleted immediately. If false, the user will be deleted asynchronously. + """ + synchronouslyDeleted: Boolean! + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Field options for filtering users queries. +""" +enum OrganizationUserFilterField { + """ + What parts of shopify the user has access to. + """ + ACCESS_TYPE + + """ + The administrative permissions the user has. + """ + ADMINISTRATIVE_PERMISSION + + """ + The date when this user was created. + """ + CREATED_AT + + """ + The ID of the user who created this user. + """ + CREATED_BY + + """ + The ID for a group the user belongs to. + """ + GROUP_ID + + """ + The IDs for groups the user belongs to. + """ + GROUP_IDS + + """ + Whether or not MFA is enabled on a user. + """ + MFA_ENABLED + + """ + The permissions the user has. + """ + PERMISSION + + """ + The ID for a role the user belongs to. + """ + ROLE_ID + + """ + The security type for the user. + """ + SECURITY_TYPE + + """ + The ID for a Shopify shop the user has access to. + """ + SHOPIFY_SHOP_ID + + """ + The account type of a user on a shop. + """ + SHOP_ACCOUNT_TYPE + + """ + The status of a user. + """ + STATUS + + """ + The type of the user to be filtered by. + """ + USER_TYPE + + """ + Indicates if the user has been migrated to RBAC-based access. + """ + USE_RBAC_ACCESS +} + +""" +Represents a single filter option for users queries. +""" +input OrganizationUserFilterInput { + field: OrganizationUserFilterField! + operator: Operator! + value: String! +} + +""" +The ID for a OrganizationUser. +""" +scalar OrganizationUserID + +type OrganizationUserIdResult { + """ + The organization user id of the target organization user. + """ + organizationUserId: OrganizationUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input OrganizationUserIdsInput { + """ + The IDs of the users. + """ + organizationUserIds: [OrganizationUserID!]! +} + +type OrganizationUserIdsResult { + organizationUserIds: [OrganizationUserID!] + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type OrganizationUserImportDirectUploadParams { + """ + Token used to refer to the uploaded file. + """ + directUploadToken: String! + + """ + Required HTTP headers for the upload request. + """ + headers: [OrganizationUserImportUploadHeader!]! + + """ + Endpoint to upload file directly to storage service. + """ + url: String! +} + +""" +Metadata for the CSV file the client will upload directly to storage. +""" +input OrganizationUserImportFileMetadataInput { + """ + File size in bytes. + """ + byteSize: Int! + + """ + A base64 MD5 digest of the file. + """ + checksum: String! + + """ + Content type of the file. + """ + contentType: CsvFileContent! + + """ + The name of the file. + """ + filename: String! +} + +""" +HTTP header for a signed upload request. +""" +type OrganizationUserImportUploadHeader { + """ + Header name. + """ + name: String! + + """ + Header value. + """ + value: String! +} + +interface OrganizationUserInterface { + """ + Returns a summary of the user's access permissions. + """ + accessSummary: AccessSummary + admin: Boolean! + administrativePermissions: [String!] + + """ + Returns all aggregated role assignments for the user. + """ + aggregatedRoleAssignments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AccessAggregatedRoleAssignmentConnection + + """ + Returns all groups that can be assigned to the user. + """ + assignableGroups( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GroupConnection + collaboratorAccess: CollaboratorAccessStatus + + """ + A summary of collaborator relationship access for the user. + """ + collaboratorRelationshipAccessSummary: CollaboratorRelationshipAccessSummary + createdAt: ISO8601DateTime! + createdBy: OrganizationUser + email: String! + generatePinForShop(length: Int, shopifyShopId: PropertyPublicID!): String + + """ + Returns a list of groups assigned to the user. + """ + groups( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GroupConnection! + id: GlobalID! + isPinEasyToGuessForShop(pin: String!, shopifyShopId: PropertyPublicID!): EasyToGuessPinResponse + migratableToRbacByRequester: Boolean! + + """ + Organization-wide access conditions applied to the user. + """ + organizationAccessConditions: [String!]! + organizationPermissions: [String!]! + partnerPermissions: [String!] + privateData: PrivateData! + queryComplexity: Int! + queryDepth: Int! + rbacBannerCode: String + + """ + Returns a list of retail accesses for the user. + """ + retailAccesses( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): RetailAccessConnection! + role: Role + + """ + Returns a list of roles assigned to the user. + """ + roles( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AccessRoleConnection! + samlEnforcementState: UserSamlEnforcementState! + shopAccessDetailsByShopifyShopId(shopifyShopId: PropertyPublicID!): UserShopAccessDetails + + """ + Returns a list of Roles in alphabetical order. + """ + shopsAssignedFromRole( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + roleId: AccessRoleID! + ): ShopConnection! + status: OrganizationUserStatus! + + """ + A summary of current store access for the user (legacy or RBAC). + """ + storeAccessSummary: StoreAccessSummary + tfaEnforced: Boolean! + useRbacAccess: Boolean! + verifiedOrganizationDomain: Boolean! + wasSubAdmin: Boolean! +} + +""" +The connection type for OrganizationUserInterface. +""" +type OrganizationUserInterfaceConnection { + """ + A list of edges. + """ + edges: [OrganizationUserInterfaceEdge!]! + + """ + A list of nodes. + """ + nodes: [OrganizationUserInterface!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type OrganizationUserInterfaceEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: OrganizationUserInterface! +} + +input OrganizationUserProvisionShopAccessInput { + """ + The shop to provision the requester on. + """ + shopifyShopId: PropertyPublicID! +} + +type OrganizationUserProvisionShopAccessResult { + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Sort options for users queries. +""" +enum OrganizationUserSort { + """ + Sort by email ascending. + """ + EMAIL_ASC + + """ + Sort by email descending. + """ + EMAIL_DESC + + """ + Sort by first name ascending. + """ + FIRST_NAME_ASC + + """ + Sort by first name descending. + """ + FIRST_NAME_DESC + + """ + Sort by last name ascending. + """ + LAST_NAME_ASC + + """ + Sort by last name descending. + """ + LAST_NAME_DESC + + """ + Sort by status ascending. + """ + STATUS_ASC + + """ + Sort by status descending. + """ + STATUS_DESC +} + +enum OrganizationUserStatus { + """ + The user is active. + """ + ACTIVE + + """ + The user is inactive. + """ + INACTIVE + + """ + The user has a pending invitation. + """ + INVITED + + """ + The user is pending deletion. + """ + PENDING_DELETION + + """ + The user is suspended. + """ + SUSPENDED +} + +input OrganizationUserUpdateInput { + """ + The array of IDs of the groups to add the user to. + """ + groupIdsToAdd: [GroupID!] + + """ + The array of IDs of the groups to remove the user from. + """ + groupIdsToRemove: [GroupID!] + + """ + The location assignments to create for the retail user. + """ + locationAssignments: [LocationAssignmentsInput!] + + """ + The ID of the user to update. + """ + organizationUserId: OrganizationUserID + + """ + The pins of the user to be created. + """ + pins: [PinInput!] + + """ + The array of role assignments to create or update for the user. + """ + roleAssignmentsToUpdate: [RoleAssignmentInput!] + + """ + The array of IDs of the roles to fully unassign from the user. + """ + rolesToUnassign: [AccessRoleID!] + + """ + Whether or not SAML should be enforced for the OrganizationUser. + """ + samlEnforced: Boolean + + """ + Whether or not TFA should be enforced for the OrganizationUser. + """ + tfaEnforced: Boolean +} + +type OrganizationUserUpdateResult { + organizationUser: OrganizationUserInterface + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input OrganizationUsersBulkGroupAssignInput { + """ + The array of organization user IDs to assign the group to. + """ + organizationUserIds: [OrganizationUserID!]! + + """ + The group to assign to the users. + """ + userGroupId: GroupID! +} + +input OrganizationUsersBulkRoleAssignInput { + """ + The array of organization user IDs to assign the role to. + """ + organizationUserIds: [OrganizationUserID!]! + + """ + The role assignments to create the users. + """ + roleAssignmentToCreate: RoleAssignmentInput! +} + +""" +The user attributes to create a staff member. +""" +input OrganizationUsersCreateAttributesInput { + """ + The email of the user to be created. + """ + email: String! + + """ + The pins of the user to be created. + """ + pins: [PinInput!] +} + +input OrganizationUsersCreateInput { + """ + The emails of the users to be invited / created. + """ + emails: [String!]! + + """ + The array of IDs of the groups to add the user to. + """ + groupIds: [GroupID!] + + """ + The location assignments to create for the retail user. + """ + locationAssignments: [LocationAssignmentsInput!] + + """ + The array of role assignments to create or update for the user. + """ + roleAssignments: [RoleAssignmentInput!] + + """ + Whether or not TFA should be enforced for the OrganizationUser. + """ + tfaEnforced: Boolean + + """ + The staff member attributes to create for the user. + """ + userAttributes: [OrganizationUsersCreateAttributesInput!] +} + +type OrganizationUsersCreateResult { + """ + The emails of the invited users. + """ + emails: [String!] + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type OrganizationUsersDeleteResult { + organizationUserIds: [OrganizationUserID!] + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + Whether all users were deleted immediately. If false, one or more users will be deleted asynchronously. + """ + synchronouslyDeleted: Boolean! + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input OrganizationUsersUpdateStatusInput { + """ + True to reactivate users, false to suspend them. + """ + active: Boolean! + + """ + The IDs of the users. + """ + organizationUserIds: [OrganizationUserID!]! +} + +""" +Information about pagination in a connection. +""" +type PageInfo { + """ + When paginating forwards, the cursor to continue. + """ + endCursor: String + + """ + When paginating forwards, are there more items? + """ + hasNextPage: Boolean! + + """ + When paginating backwards, are there more items? + """ + hasPreviousPage: Boolean! + + """ + When paginating backwards, the cursor to continue. + """ + startCursor: String +} + +input PartnerOrganizationCreateInput { + """ + Organization name + """ + name: String! + + """ + Email of the organization owner. + """ + ownerEmail: String! + + """ + Identity UUID of the organization owner. + """ + ownerUuid: String! +} + +enum PartnerOrganizationsShopPropertiesBackfill { + CREATE_COMPLETED_PROPERTY_TRANSFER_REQUEST + CREATE_DELETED_PROPERTY_TRANSFER_REQUEST + REASSIGN_SHOP_PROPERTY +} + +""" +A summary of the permissions for a partner role. +""" +type PartnerRoleSummary { + permissions: [AccessRolePermission!] +} + +input PartnersMigrationEnableRbacInput { + organizationId: OrganizationID! +} + +input PartnersMigrationMigrateUsersInput { + deleteExistingAssignments: Boolean = false + organizationId: OrganizationID! + userAssignments: [PartnersMigrationUserAssignmentInput!]! +} + +input PartnersMigrationRoleAssignmentInput { + category: String! + permissions: JSON + roleHandle: String + shopifyShopIds: [ShopifyShopID!] + storeAccessType: String! +} + +input PartnersMigrationUserAssignmentInput { + roleAssignments: [PartnersMigrationRoleAssignmentInput!]! + userId: OrganizationUserID! +} + +""" +The types of payment methods +""" +enum PaymentMethodOption { + """ + Bank account payment method. + """ + bank_account + + """ + Credit card payment method. + """ + credit_card + + """ + Payment happens outside of the billing system. + """ + manual + + """ + PayPal payment method. + """ + paypal + + """ + SEPA direct debit payment method. + """ + sepa_direct_debit + + """ + Shopify Balance Account payment method. + """ + shopify_balance_account + + """ + Shopify Balance Card payment method. + """ + shopify_balance_card + + """ + UPI account payment method. + """ + upi +} + +""" +A summary of the permissions for a user or group. +""" +type PermissionsSummary { + customRolesPresence: Boolean + organizationRoles: OrganizationRoleSummary + partnerRoles: PartnerRoleSummary + storeRoles: StoreRoleSummary + systemRolesPresence: Boolean +} + +type Person implements Node { + addresses( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + countryCode: CountryCode + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): AddressConnection + aliases: [PersonAlias!] + dateOfBirth: ISO8601Date + firstName: String + fullName: String + + """ + Returns a GovernmentIdentifier by the specified ID. + """ + governmentIdentifier(id: GovernmentIdentifierID!): GovernmentIdentifier + governmentIdentifiers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): GovernmentIdentifierConnection + + """ + The ID for an object. + """ + id: GlobalID! + lastName: String + middleName: String + nameVariants: [NameVariant!] + nationalities: [PersonNationality!] + prefix: String + principals: [Principal!] + queryComplexity: Int! + queryDepth: Int! + suffix: String + supportingDocuments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): SupportingDocumentConnection + user: PrivateData +} + +type PersonAlias implements Node { + aliasVariants: [NameVariant!] + firstName: String + fullName: String + + """ + The ID for an object. + """ + id: GlobalID! + lastName: String + middleName: String + person: Person! + prefix: String + queryComplexity: Int! + queryDepth: Int! + suffix: String +} + +""" +The ID for a PersonAlias. +""" +scalar PersonAliasID + +type PersonAliasResult { + personAlias: PersonAlias + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +The connection type for Person. +""" +type PersonConnection { + """ + A list of edges. + """ + edges: [PersonEdge!]! + + """ + A list of nodes. + """ + nodes: [Person!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type PersonEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Person! +} + +""" +Filter fields for people. +""" +enum PersonFilterField { + """ + Filter by address city. + """ + ADDRESS_CITY + + """ + Filter by address country code. + """ + ADDRESS_COUNTRY_CODE + + """ + Filter by address postal code. + """ + ADDRESS_POSTAL_CODE + + """ + Filter by address state or region. + """ + ADDRESS_STATE_OR_REGION + + """ + Filter by date of birth. + """ + DATE_OF_BIRTH + + """ + Filter by principal email. + """ + EMAIL + + """ + Filter by first name (includes aliases). + """ + FIRST_NAME + + """ + Filter by last name (includes aliases). + """ + LAST_NAME + + """ + Filter by nationality country code. + """ + NATIONALITY + + """ + Filter by principal phone number. + """ + PHONE +} + +""" +Filter for people. +""" +input PersonFilterInput { + field: PersonFilterField! + operator: PersonFilterOperator! + value: String! +} + +""" +Operators for filtering people. +""" +enum PersonFilterOperator { + """ + Contains operator. + """ + CONTAINS + + """ + Equals operator. + """ + EQUALS + + """ + Starts with operator. + """ + STARTS_WITH +} + +""" +The ID for a Person. +""" +scalar PersonID + +""" +Input describing a person being added to an organization, to check for existing conflicts. +""" +input PersonMatchInput { + """ + Date of birth of the person. Null is treated as a wildcard during matching. + """ + dateOfBirth: ISO8601Date + + """ + First name of the person. + """ + firstName: String! + + """ + Government identifiers supplied for the person. May be empty. + """ + governmentIdentifiers: [EntityMatchGovIdInput!] + + """ + Last name of the person. + """ + lastName: String! +} + +type PersonNationality implements Node { + countryCode: CountryCode! + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! +} + +type PersonResult { + person: Person + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input PinInput { + """ + The PIN to access the POS App of the retail only organization user. + """ + pin: String! + + """ + The Shopify shop ID to assign the PIN to, i.e. 'gid://organization/ShopifyShop/10'. + """ + shopifyShopId: PropertyPublicID! +} + +input PlusRoleRemoveStoreAccessInput { + """ + The ID of the Role to update. + """ + id: RoleID! + + """ + The array of Shopify shop IDs of shops to remove access to on the plus role. + """ + shopifyShopIds: [PropertyPublicID!]! +} + +input PosPinInput { + """ + The PIN to access the POS App of the retail only organization user. + """ + posPin: String! + + """ + The Shopify shop ID to assign the PIN to, i.e. 'gid://organization/ShopifyShop/10'. + """ + shopifyShopId: ID! +} + +type PosPinValidatorResult { + """ + Check if a POS pin is easy to guess + """ + easyToGuess: Boolean + + """ + Whether the POS PIN is valid. + """ + success: Boolean! + + """ + The collection of errors. + """ + userErrors: [UserError!] + + """ + Reasons why the PIN is easy to guess. + """ + violations: [String!] +} + +type PosPinViolations { + """ + Check if a POS pin is easy to guess + """ + easyToGuess: Boolean! + + """ + An array of reasons why the PIN is easy to guess. + """ + violations: [String!]! +} + +type Principal implements Node { + """ + Returns the address associated with this principal + """ + address: Address + email: String + equityOwnership: Float + + """ + The ID for an object. + """ + id: GlobalID! + jobTitle: String + legalEntity: LegalEntity! + person: Person! + phoneNumber: String + queryComplexity: Int! + queryDepth: Int! + roles: [PrincipalRoleTypeEnum!] +} + +""" +The connection type for Principal. +""" +type PrincipalConnection { + """ + A list of edges. + """ + edges: [PrincipalEdge!]! + + """ + A list of nodes. + """ + nodes: [Principal!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +input PrincipalContactInformationInput { + """ + The email associated with the principal. + """ + email: String + + """ + The phone number associated with the principal. + """ + phoneNumber: String +} + +""" +An edge in a connection. +""" +type PrincipalEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Principal! +} + +""" +The ID for a Principal. +""" +scalar PrincipalID + +enum PrincipalRoleTypeEnum { + ACCOUNT_REPRESENTATIVE + AUTHORIZER + DIRECTOR + EQUITY_OWNER + EXECUTIVE +} + +""" +Sort options for principals queries. +""" +enum PrincipalSortField { + """ + Sort by equity ownership ascending. + """ + EQUITY_ASC + + """ + Sort by equity ownership descending. + """ + EQUITY_DESC + + """ + Sort by job title ascending. + """ + JOB_TITLE_ASC + + """ + Sort by job title descending. + """ + JOB_TITLE_DESC + + """ + Sort by name ascending. + """ + NAME_ASC + + """ + Sort by name descending. + """ + NAME_DESC +} + +type PrivateData implements Node { + accountType: AccountTypeOfUser! + avatarUrl: URL + email: String + familyName: String + fullName: String + givenName: String + + """ + The ID for an object. + """ + id: GlobalID! + identityUuid: ID + locale: String + phoneNumber: String + queryComplexity: Int! + queryDepth: Int! +} + +type Property implements PropertyInterface { + """ + Property public identifier. + """ + externalId: PropertyPublicID + + """ + Property global identifier. + """ + id: PropertyId! + + """ + The offering for this property. + """ + offering: Offering + + """ + The organization this property belongs to. + """ + organization: Organization + queryComplexity: Int! + queryDepth: Int! +} + +""" +The ID for a Property. +""" +scalar PropertyID + +scalar PropertyId + +interface PropertyInterface { + """ + Property public identifier. + """ + externalId: PropertyPublicID + + """ + Property global identifier. + """ + id: PropertyId! + + """ + The offering for this property. + """ + offering: Offering + + """ + The organization this property belongs to. + """ + organization: Organization + queryComplexity: Int! + queryDepth: Int! +} + +""" +The connection type for PropertyInterface. +""" +type PropertyInterfaceConnection { + """ + A list of edges. + """ + edges: [PropertyInterfaceEdge!]! + + """ + A list of nodes. + """ + nodes: [PropertyInterface!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type PropertyInterfaceEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: PropertyInterface! +} + +scalar PropertyPublicID + +type PropertyResult { + """ + Mutated property. + """ + property: Property + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +enum PropertyTransfer { + AFFILIATE_TRANSFER + EXTERNAL + INTERNAL + PARTNER_HANDOFF + VIBE_TRANSFER +} + +""" +The ID for a PropertyTransferRequest. +""" +scalar PropertyTransferRequestID + +input ProvisionCollaboratorAccessInput { + """ + The ID of the shop to provision collaborator access for. + """ + shopifyShopId: PropertyPublicID! +} + +type ProvisionCollaboratorAccessResult { + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + Errors that occurred while provisioning collaborator access. + """ + userErrors: [UserError!] +} + +""" +The input fields for updating an organization user, this input comes from the shopify proxy. +""" +input ProxyOrganizationUserUpdateInput { + """ + Flag to enable the initialization of the POS (Point of Sale) authorization + check, replacing the default authorization method. + """ + enableInitializePosCheck: Boolean = false + + """ + The locations input to update a retail user locations. + """ + locationAssignments: ProxyRetailOnlyOrganizationLocationAssignmentsInput + + """ + The PIN to access the POS App of the retail only shop user. + """ + posPin: String + + """ + The Shopify User GID of the user who requested the action. + """ + requesterShopifyUserId: ID! + + """ + The role ids to update for the retail user. + """ + roleAssignments: [AccessRoleID!] + + """ + The Shopify User GID of the User to update. + """ + shopifyUserId: ID! +} + +""" +The result of updating an organization user, this result responds to a request from the shopify proxy. +""" +type ProxyOrganizationUserUpdateResult { + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +The input fields used to determine which locations a retail user has access to. +""" +input ProxyRetailOnlyOrganizationLocationAssignmentsInput { + """ + Whether the retail user should have access to all locations. + """ + allLocationsAccess: Boolean = false + + """ + The locations to add to the retail user i.e. ['gid://shopify/Location/11']. + """ + shopifyLocationIdsToAdd: [ID!] + + """ + The locations to remove from the retail user i.e. ['gid://shopify/Location/12']. + """ + shopifyLocationIdsToRemove: [ID!] +} + +""" +The user attributes to create a retail user. +""" +input ProxyRetailOnlyOrganizationUserCreateAttributesInput { + """ + The email of the user to be created. + """ + email: String + + """ + The first name of the user to be created. + """ + firstName: String! + + """ + The last name of the user to be created. + """ + lastName: String! + + """ + The phone number of the user to be created. + """ + phoneNumber: String + + """ + The PIN to access the POS App of the retail only shop user. + """ + posPin: String! +} + +""" +The input fields for creating a retail only organization user, this input comes from the shopify proxy. +""" +input ProxyRetailOnlyOrganizationUserCreateInput { + """ + Flag to enable the initialization of the POS (Point of Sale) authorization + check, replacing the default authorization method. + """ + enableInitializePosCheck: Boolean = false + + """ + The locations input to assign a retail user locations. + """ + locationsAssignments: ProxyRetailOnlyOrganizationLocationAssignmentsInput! + + """ + The Shopify User GID of the user who requested the action. + """ + requesterShopifyUserId: ID! + + """ + The role ids to create for the retail user. + """ + roleAssignments: [AccessRoleID!] + + """ + The Shopify shop GID. + """ + shopifyShopId: ID! + + """ + Specifies the input fields to create a retail user. + """ + userAttributes: ProxyRetailOnlyOrganizationUserCreateAttributesInput! +} + +""" +The result of creating a retail only organization user, this result responds to a request from the shopify proxy. +""" +type ProxyRetailOnlyOrganizationUserCreateResult { + """ + The Shopify User GID of the created ShopUser + """ + shopifyUserId: ID + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +The input fields for updating a retail only organization user, this input comes from the shopify proxy. +""" +input ProxyRetailOnlyOrganizationUserUpdateInput { + """ + The email of the retail only organization user. + """ + email: String + + """ + Flag to enable the initialization of the POS (Point of Sale) authorization + check, replacing the default authorization method. + """ + enableInitializePosCheck: Boolean = false + + """ + The first name of the retail only organization user. + """ + firstName: String + + """ + The last name of the retail only organization user. + """ + lastName: String + + """ + The locations input to update a retail user locations. + """ + locationAssignments: ProxyRetailOnlyOrganizationLocationAssignmentsInput + + """ + The phone number of the retail only organization user. + """ + phoneNumber: String + + """ + The PIN to access the POS App of the retail only shop user. + """ + posPin: String + + """ + The Shopify User GID of the user who requested the action. + """ + requesterShopifyUserId: ID! + + """ + The role ids to update for the retail user. + """ + roleAssignments: [AccessRoleID!] + + """ + The Shopify User GID of the User to update. + """ + shopifyUserId: ID! +} + +""" +The result of updating a retail only organization user, this result responds to a request from the shopify proxy. +""" +type ProxyRetailOnlyOrganizationUserUpdateResult { + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +The input object for deleting a retail only user from the organization's shop, this input comes from the shopify proxy. +""" +input ProxyRetailOnlyShopUserDeleteInput { + """ + Flag to enable the initialization of the POS (Point of Sale) authorization + check, replacing the default authorization method. + """ + enableInitializePosCheck: Boolean = false + + """ + The Shopify User GID of the user who requested the action. + """ + requesterShopifyUserId: ID! + + """ + The Shopify User GID of the User to delete. + """ + shopifyUserId: ID! +} + +""" +The result of deleting a retail only user from the organization's shop, this +result responds to a request from the shopify proxy. +""" +type ProxyRetailOnlyShopUserDeleteResult { + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type Query { + """ + Returns the apps for the given shopify app gids. + """ + apps(ids: [String!]!): [ShopApp!]! + + """ + Auto-generated POS pin for all of the shops in organization. + """ + autogeneratedPosPinForOrganization(posPinLength: Int): GeneratePosPinResult! + + """ + Auto-generated POS pin for a shop. + """ + autogeneratedPosPinForShop(posPinLength: Int, shopifyShopId: PropertyPublicID!): GeneratePosPinResult! + + """ + Returns collaborator access requirements for a partner on a shop. + """ + collaboratorAccessRequirements(organizationId: OrganizationID!, shopifyShopId: PropertyPublicID!): CollaboratorAccessRequirements! + + """ + Returns metadata for a specific document purpose, including required fields. + Returns null if no metadata exists for the purpose. Jurisdiction-specific + overrides take precedence over global defaults. + """ + documentPurposeMetadata(countryCode: CountryCodeWithDefault!, entityType: ApplicableEntityType!, purpose: DocumentPurpose!): DocumentPurposeMetadata + + """ + Returns metadata for all document purposes for a given jurisdiction and entity + type. Jurisdiction-specific overrides take precedence over global defaults. + """ + documentPurposeMetadataList(countryCode: CountryCodeWithDefault!, entityType: ApplicableEntityType!): [DocumentPurposeMetadata!]! + + """ + Returns entity supporting document types for the given country code and + category. Optionally filter by purpose. When purpose is not provided, all + document types for the given country and category are returned. + """ + entitySupportingDocumentTypes(category: Category!, countryCode: CountryCodeWithDefault!, purpose: DocumentPurpose): [SupportingDocumentType!]! + + """ + Returns the government identifier type with the given handle. + """ + governmentIdentifierType(handle: String!): GovernmentIdentifierType + + """ + Returns all government identifier types for the given country code and identifier category. + """ + governmentIdentifierTypesByCountryCode(countryCode: CountryCode!, identifierCategory: String): [GovernmentIdentifierType!]! + + """ + Checks whether a user (identified by identity UUID) has collaborator store + access on a shop, via a collaborator account (identified by shop user ID). + Returns null if the Business Platform cannot determine the result. + """ + hasCollaboratorPermission( + """ + The shop user ID of the collaborator account. + """ + collaboratorUserId: ID! + + """ + The identity UUID of the user requesting access. + """ + identityUuid: ID! + ): CollaboratorPermissionResult + + """ + Returns the legal entity type with the given handle. + """ + legalEntityType(handle: String!): LegalEntityType + + """ + Returns all legal entity types for the given country code and jurisdictions. + """ + legalEntityTypesByCountryCode(countryCode: CountryCode!, jurisdictions: [String!]): [LegalEntityType!]! + + """ + Returns the organization with the given identifier. + """ + organization(organizationId: OrganizationID): Organization + + """ + Returns all the organizations for the requesting property provider + """ + organizations( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): OrganizationConnection! + + """ + Returns Partner Orgs belonging to the IDs passed in + """ + partnerOrganizations(organizationIds: [OrganizationID!]!): [Organization!]! + + """ + Check the POS pin is valid + """ + posPinValidator(posPin: String!, shopifyShopId: PropertyPublicID!): PosPinValidatorResult! + + """ + Check the POS pin for violations + """ + posPinViolations(posPin: String!): PosPinViolations! + + """ + Returns true if the bearer token is privileged. + """ + privilegedActionCheck: Boolean! + + """ + Returns the property with the given identifier. + """ + property(externalId: PropertyPublicID!, offeringHandle: String!): PropertyInterface + + """ + Check the retail employee identifier is valid + """ + retailEmployeeIdentifierValidator(employeeIdentifier: String!): RetailEmployeeIdentifierValidatorResult! + + """ + Returns Partner Orgs that match the requesting search term. + """ + searchPartnerOrganizations(searchTerm: String!): [Organization!]! + + """ + Returns the shop details for the given shop ids, used for billing invoice details + """ + shopDetails(shopifyShopIds: [PropertyPublicID!]!): [ShopDetails!]! + + """ + Indicates whether a subdomain is available for a new shop. + """ + shopSubdomainAvailable(subdomain: String!): Boolean + + """ + Validate whether a shop is ready for a Vibe transfer. + """ + validateVibeTransferReadiness(shopId: PropertyPublicID!): ValidateVibeTransferReadinessResult! +} + +input RemoveOrganizationUserRoleInput { + """ + The ID of the Organization User who is removed a Role. + """ + organizationUserId: OrganizationUserID! +} + +type RemoveOrganizationUserRoleResult { + """ + The organization user with the removed role. + """ + organizationUser: OrganizationUser + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type RemoveShopAccessResult { + """ + ID of the mutated organization user. + """ + organizationUserId: OrganizationUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input RemoveShopFromNonPlusOrganizationInput { + """ + The ID of the shop to be removed from the non-plus organization. + """ + shopifyShopId: PropertyPublicID! +} + +type RemoveShopFromNonPlusOrganizationResult { + """ + The original organization that the store has now been removed from. + """ + organization: Organization + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input RequestCollaborationInput { + """ + Access code for requesting collaborator access. + """ + collaboratorAccessCode: String + + """ + Message included with collaborator access request. + """ + message: String + + """ + Collaborator permissions to request. + """ + permissions: [String!]! + + """ + The ID of the shop to request collaborator access for. + """ + shopifyShopId: PropertyPublicID! +} + +type RequestCollaborationResult { + """ + The collaborator relationship associated with the request. + """ + collaboratorRelationship: CollaboratorRelationship + + """ + Errors that occurred while requesting collaborator access. + """ + userErrors: [UserError!] +} + +""" +A field that must be visible on a supporting document +""" +type RequiredField { + """ + An example value for this field + """ + example: String + + """ + The field identifier (e.g., 'legal_name', 'date_of_birth', 'address') + """ + field: String! + + """ + The localized display label for this field + """ + label: String! +} + +type RerequestCollaboratorRelationshipResult { + """ + The collaborator relationship that was re-requested. + """ + collaboratorRelationship: CollaboratorRelationship + + """ + Errors that occurred while re-requesting the collaborator relationship. + """ + userErrors: [UserError!] +} + +type Reseller { + contactLink: String! + + """ + Discount rate percentage for the reseller + """ + discountRate: Decimal! + id: ID! + name: String! + organizationId: ID! + + """ + Revenue sharing percentage for the reseller + """ + revenueShare: Decimal! +} + +type ResellerRelationship { + activationLink: String + annualResoldPrice: Decimal + annualRevenue: Decimal + countryCode: String! + createdAt: ISO8601DateTime! + id: ID! + isTransferred: Boolean! + legalBusinessName: String + merchantEmail: String! + merchantPurchaseOrderNumber: String + monthlyResoldPrice: Money + organizationId: ID! + originalPlanPrice: Decimal + planCurrency: String + planName: String! + posProLocationsCount: Int! + + """ + The reseller associated with this relationship. + """ + reseller: Reseller + resellerPurchaseOrderNumber: String + resellerRemittancePrice: Decimal + shopifyShopId: ID! + status: ResellerRelationshipStatus! + supportedPlanName: ResellerRelationshipSupportedPlans + termLengthInMonths: Int + transferredAt: ISO8601DateTime +} + +enum ResellerRelationshipStatus { + """ + The reseller relationship has ended. + """ + ENDED + + """ + The associated store is in development. + """ + IN_DEVELOPMENT + + """ + The associated store has been transferred. + """ + TRANSFERRED + + """ + The associated store is pending transfer. + """ + TRANSFER_PENDING +} + +enum ResellerRelationshipSupportedPlans { + """ + The advanced plan. + """ + ADVANCED + + """ + The basic plan. + """ + BASIC + + """ + The grow plan. + """ + GROW + + """ + The professional plan. + """ + PROFESSIONAL + + """ + The unlimited plan. + """ + UNLIMITED +} + +type ResellerRelationshipUpdateResultField { + activationLink: String + annualResoldPrice: Decimal + annualRevenue: Decimal + countryCode: String! + id: ID! + isTransferred: Boolean! + legalBusinessName: String + merchantEmail: String! + merchantPurchaseOrderNumber: String + monthlyResoldPrice: Money + organizationId: ID! + originalPlanPrice: Decimal + planCurrency: String + planName: String! + posProLocationsCount: Int! + resellerPurchaseOrderNumber: String + resellerRemittancePrice: Decimal + shopId: ID! + termLengthInMonths: Int +} + +type ResellerRelationshipWithShop { + activationLink: String + annualResoldPrice: Decimal + annualRevenue: Decimal + countryCode: String! + createdAt: ISO8601DateTime! + id: ID! + isTransferred: Boolean! + legalBusinessName: String + merchantEmail: String! + merchantPurchaseOrderNumber: String + monthlyResoldPrice: Money + organizationId: ID! + originalPlanPrice: Decimal + planCurrency: String + planName: String! + posProLocationsCount: Int! + resellerPurchaseOrderNumber: String + resellerRemittancePrice: Decimal + shopName: String! + shopifyShopId: ID! + status: ResellerRelationshipStatus! + transferredAt: ISO8601DateTime +} + +""" +The connection type for ResellerRelationshipWithShop. +""" +type ResellerRelationshipWithShopConnection { + """ + A list of edges. + """ + edges: [ResellerRelationshipWithShopEdge!]! + + """ + A list of nodes. + """ + nodes: [ResellerRelationshipWithShop!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type ResellerRelationshipWithShopEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ResellerRelationshipWithShop! +} + +input ResetOrganizationUserTfaInput { + """ + The ID of the OrganizationUser to reset TFA enforcement. + """ + organizationUserId: OrganizationUserID! +} + +type ResetOrganizationUserTfaResult { + """ + The organization user with reset TFA enforcement. + """ + organizationUser: OrganizationUser + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Result of a legal entity match check: a verdict plus any matched legal entities. +""" +type ResolveLegalEntityMatchPayload { + """ + Matched legal entities. Empty for NO_MATCH; one for CONFIRMED_MATCH; one or + more for DISAMBIGUATION_CANDIDATES and MATCH_CONFLICT. + """ + legalEntities: [LegalEntity!]! + + """ + How the matcher classified the input against existing legal entities. + """ + verdict: EntityMatchVerdict! +} + +""" +Result of a person match check: a verdict plus any matched people. +""" +type ResolvePersonMatchPayload { + """ + Matched people. Empty for NO_MATCH; one for CONFIRMED_MATCH; one or more for DISAMBIGUATION_CANDIDATES and MATCH_CONFLICT. + """ + people: [Person!]! + + """ + How the matcher classified the input against existing records. + """ + verdict: EntityMatchVerdict! +} + +type ResyncUserDataAfterPartnerHandoffResult { + """ + Id of the shop that had data re-synced. + """ + shopId: ShopifyShopID +} + +""" +A retail access for a organization user. +""" +type RetailAccess { + """ + Whether the user has access to all locations. + """ + allLocationsAccess: Boolean! + + """ + Whether the user is currently logged in. + """ + currentlyLoggedIn: Boolean! + + """ + The employee identifier for the retail access. + """ + employeeIdentifier: String + + """ + Whether the user has POS access. + """ + hasPosAccess: Boolean! + + """ + The ID of the retail access. + """ + id: String! + + """ + Whether the user can initialize POS. + """ + initializePos: Boolean! + + """ + The location assignments for the retail access. + """ + locationAssignments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): RetailLocationAssignmentsConnection! + + """ + The ID of the organization user. + """ + organizationUserId: String! + + """ + The POS pin for the shop. + """ + posPin: String + + """ + The shop. + """ + shop: Shop! +} + +""" +The connection type for RetailAccess. +""" +type RetailAccessConnection { + """ + A list of edges. + """ + edges: [RetailAccessEdge!]! + + """ + A list of nodes. + """ + nodes: [RetailAccess!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type RetailAccessEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: RetailAccess! +} + +type RetailConfig { + posChannelInstalled: Boolean! + roleSelectionEnabled: Boolean! +} + +type RetailData { + canInitializePos: Boolean! + posAccess: Boolean! + retailRole: RetailRole +} + +type RetailEmployeeIdentifierValidatorResult { + """ + Whether the POS PIN is valid. + """ + success: Boolean! + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type RetailLocation { + """ + The location address + """ + address: RetailLocationAddress! + + """ + The location name + """ + name: String! + + """ + The location id + """ + shopifyLocationId: ID! +} + +type RetailLocationAddress { + """ + The formatted address + """ + formatted: [String!] +} + +type RetailLocationAssignments { + """ + The ID of the retail location assignment. + """ + id: String! + + """ + The Shopify location ID. + """ + shopifyLocationId: String! +} + +""" +The connection type for RetailLocationAssignments. +""" +type RetailLocationAssignmentsConnection { + """ + A list of edges. + """ + edges: [RetailLocationAssignmentsEdge!]! + + """ + A list of nodes. + """ + nodes: [RetailLocationAssignments!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type RetailLocationAssignmentsEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: RetailLocationAssignments! +} + +""" +Available plans for retail locations +""" +enum RetailLocationPlan { + """ + Locations that have the Lite Plan. + """ + LITE + + """ + Locations that have the Pro Plan. + """ + PRO + + """ + Locations that have the Pro Plan until the end of the trial. + """ + TRIAL +} + +type RetailLocationsResult { + """ + The cursor + """ + cursor: String! + + """ + The retail locations + """ + locations: [RetailLocation!]! + + """ + The page info + """ + pageInfo: PageInfo! + + """ + The total count + """ + totalCount: Int! +} + +""" +The input fields used to update a retail only organization user. +""" +input RetailOnlyOrganizationUserUpdateInput { + """ + List of group_ids to add the retail only organization user to. + """ + groupIdsToAdd: [GroupID!] + + """ + List of group_ids to remove the retail only organization user from. + """ + groupIdsToRemove: [GroupID!] + + """ + The location assignments to create for the retail user. + """ + locationAssignments: [RetailUserLocationAssignmentsInput!] + + """ + The ID of the organization user to update. + """ + organizationUserId: OrganizationUserID! + + """ + List of role assignments to update or create to the retail only organization user. + """ + roleAssignmentsToUpdate: [RoleAssignmentInput!] + + """ + List of roles_ids to unassign from the retail only organization user. + """ + rolesToUnassign: [AccessRoleID!] + + """ + The user attributes to update. + """ + userAttributes: RetailOnlyOrganizationUserUpdateUserAttributesInput +} + +type RetailOnlyOrganizationUserUpdateResult { + """ + The updated organization user. + """ + organizationUser: OrganizationUserInterface + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +The user attributes to update a retail user. +""" +input RetailOnlyOrganizationUserUpdateUserAttributesInput { + """ + The email of the user to be updated. + """ + email: String + + """ + The first name of the user to be updated. + """ + firstName: String + + """ + The last name of the user to be updated. + """ + lastName: String + + """ + The phone number of the user to be updated. + """ + phoneNumber: String + + """ + The pos pins of the user to be updated. + """ + posPins: [PosPinInput!] +} + +""" +The input fields used to create a retail user. +""" +input RetailOnlyOrganizationUsersCreateInput { + """ + The array of IDs of the groups to add the user to. + """ + groupIds: [GroupID!] + + """ + The location assignments to create for the retail user. + """ + locationAssignments: [RetailUserLocationAssignmentsInput!] + + """ + The role assignments to create for the retail user. + """ + roleAssignments: [RoleAssignmentInput!] + + """ + The users attributes to create. + """ + usersAttributes: [RetailOnlyUserAttributesInput!]! +} + +type RetailOnlyOrganizationUsersCreateResult { + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] + + """ + The data of the added users. + """ + usersDetails: [RetailUserDetailsResult!] +} + +""" +The user attributes to create a retail user. +""" +input RetailOnlyUserAttributesInput { + """ + The email of the user to be created. + """ + email: String + + """ + The first name of the user to be created. + """ + firstName: String! + + """ + The last name of the user to be created. + """ + lastName: String! + + """ + The phone number of the user to be created. + """ + phoneNumber: String + + """ + The pos pins of the user to be created. + """ + posPins: [PosPinInput!]! +} + +type RetailRole { + """ + Whether the role is the shop's default role. + """ + default: Boolean! + id: ID! + + """ + Kind for the retail role. + """ + kind: RetailRoleKind! + + """ + The name of the retail role. + """ + name: String! + + """ + Permission settings for the retail role. + """ + retailRolePermissions: [RetailRolePermission!]! +} + +enum RetailRoleKind { + """ + Account owner kind. + """ + ACCOUNT_OWNER + + """ + Full permissions kind. + """ + FULL_PERMISSIONS + + """ + Limited permissions kind. + """ + LIMITED_PERMISSIONS + + """ + POS user kind. + """ + POS_USER +} + +type RetailRolePermission { + access: String! + retailPermissionTag: String! +} + +""" +A shop with retail/POS-specific data for user management purposes +""" +type RetailShop { + """ + The name of the shop + """ + name: String! + + """ + Get the Retail specific data for the current shop. + """ + retailData: ShopRetailData! + + """ + Get the retail pro locations for the current shop + """ + retailLocations(after: String, before: String, first: Int, last: Int, plan: RetailLocationPlan, shopifyLocationIds: [ID!], shopifyUserId: ID): RetailLocationsResult! + + """ + The ID of the shop in Shopify + """ + shopifyShopId: ID! +} + +type RetailUserDetailsResult { + """ + The email of the created user. + """ + email: String + + """ + The first name of the created user. + """ + firstName: String + + """ + The last name of the created user. + """ + lastName: String + + """ + The IDs of the created organization users. + """ + organizationUserIds: [OrganizationUserID!] + + """ + The phone number of the created user. + """ + phoneNumber: String +} + +""" +The input fields used to determine which locations a retail user has access to. +""" +input RetailUserLocationAssignmentsInput { + """ + Whether the retail user should have access to all locations. + """ + allLocationsAccess: Boolean = false + + """ + The locations to add to the retail user, i.e. ['gid://shopify/Location/11']. + """ + shopifyLocationIdsToAdd: [ID!] + + """ + The locations to remove from the retail user, i.e. ['gid://shopify/Location/12']. + """ + shopifyLocationIdsToRemove: [ID!] + + """ + The shopify shop id to assign locations to, i.e. 'gid://organization/ShopifyShop/10'. + """ + shopifyShopId: ID! +} + +type Role implements Node { + administrativePermissions: [String!]! + + """ + The ID for an object. + """ + id: GlobalID! + name: String! + queryComplexity: Int! + queryDepth: Int! + shopRoles( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ShopRoleConnection! + usersCount: Int! +} + +input RoleAssignmentInput { + """ + The ID of the role to change. + """ + roleId: AccessRoleID! + + """ + The array of Shopify shop IDs to assign the role to. + """ + shopIdsToAssign: [PropertyPublicID!] + + """ + The array of Shopify shop IDs to unassign the role from. + """ + shopIdsToUnassign: [PropertyPublicID!] + targetType: AccessRoleAssignmentTarget! +} + +""" +The connection type for Role. +""" +type RoleConnection { + """ + A list of edges. + """ + edges: [RoleEdge!]! + + """ + A list of nodes. + """ + nodes: [Role!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type RoleEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Role! +} + +""" +Represents a single filter option for access roles queries. +""" +input RoleFilterInput { + field: AccessRoleFilterField! + operator: AccessRoleFilterOperator! + value: String! +} + +""" +The ID for a Role. +""" +scalar RoleID + +""" +Sort options for role queries. +""" +enum RoleSort { + """ + Sort by category ascending. + """ + CATEGORY_ASC + + """ + Sort by category descending. + """ + CATEGORY_DESC + + """ + Sort by name ascending. + """ + NAME_ASC + + """ + Sort by name descending. + """ + NAME_DESC +} + +""" +The result of deleting roles. +""" +type RolesDeleteResult { + """ + The deleted role id. + """ + deletedIds: [AccessRoleID!] + + """ + Indicates whether the mutation was successful. + """ + success: Boolean + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type SamlConfiguration implements Node { + """ + The ID for an object. + """ + id: GlobalID! + idpCertificate: String + idpCertificateFingerprint: String + idpEntityId: String + idpMetadataUrl: String! + idpSsoTargetUrl: String + queryComplexity: Int! + queryDepth: Int! +} + +""" +Scopes for the requester's ability to manage role assignments across stores. +""" +type ScopesForManagingRoleAssignments { + canAssignRolesToAllCollaboratorStores: Boolean! + canAssignRolesToAllOwnedStores: Boolean! + canAssignRolesToAllOwnedStoresForGroups: Boolean! +} + +input SetOrganizationShopBillingAccountIdInput { + """ + The ID of the billing account to set. + """ + billingAccountId: Int! + + """ + The GID of the shop to update. + """ + shopifyShopId: ShopifyShopID! +} + +type SetOrganizationShopBillingAccountIdResult { + """ + The shop that was updated. + """ + shop: Shop + + """ + The collection of user errors. + """ + userErrors: [UserError!] +} + +type SetShopTestDriveStatusResult { + success: Boolean! +} + +input SetupSamlIntegrationInput { + """ + The SAML configuration metadata URL. + """ + idpMetadataUrl: String! +} + +type SetupSamlIntegrationResult { + """ + The organization object. + """ + organization: Organization + + """ + List of user errors of setup integration operation. + """ + userErrors: [UserError!] +} + +type Shop implements PropertyInterface { + apps( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ShopAppConnection + + """ + The billing account ID for the shop + """ + billingAccountId: String + + """ + The currency the shop is billed in + """ + billingCurrency: String + + """ + Check if the current user can access the shop. + """ + canCurrentUserAccess: Boolean! + + """ + Check if the shop can be transferred to a new owner outside of the requester's current organization. + """ + canTransferExternally: Boolean! + + """ + Check if the shop can be transferred to an existing organization owned by the requester. + """ + canTransferInternally: Boolean! + channels( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): ShopChannelConnection + + """ + The client transfer request for this shop, if one exists. + """ + clientTransferRequest: ClientTransferRequest + + """ + The collaborator relationship for the current organization (if this is a collaborator shop) + """ + collaboratorRelationship: CollaboratorRelationship + + """ + The date and time the shop was created + """ + createdAt: ISO8601DateTime! + + """ + The active developer preview handle for the shop + """ + developerPreviewHandle: String + + """ + Property public identifier. + """ + externalId: PropertyPublicID + + """ + A pending transfer exists. + """ + hasPendingTransfer: Boolean + + """ + Property global identifier. + """ + id: PropertyId! + identificationSettings: ShopIdentificationSettings! + isMainShop: Boolean! + + """ + Whether the shop can rollback from Markets Home + """ + marketsHomeRollbackCompatible: MarketsHomeRollbackCompatibleResult! + + """ + Whether the shop is ready to rollout Markets Home + """ + marketsHomeRolloutCompatible: MarketsHomeRolloutCompatibleResult! + name: String! + + """ + The offering for this property. + """ + offering: Offering + + """ + The organization this property belongs to. + """ + organization: Organization + ownerDetails: PrivateData + + """ + Returns pending transfer if one exists. + """ + pendingExternalTransfer: ExternalShopTransferRequest + + """ + The name of the shop's plan. + """ + planName: String + + """ + The variant name of the shop's plan + """ + planVariantName: String + primaryDomain: String + queryComplexity: Int! + queryDepth: Int! + + """ + The reseller relationship for the shop + """ + resellerRelationship: ResellerRelationship + + """ + Get the Retail specific data for the current shop. + """ + retailData: ShopRetailData! + + """ + Get the retail pro locations for the current shop + """ + retailLocations(after: String, before: String, first: Int, last: Int, plan: RetailLocationPlan, shopifyLocationIds: [ID!], shopifyUserId: ID): RetailLocationsResult! + + """ + The ID of the shop in Shopify + """ + shopifyShopId: ID + shortName: String + status: ShopPropertyStatus! + storeAdditionRequest: StoreAdditionRequest + storeType: Store + testDriveStatus(handle: String!): TestDriveShopStatus! + themes: [ShopTheme!] + + """ + Whether the shop is a transferrable client store + """ + transferrableClientStore: Boolean! + url: URL + + """ + The user limits for the shop. + """ + userLimits: UserLimits! + usersCount: Int! +} + +type ShopAccess { + accessConditions: [String!] + accessLevel: ShopUserAccessLevel! + appPermissions: [String!] + collaborator: Boolean! + collaboratorTeamMember: Boolean! + + """ + Returns all permissions that can be managed by the current user for this shop access. + """ + editablePermissions: [String!] + hasPosAccess: Boolean! + hasPosAccessEnforced: Boolean! + initializePosEnforced: Boolean! + permissions: [String!] + shopProperty: PropertyInterface! + shopifyUserId: String + status: ShopUserStatus! +} + +""" +The connection type for ShopAccess. +""" +type ShopAccessConnection { + """ + A list of edges. + """ + edges: [ShopAccessEdge!]! + + """ + A list of nodes. + """ + nodes: [ShopAccess!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type ShopAccessEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ShopAccess! +} + +input ShopAccessInput { + """ + List of access conditions. + """ + accessConditions: [String!] + + """ + List of Shopify app id's to permit access i.e. ["gid://shopify/App/123123"] + """ + appPermissions: [ID!] + + """ + Whether this role grants POS access to the shop. + """ + hasPosAccess: Boolean + + """ + Whether this role grants the ability to initialize POS. + """ + initializePos: Boolean + + """ + List of shop permissions. + """ + permissions: [String!] + shopifyShopId: PropertyPublicID! +} + +type ShopApp implements Node { + handle: String + iconUrl: String + + """ + The ID for an object. + """ + id: GlobalID! + name: String + queryComplexity: Int! + queryDepth: Int! + shopifyGid: ID! +} + +""" +The connection type for ShopApp. +""" +type ShopAppConnection { + """ + A list of edges. + """ + edges: [ShopAppEdge!]! + + """ + A list of nodes. + """ + nodes: [ShopApp!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type ShopAppEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ShopApp! +} + +type ShopChannel implements Node { + iconUrl: String + + """ + The ID for an object. + """ + id: GlobalID! + name: String + queryComplexity: Int! + queryDepth: Int! + shopifyGid: ID! +} + +""" +The connection type for ShopChannel. +""" +type ShopChannelConnection { + """ + A list of edges. + """ + edges: [ShopChannelEdge!]! + + """ + A list of nodes. + """ + nodes: [ShopChannel!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type ShopChannelEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ShopChannel! +} + +""" +The connection type for Shop. +""" +type ShopConnection { + """ + A list of edges. + """ + edges: [ShopEdge!]! + + """ + A list of nodes. + """ + nodes: [Shop!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +type ShopDetails { + """ + The name of the shop. + """ + name: String! + + """ + The primary domain of the shop. + """ + primaryDomain: String + + """ + The ID of the shop in Shopify. + """ + shopifyShopId: ID! +} + +""" +An edge in a connection. +""" +type ShopEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: Shop! +} + +""" +Field options for filtering shop queries. +""" +enum ShopFilterField { + """ + The phase of the client transfer process. Requires + `store_type=client_transfer`. Values: `in_development`, `pending`, `completed`. + """ + CLIENT_TRANSFER_PHASE + + """ + The status of the collaborator relationship. Requires + `store_type=collaborator`. Values: `active`, `access_pending`, `expired`. + """ + COLLABORATOR_RELATIONSHIP_STATUS + + """ + The GID of the counterpart organization. Requires `store_type=client_transfer` or `store_type=collaborator`. + """ + COUNTERPART_ORGANIZATION_ID + + """ + The GID of the owning organization of the shop. + """ + OWNER_ORGANIZATION_ID + + """ + The plan of the shop. Values: `basic`, `grow`, `plus`, `frozen`, `advanced`, + `inactive`, `cancelled`, `client_transfer`, `plus_client_transfer`, + `development_legacy`, `custom`, `fraudulent`, `staff`, `trial`, + `plus_development`, `retail`, `shop_pay_commerce_components`, `non_profit`. + With the `In` operator, use raw plan names (e.g. "professional,shopify_plus"). + """ + SHOP_PLAN + + """ + The active/inactive status of the shop. Values: `active`, `inactive`. + """ + STORE_STATUS + + """ + The type of the shop. Does not support the `In` operator. Values: + `development`, `production`, `app_development`, `development_superset`, + `client_transfer`, `collaborator`. + """ + STORE_TYPE +} + +""" +Represents a single filter option for shop queries. When using the `In` +operator, pass a comma-separated string of values (e.g. "value1,value2"). +Maximum 20 values. +""" +input ShopFilterInput { + field: ShopFilterField! + operator: Operator! + value: String! +} + +""" +The ID for a Shop. +""" +scalar ShopID + +type ShopIdentificationSettings { + code: String! + internalName: String! + logoImageUrl: String +} + +type ShopIdentificationSettingsDuplicationCheck { + code: ShopIdentificationSettingsErrorCode! + field: [String!]! + message: String! +} + +enum ShopIdentificationSettingsErrorCode { + """ + A matching code already exists within the orgnanization. + """ + DUPLICATE_CODE + + """ + A matching internal name already exists within the organization. + """ + DUPLICATE_INTERNAL_NAME +} + +type ShopIdentificationSettingsUpdateResult { + """ + Mutated shopify shop id. + """ + shopifyShopId: ShopifyShopID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Field options for filtering shop property queries. +""" +enum ShopPropertyFilterField { + """ + The active/inactive status of the shop. + """ + STORE_STATUS + + """ + The type of the shop. + """ + STORE_TYPE + + """ + The test drive handle which is active. + """ + TEST_DRIVE_HANDLE_IS_ACTIVE + + """ + The test drive handle which is is inactive. + """ + TEST_DRIVE_HANDLE_IS_INACTIVE +} + +""" +Represents a single filter option for shop property queries. +""" +input ShopPropertyFilterInput { + field: ShopPropertyFilterField! + operator: Operator! + value: String! +} + +""" +Sort options for shop property queries. +""" +enum ShopPropertySort { + """ + Sort by shop name ascending. + """ + NAME_ASC + + """ + Sort by shop name descending. + """ + NAME_DESC +} + +enum ShopPropertyStatus { + ACTIVE + INACTIVE +} + +type ShopRetailData { + hasPosProSubscription: Boolean! +} + +type ShopRole implements Node { + accessConditions: [String!] + appPermissions: [String!] + hasPosAccess: Boolean + + """ + The ID for an object. + """ + id: GlobalID! + initializePos: Boolean + permissions: [String!] + queryComplexity: Int! + queryDepth: Int! + shop: Shop! +} + +""" +The connection type for ShopRole. +""" +type ShopRoleConnection { + """ + A list of edges. + """ + edges: [ShopRoleEdge!]! + + """ + A list of nodes. + """ + nodes: [ShopRole!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type ShopRoleEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ShopRole! +} + +""" +Sort options for accessible shop queries. +""" +enum ShopSort { + """ + Sort by client transfer phase ascending (in_development, pending, completed). + """ + CLIENT_TRANSFER_PHASE_ASC + + """ + Sort by client transfer phase descending (completed, pending, in_development). + """ + CLIENT_TRANSFER_PHASE_DESC + + """ + Sort by collaborator approved at ascending. + """ + COLLABORATOR_APPROVED_AT_ASC + + """ + Sort by collaborator approved at descending. + """ + COLLABORATOR_APPROVED_AT_DESC + + """ + Sort by collaborator relationship status ascending (pending, active, expired). + """ + COLLABORATOR_RELATIONSHIP_STATUS_ASC + + """ + Sort by collaborator relationship status descending (expired, active, pending). + """ + COLLABORATOR_RELATIONSHIP_STATUS_DESC + + """ + Sort by developer preview handle ascending. + """ + DEVELOPER_PREVIEW_HANDLE_ASC + + """ + Sort by developer preview handle descending. + """ + DEVELOPER_PREVIEW_HANDLE_DESC + + """ + Sort by store name ascending. + """ + NAME_ASC + + """ + Sort by store name descending. + """ + NAME_DESC + + """ + Sort by plan name ascending. + """ + PLAN_NAME_ASC + + """ + Sort by plan name descending. + """ + PLAN_NAME_DESC + + """ + Sort by shop created at ascending. + """ + SHOP_CREATED_AT_ASC + + """ + Sort by shop created at descending. + """ + SHOP_CREATED_AT_DESC + + """ + Sort by shop organization name ascending. + """ + SHOP_ORGANIZATION_NAME_ASC + + """ + Sort by shop organization name descending. + """ + SHOP_ORGANIZATION_NAME_DESC + + """ + Sort by shop plan active status ascending (active first). + """ + SHOP_PLAN_ACTIVE_STATUS_ASC + + """ + Sort by shop plan active status descending (inactive first). + """ + SHOP_PLAN_ACTIVE_STATUS_DESC + + """ + Sort by transfer target organization name ascending. + """ + TRANSFER_TARGET_ORGANIZATION_NAME_ASC + + """ + Sort by transfer target organization name descending. + """ + TRANSFER_TARGET_ORGANIZATION_NAME_DESC +} + +type ShopTheme { + isCurrentTheme: Boolean + name: String! + shopifyThemeId: String! + shopifyUpdatedAt: String! +} + +enum ShopUserAccessLevel { + """ + The shop user is the owner of the shop. + """ + ACCOUNT_OWNER + + """ + The shop user has full access. + """ + FULL_ACCESS + + """ + The shop user has limited access. + """ + LIMITED_ACCESS + + """ + The shop user has no access. + """ + NO_ACCESS + + """ + The shop user has POS access. + """ + POS_ACCESS +} + +enum ShopUserStatus { + """ + The shop user is active. + """ + ACTIVE + + """ + The shop user is pending. + """ + PENDING + + """ + The shop user is inactive. + """ + SUSPENDED +} + +type ShopifyShop { + retailConfig: RetailConfig + retailRoles: [RetailRole!] +} + +""" +The ID for a ShopifyShop. +""" +scalar ShopifyShopID + +type StaffMember { + authorizedApplications: [AuthorizedApplication!] + bio: String + hasDefaultName: Boolean + hasPin: Boolean! + id: ID! + initials: [String!] + phone: String + posEligible: Boolean + receiveAnnouncements: Boolean + recentAdminBrowserSessions: [AdminBrowserSession!] + retailData: RetailData + shopifyShop: ShopifyShop + url: String +} + +input StageOrganizationUserImportCsvUploadInput { + """ + Metadata for the CSV file to be uploaded. + """ + fileMetadata: OrganizationUserImportFileMetadataInput! +} + +type StageOrganizationUserImportCsvUploadResult { + directUploadParams: OrganizationUserImportDirectUploadParams + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input StageSupportingDocumentUploadInput { + """ + The attachments to be uploaded. + """ + attachments: [FileAttachmentInput!]! + + """ + The country code of the entity the document is applicable to. + """ + countryCode: CountryCode + + """ + The specific type of localized document being uploaded. + """ + documentType: Document! + + """ + The name of the document. + """ + name: String + + """ + The entity the document is applicable to. Optional to support pre-staging documents before entity creation. + """ + supportedEntityId: SupportedEntityId +} + +type StageSupportingDocumentUploadResult { + directUploadParams: [DirectUploadParams!] + supportingDocument: SupportingDocument + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +enum Store { + APP_DEVELOPMENT + CLIENT_TRANSFER + COLLABORATOR + DEVELOPMENT + DEVELOPMENT_SUPERSET + PRODUCTION +} + +""" +A summary of current store access for the user. +""" +type StoreAccessSummary { + """ + Shop ids of the shop user has access to collectively. + """ + shopifyShopIds: [ShopifyShopID!] +} + +type StoreAdditionRequest implements Node { + """ + The ID for an object. + """ + id: GlobalID! + owner: PrivateData! + queryComplexity: Int! + queryDepth: Int! + shopProperty: PropertyInterface + shopifyShopExists: Boolean! + shortName: String + status: StoreAdditionRequestStatus! + storeCopyRequest: StoreCopyRequest + storeDomain: String + storeName: String! + storeType: Store +} + +""" +The connection type for StoreAdditionRequest. +""" +type StoreAdditionRequestConnection { + """ + A list of edges. + """ + edges: [StoreAdditionRequestEdge!]! + + """ + A list of nodes. + """ + nodes: [StoreAdditionRequest!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type StoreAdditionRequestEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: StoreAdditionRequest! +} + +""" +The ID for a StoreAdditionRequest. +""" +scalar StoreAdditionRequestID + +""" +Sort options for store addition requests. +""" +enum StoreAdditionRequestSort { + """ + Sort by shop name ascending. + """ + NAME_ASC + + """ + Sort by shop name descending. + """ + NAME_DESC +} + +enum StoreAdditionRequestStatus { + APPROVED + PENDING + REJECTED +} + +type StoreCopyChoice implements Node { + choiceType: String! + completedObjectCount: Int + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! + totalObjectCount: Int + value: String! +} + +""" +The connection type for StoreCopyChoice. +""" +type StoreCopyChoiceConnection { + """ + A list of edges. + """ + edges: [StoreCopyChoiceEdge!]! + + """ + A list of nodes. + """ + nodes: [StoreCopyChoice!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type StoreCopyChoiceEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: StoreCopyChoice! +} + +input StoreCopyCreationInput { + """ + Whether files should be copied to the new store. + """ + fileCopyingSelected: Boolean + + """ + Whether merchandising data should be copied to the new store. + """ + merchandisingDataCopyingSelected: Boolean + + """ + The source Shopify shop ID from which to copy data. + """ + sourceShopifyShopId: PropertyPublicID! + + """ + The theme IDs to copy from the source shop. + """ + themesToCopy: [String!] +} + +type StoreCopyRequest implements Node { + choices( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): StoreCopyChoiceConnection! + completedAt: ISO8601DateTime + + """ + The ID for an object. + """ + id: GlobalID! + queryComplexity: Int! + queryDepth: Int! + sourceShopProperty: PropertyInterface! + status: StoreCopyRequestStatus! +} + +enum StoreCopyRequestStatus { + """ + The store copy failed. + """ + FAILED + + """ + The store copy is currently in progress. + """ + IN_PROGRESS + + """ + The store copy has not started yet. + """ + PENDING + + """ + The store copy succeeded. + """ + SUCCEEDED +} + +input StoreCreatePayloadExtraInput { + """ + The Ironclad contract ID to associate with the shop at signup time. + """ + contractId: String + + """ + The app selected by the merchant during signup. + """ + selectedApp: String + + """ + The domain selected by the merchant during signup. + """ + selectedDomain: String + + """ + The plan selected by the merchant during signup. + """ + selectedPlan: String + + """ + The theme selected by the merchant during signup. + """ + selectedTheme: String +} + +input StoreCreatePayloadInput { + """ + The primary street address of the merchant where they signed up. + """ + address1: String + + """ + The secondary street address of the merchant where they signed up. + """ + address2: String + + """ + The city of the merchant where they signed up. + """ + city: String + + """ + Extra parameters associated with the store creation. + """ + extra: StoreCreatePayloadExtraInput + + """ + The number of stores owned by the user. Used for generating unique store names. + """ + ownedStoreCount: Int + + """ + The state/province/region of the merchant where they signed up. + """ + province: String + + """ + The signup types associated with the store creation. + """ + signupTypes: [String!] + + """ + Tracking information associated with the store creation. + """ + trackingInformation: StoreCreatePayloadTrackingInformationInput + + """ + The postal code of the merchant where they signed up. + """ + zip: String +} + +input StoreCreatePayloadShopConversionParamsInput { + """ + Multitrack token - unique cookie for unauthenticated sites like shopify.com + """ + _y: String + + """ + To support Shopify GO during Signup, each Shopify GO promotional program has a code to identify itself. + """ + promotionalProgramCode: String + + """ + Partners distribute this promo code to their qualifying merchants under Shopify Go promotional programs. + """ + promotionalProgramPromoCode: String + ref: String + + """ + Essential token - unique cookie for unauthenticated sites like shopify.com + """ + shopifyEssential: String + + """ + The compliance zone of the merchant during the signup. + """ + signupComplianceZone: String + + """ + The consent state of the merchant during the signup. + """ + signupConsentAnalytics: Boolean + + """ + The consent state of the merchant during the signup. + """ + signupConsentMarketing: Boolean + + """ + Signup flow started on this page. + """ + signupPage: String + + """ + Page view before signup_page. + """ + signupPageReferer: String + + """ + A unique ID to link a shop with the Signup Questionnaire (SQ) or Commerce + Questionnaire (CQ) while the shop is being created. + """ + signupSessionId: String + signupSource: String + source: String + + """ + First brochure page viewed. + """ + sourceUrl: String + sourceUrlReferer: String + + """ + SSID of source or ref. + """ + ssid: String + + """ + Analytics info for merchant marketing. + """ + utmz: String +} + +input StoreCreatePayloadTrackingInformationInput { + """ + The shop conversion tracking parameters. + """ + shopConversionParams: StoreCreatePayloadShopConversionParamsInput +} + +type StoreCreation { + shopifyPermanentDomain: String + status: StoreCreationStatus! +} + +enum StoreCreationStatus { + AWAITING_CORE_STORE_READY + CALLING_CORE + COMPLETE + FAILED + FINALIZING + TIMED_OUT + USER_ERROR +} + +input StoreIdentifierInput @oneOf { + """ + Permanent domain of a shop to lookup. + """ + domain: String + + """ + ID of a store to lookup. + """ + id: ShopID +} + +""" +A summary of the permissions for a store role. +""" +type StoreRoleSummary { + accessConditions: [String!] + permissions: [AccessRolePermission!] + pointOfSaleAccess: AccessPointOfSaleAccess + recordPermissions: [AccessRoleRecordPermission!] + shopifyShopIds: [ShopifyShopID!] +} + +type StoresList { + remainingCount: Int! + selectedStores: [Shop!] + stores: [String!]! @deprecated(reason: "Use `selectedStores` instead.") +} + +scalar SupportedEntityId + +type SupportingDocument implements Node { + """ + Returns the URL of the supporting document attachment by the specified ID. + """ + attachmentUrl(id: DocumentAttachmentID!): URL + attachments( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): DocumentAttachmentConnection + countryCode: CountryCodeWithDefault! + + """ + OCR-extracted field data from this document. + """ + documentFields( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): DocumentFieldConnection! + documentType: Document! @deprecated(reason: "Use the 'supporting_document_type' field instead") + + """ + The ID for an object. + """ + id: GlobalID! + name: String + queryComplexity: Int! + queryDepth: Int! + supportingDocumentType: SupportingDocumentType! +} + +input SupportingDocumentAttachmentInput { + """ + The entity the document is applicable to. + """ + directUploadToken: String! + + """ + The linked attachment id as part of the supporting document + """ + documentAttachmentId: DocumentAttachmentID! +} + +""" +The connection type for SupportingDocument. +""" +type SupportingDocumentConnection { + """ + A list of edges. + """ + edges: [SupportingDocumentEdge!]! + + """ + A list of nodes. + """ + nodes: [SupportingDocument!]! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + +""" +An edge in a connection. +""" +type SupportingDocumentEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: SupportingDocument! +} + +""" +The ID for a SupportingDocument. +""" +scalar SupportingDocumentID + +enum SupportingDocumentPagesTypeEnum { + MULTI_PAGE + SINGLE_SIDED + TWO_SIDED +} + +type SupportingDocumentType { + """ + Whether multiple documents of this type can be associated (e.g., licenses from different states). + """ + allowsMultiple: Boolean + countryCode: CountryCodeWithDefault! + governmentIssued: Boolean + handle: Document! + hasPhoto: Boolean + hasSignature: Boolean + name: String! + nativeName: String + pages: SupportingDocumentPagesTypeEnum! + + """ + The purposes for this document type (e.g., proof of identity, proof of address). + """ + purposes: [DocumentPurpose!]! + + """ + The field handles representing data physically present on this document (e.g., name, date_of_birth). + """ + schema: [String!] +} + +type SyncShopTestDriveStatusResult { + success: Boolean! +} + +type Tag { + """ + Tag handle + """ + handle: String! + + """ + Tag name + """ + name: String! +} + +input TestDriveBulkUpdateInput { + """ + The handle for the test drive that is being updated. + """ + handle: String! + + """ + The mapping of a shop to its desired state for the test drive. + """ + shopStatus: [TestDriveShopStatusInput!] +} + +type TestDriveBulkUpdateResult { + """ + The affected shopify shop ids. + """ + shopifyShopIds: [ShopifyShopID!] + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type TestDriveFeature { + autoEnableForFutureShops: Boolean! + + """ + The date and time when the feature will be automatically released. + """ + autoReleaseDate: ISO8601DateTime! + changelogUrl: URL + description: String! + editionsUrl: URL + endDate: ISO8601DateTime! + handle: String! + helpdocsUrl: URL + limitationsUrl: URL + name: String! + shopCount(storeType: Store): TestDriveShopCount! + startDate: ISO8601DateTime! + supportDocumentUrl: URL +} + +type TestDriveShopCount { + activeShops: Int! + totalShops: Int! +} + +enum TestDriveShopStatus { + ACTIVATING + ACTIVE + DEACTIVATING + INACTIVE +} + +input TestDriveShopStatusInput { + """ + The ID of the shop. + """ + shopifyShopId: PropertyPublicID! + + """ + The desired state of the shop for the test drive. + """ + status: TestDriveShopStatus! +} + +enum TfaEnforcement { + """ + TFA enforcement is fully enforced. + """ + fully_enforced + + """ + TFA enforcement is in progress. + """ + in_progress + + """ + TFA enforcement is manually enforced. + """ + manually_enforced +} + +input ToggleTestDriveForAllShopsInput { + """ + Whether all existing shops in an organization will be opted into a test drive feature. + """ + active: Boolean! + + """ + The handle of the target test drive feature. + """ + handle: String! + + """ + The store type that will be impacted by the change. + """ + storeType: Store +} + +type ToggleTestDriveForAllShopsResult { + """ + The affected shopify shop ids. + """ + shopifyShopIds: [ShopifyShopID!] + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +An RFC 3986 and RFC 3987 compliant URI string. +""" +scalar URL + +input UpdateAddressInput { + """ + The first line of the address. Typically the street address or PO Box number. + """ + addressLine1: String + + """ + The second line of the address. Typically the number of the apartment, suite, or unit. + """ + addressLine2: String + + """ + The address variants. + """ + addressVariants: [AddressVariantInput!] + + """ + The name of the city, district, village, or town. + """ + city: String + + """ + The id of the address to update. + """ + id: AddressID + + """ + The zip or postal code of the address. + """ + postalCode: String + + """ + The code for the region of the address. + """ + stateOrProvince: String +} + +""" +Inputs for updating government identifiers. +""" +input UpdateGovernmentIdentifierInput { + """ + The country code of the GovernmentIdentifier. + """ + countryCode: CountryCode! + + """ + The ID of the GovernmentIdentifier to update. + """ + id: GovernmentIdentifierID! + + """ + The type of the GovernmentIdentifier. + """ + identifierType: GovernmentIdentifierTypeInput! + + """ + The value of the GovernmentIdentifier. + """ + value: String! +} + +input UpdateLegacyPartnerUserPermissionsInput { + """ + The ID of the Partner business user. + """ + businessUserId: BusinessUserID! + + """ + The permissions to disable for the Partner business user. + """ + propertyProvidersToDisable: [String!]! + + """ + The permissions to enable for the Partner business user. + """ + propertyProvidersToEnable: [String!]! +} + +type UpdateLegacyPartnerUserPermissionsResult { + """ + The ID of the updated business user. + """ + businessUserId: BusinessUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input UpdateLegalEntityInput { + """ + The updated address attributes. The country code is immutable. + """ + address: UpdateAddressInput + + """ + The category of the entity. + """ + category: ValidLegalEntityCategoryInput + id: LegalEntityID! + + """ + The individual attributes when specifying an individual entity. + """ + individual: IndividualInput + + """ + Whether the entity is registered. + """ + isRegistered: Boolean + + """ + The specific type of legal entity. + """ + legalEntityType: LegalEntityTypeInput + + """ + The legal name of the entity. + """ + legalName: String + + """ + The nickname of the entity. + """ + nickname: String + + """ + The phone number associated with the entity. + """ + phoneNumber: String + + """ + The trade name of the entity. + """ + tradeName: String @deprecated(reason: "Trade name is deprecated from Legal Entity scope and will be replaced with a shop scope field.") +} + +input UpdateOrganizationTfaEnforcementInput { + """ + The state of TFA enforcement. + """ + tfaEnforcement: String! +} + +type UpdateOrganizationTfaEnforcementResult { + """ + The organization with updated TFA enforcement. + """ + organization: Organization + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type UpdateOrganizationUserAccessResult { + """ + The organization user IDs which were updated successfully. + """ + organizationUserIds: [OrganizationUserID!] + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input UpdateOrganizationUserInput { + """ + List of updated administrative permissions. + """ + administrativePermissions: [String!] + + """ + The ID of the OrganizationUser to update. + """ + organizationUserId: OrganizationUserID! + + """ + The updated shop access. + """ + shopAccess: ShopAccessInput + + """ + Whether or not TFA is enforced for the OrganizationUser. + """ + tfaEnforced: Boolean +} + +type UpdateOrganizationUserResult { + """ + ID of the mutated organization user. + """ + organizationUserId: OrganizationUserID + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input UpdateOrganizationUserRoleInput { + """ + The ID of the Organization User who is assigned a Role. + """ + organizationUserId: OrganizationUserID! + + """ + The ID of the Role to assign. + """ + roleId: RoleID! +} + +type UpdateOrganizationUserRoleResult { + """ + The organization user with the updated role. + """ + organizationUser: OrganizationUser + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input UpdatePartnerOrganizationInput { + """ + Organization name + """ + name: String! + + """ + Organization ID. + """ + organizationId: OrganizationID! +} + +input UpdatePersonAliasInput { + """ + The alias variants of the person alias. + """ + aliasVariants: [NameVariantInput!] + + """ + The first name of the person alias. + """ + firstName: String + + """ + The ID of the person alias to update. + """ + id: PersonAliasID! + + """ + The last name of the person alias. + """ + lastName: String + + """ + The middle name of the person alias. + """ + middleName: String + + """ + The prefix of the person alias. + """ + prefix: String + + """ + The suffix of the person alias. + """ + suffix: String +} + +input UpdatePersonInput { + """ + The address of the person. + """ + address: AddressInput @deprecated(reason: "Use the `updateAddress` field instead.") + + """ + The date of birth of the person. + """ + dateOfBirth: ISO8601Date + + """ + The email associated with the person. + """ + email: String + + """ + The first name of the person. + """ + firstName: String + + """ + The id of the person. + """ + id: PersonID! + + """ + The last name of the person. + """ + lastName: String + + """ + The middle name of the person. + """ + middleName: String + + """ + The name variants of the person. If not provided, name variants are unchanged. + If provided as an empty array, all name variants are removed. + If provided with items, all name variants are replaced with the provided ones. + """ + nameVariants: [NameVariantInput!] + + """ + The nationalities of the person. + """ + nationalities: [CountryCode!] + + """ + The phone number associated with the person. + """ + phoneNumber: String + + """ + The prefix of the person. + """ + prefix: String + + """ + The suffix of the person. + """ + suffix: String + + """ + The address of the person. + """ + updateAddress: AssignOrCreateAddressInput +} + +input UpdatePrincipalInput { + """ + The address associated with the principal. + """ + applicableAddress: AssignOrCreateAddressInput + + """ + The attributes that relate to a person within the context of a business category entity. + """ + businessAttributes: BusinessPrincipalInput + + """ + The contact information associated with the principal. + """ + contactInformation: PrincipalContactInformationInput + + """ + The ID of the principal to update. + """ + id: PrincipalID! +} + +type UpdatePrincipalResult { + principal: Principal + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +input UpdateResellerRelationshipInput { + """ + The activation link for the merchant to accept the store transfer. + """ + activationLink: String + + """ + The annual resold price (required for Plus). + """ + annualResoldPrice: Decimal + + """ + The annual revenue (required for Plus). + """ + annualRevenue: Decimal + + """ + The country code. + """ + countryCode: String + + """ + Whether the relationship has been transferred to the client. + """ + isTransferred: Boolean + + """ + The legal business name (required for Plus). + """ + legalBusinessName: String + + """ + The merchant email address. + """ + merchantEmail: String + + """ + The original price of the plan. + """ + originalPlanPrice: Decimal + + """ + The currency of the plan. + """ + planCurrency: String + + """ + The name of the plan. + """ + planName: String + + """ + The number of POS Pro locations. + """ + posProLocationsCount: Int + + """ + The ID of the reseller relationship to update. + """ + resellerRelationshipId: String! + + """ + The reseller remittance price. + """ + resellerRemittancePrice: Decimal + + """ + The term length in months (required for Plus). + """ + termLengthInMonths: Int +} + +type UpdateResellerRelationshipResult { + """ + The reseller relationship that was updated. + """ + resellerRelationship: ResellerRelationshipUpdateResultField + + """ + Errors that occurred while updating the reseller relationship. + """ + userErrors: [UserError!] +} + +input UpdateRoleInput { + """ + List of updated administrative permissions. + """ + administrativePermissions: [String!] + + """ + The ID of the Role to update. + """ + id: RoleID! + + """ + The updated name of the role. + """ + name: String! + + """ + List of updated shop accesses. + """ + shopAccess: [ShopAccessInput!] +} + +type UpdateRoleResult { + """ + The updated role. + """ + role: Role + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type UpdateSamlCertificateResult { + """ + The organization object. + """ + organization: Organization + + """ + List of user errors of update certificate operation. + """ + userErrors: [UserError!] +} + +input UpdateShopAccessProfileInput { + bio: String + canInitializePos: Boolean + + """ + The ID of the OrganizationUser whose shop access is to be updated. + """ + organizationUserId: OrganizationUserID! + + """ + The user's POS PIN for the shop. + """ + pin: String + posAccess: Boolean + posAccessEnforced: Boolean + receiveAnnouncements: Boolean + retailRoleId: ID + + """ + The ID of the shop. + """ + shopifyShopId: PropertyPublicID! + url: String +} + +type UpdateShopAccessProfileResult { + """ + ID of the mutated organization user. + """ + organizationUserId: OrganizationUserID! + + """ + ID of the updated shop access. + """ + shopifyShopId: ShopifyShopID! + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +""" +Headers of a signed file upload request. +""" +type UploadHeader { + """ + Header name. + """ + name: String! + + """ + Header value. + """ + value: String! +} + +""" +Input for upserting a government identifier +""" +input UpsertGovernmentIdentifierInput { + """ + The country code for this identifier. Required when creating a new identifier. + """ + countryCode: CountryCode + + """ + The ID of the government identifier to update. If not provided, a new identifier will be created. + """ + id: GovernmentIdentifierID + + """ + The type of government identifier. + """ + identifierType: GovernmentIdentifierTypeInput + + """ + Whether to set this government identifier as the tax filing preference for the + legal entity. Only one government identifier can be marked as the tax filing + preference at a time. + """ + taxFilingPreference: Boolean + + """ + The value of the government identifier. + """ + value: String +} + +""" +Input for upserting a legal entity with all related entities +""" +input UpsertLegalEntityInput { + """ + The address of the entity. + """ + address: AssignOrCreateAddressInput + + """ + The category of the entity (BUSINESS, INDIVIDUAL, or UNSPECIFIED). + """ + category: ValidLegalEntityCategoryInput + + """ + The country where the entity is registered. Required for create, immutable on update. + """ + countryCode: CountryCode + + """ + IDs of government identifiers to delete. + """ + deletedGovernmentIdentifierIds: [GovernmentIdentifierID!] + + """ + IDs of principals to delete. + """ + deletedPrincipalIds: [PrincipalID!] + + """ + IDs of supporting documents to delete. + """ + deletedSupportingDocumentIds: [SupportingDocumentID!] + + """ + Government identifiers for the legal entity (business types only). + """ + governmentIdentifiers: [UpsertGovernmentIdentifierInput!] + + """ + The ID of the legal entity to update. If not provided, a new entity will be created. + """ + id: LegalEntityID + + """ + The specific type of legal entity. Required for BUSINESS category. + """ + legalEntityType: LegalEntityTypeInput + + """ + The legal name of the entity. + """ + legalName: String @deprecated(reason: "Use registered_business_name instead.") + + """ + Legal name variants by alphabet (e.g. kana/kanji for Japan). Supplying an empty list clears all variants on the entity. + """ + legalNameVariants: [LegalNameVariantInput!] + + """ + The nickname of the entity. + """ + nickname: String + + """ + The phone number associated with the entity. + """ + phoneNumber: String + + """ + Principals linked to the legal entity, each with a person. + """ + principals: [UpsertPrincipalInput!] + + """ + The registered business name of the entity. + """ + registeredBusinessName: String + + """ + IDs of pre-staged supporting documents to link to this legal entity. + """ + supportingDocumentIds: [SupportingDocumentID!] +} + +""" +Input for upserting a person alias +""" +input UpsertPersonAliasInput { + """ + Name variants for the alias (e.g., kanji/kana for Japan). + """ + aliasVariants: [NameVariantInput!] + + """ + The first name for the alias. + """ + firstName: String + + """ + The ID of the person alias to update. If not provided, a new alias will be created. + """ + id: PersonAliasID + + """ + The last name for the alias. + """ + lastName: String + + """ + The middle name for the alias. + """ + middleName: String + + """ + The name prefix for the alias. + """ + prefix: String + + """ + The name suffix for the alias. + """ + suffix: String +} + +""" +Input for upserting a person +""" +input UpsertPersonInput { + """ + The address of the person. + """ + address: AssignOrCreateAddressInput + + """ + Aliases for the person. + """ + aliases: [UpsertPersonAliasInput!] + + """ + The date of birth of the person. + """ + dateOfBirth: ISO8601Date + + """ + IDs of person aliases to delete. + """ + deletedAliasIds: [PersonAliasID!] + + """ + IDs of government identifiers to delete. + """ + deletedGovernmentIdentifierIds: [GovernmentIdentifierID!] + + """ + IDs of supporting documents to delete. + """ + deletedSupportingDocumentIds: [SupportingDocumentID!] + + """ + The personal email of the person. + """ + email: String + + """ + The first name of the person. Required for create. + """ + firstName: String + + """ + Government identifiers for the person (personal types only). + """ + governmentIdentifiers: [UpsertGovernmentIdentifierInput!] + + """ + The ID of the person to update. If not provided, a new person will be created. + """ + id: PersonID + + """ + The last name of the person. Required for create. + """ + lastName: String + + """ + The middle name of the person. + """ + middleName: String + + """ + Name variants (e.g., kanji/kana for Japan). + """ + nameVariants: [NameVariantInput!] + + """ + The nationalities of the person. + """ + nationalities: [CountryCode!] + + """ + The personal phone number of the person. + """ + phoneNumber: String + + """ + The name prefix (e.g., Mr., Mrs., Dr.). + """ + prefix: String + + """ + The name suffix (e.g., Jr., Sr., III). + """ + suffix: String + + """ + IDs of pre-staged supporting documents to link to this person. + """ + supportingDocumentIds: [SupportingDocumentID!] +} + +""" +Input for upserting a principal with nested person +""" +input UpsertPrincipalInput { + """ + The ID of an existing address to use for this principal. + """ + applicableAddressId: AddressID + + """ + The business email of the principal. + """ + email: String + + """ + The equity ownership percentage (0-100). + """ + equityOwnership: Float + + """ + The ID of the principal to update. If not provided, a new principal will be created. + """ + id: PrincipalID + + """ + The job title of the principal. + """ + jobTitle: String + + """ + The person associated with this principal. + """ + person: UpsertPersonInput + + """ + The business phone number of the principal. + """ + phoneNumber: String + + """ + The roles assigned to this principal. + """ + roles: [PrincipalRoleTypeEnum!] +} + +input UpsertTestDriveBusinessFeatureSettingInput { + """ + Whether future shops will be automatically opted into a test drive feature. + """ + autoEnableForFutureShops: Boolean + + """ + The UTC datetime when the test drive feature will be auto released for all shops in the organization + """ + autoReleaseDate: ISO8601DateTime + + """ + The handle of the target test drive feature. + """ + handle: String! +} + +type UpsertTestDriveBusinessFeatureSettingResult { + """ + Boolean indicating whether future shops will be automatically opted into a test drive. + """ + autoEnableForFutureShops: Boolean + + """ + The UTC datetime when the test drive feature will be auto released for all shops in the organization + """ + autoReleaseDate: ISO8601DateTime + + """ + The collection of errors. + """ + userErrors: [UserError!] +} + +type UserError { + """ + Error code + """ + code: String + + """ + Path to the input field which caused the error + """ + field: [String!]! + + """ + The error message + """ + message: String! +} + +""" +Field options for filtering groups queries. +""" +enum UserGroupFilterField { + """ + The store the group has access to via a role. + """ + ACCESSIBLE_STORE + + """ + The role assigned to the group. + """ + ASSIGNED_ROLE + + """ + The id of the group. + """ + ID + + """ + Whether the group uses legacy access. + """ + USES_LEGACY_ACCESS +} + +""" +Represents a single filter option for user group queries. +""" +input UserGroupFilterInput { + field: UserGroupFilterField! + operator: UserGroupFilterOperator! + value: String! +} + +""" +Operators for filtering groups queries. +""" +enum UserGroupFilterOperator { + """ + Equals operator. + """ + EQUALS + + """ + In operator. + """ + IN + + """ + Not equals operator. + """ + NOT_EQUALS +} + +""" +Sort options for user group queries. +""" +enum UserGroupSort { + """ + Sort by name ascending. + """ + NAME_ASC + + """ + Sort by name descending. + """ + NAME_DESC + + """ + Sort by user count ascending. + """ + USER_COUNT_ASC + + """ + Sort by user count descending. + """ + USER_COUNT_DESC +} + +type UserLimits { + """ + Whether the user limit is enforced. + """ + enforced: Boolean + + """ + The maximum number of users allowed. + """ + maxAllowed: Int! + + """ + The number of used users seats in the organization. + """ + used: Int! +} + +enum UserSamlEnforcementState { + """ + This user cannot use SAML. + """ + OFF + + """ + This user is required to use SAML. + """ + REQUIRED + + """ + This user may be required to use SAML. + """ + SPECIFIC_USERS + + """ + This user is updating to be unable to use SAML. + """ + UPDATING_TO_OFF + + """ + This user is updating to be required to use SAML. + """ + UPDATING_TO_REQUIRED +} + +type UserShopAccessDetails { + shopAccess: ShopAccess + staffMember: StaffMember +} + +enum ValidLegalEntityCategoryInput { + BUSINESS + INDIVIDUAL + UNSPECIFIED +} + +type ValidateVibeTransferReadinessResult { + """ + Whether the shop is ready for a Vibe transfer. + """ + readyToTransfer: Boolean! + + """ + The collection of errors. + """ + userErrors: [UserError!] +} diff --git a/packages/store/src/cli/api/graphql/business-platform-organizations/queries/store-info-shop.graphql b/packages/store/src/cli/api/graphql/business-platform-organizations/queries/store-info-shop.graphql new file mode 100644 index 00000000000..81406630e25 --- /dev/null +++ b/packages/store/src/cli/api/graphql/business-platform-organizations/queries/store-info-shop.graphql @@ -0,0 +1,21 @@ +query StoreInfoShop($search: String) { + organization { + id + name + accessibleShops(first: 5, search: $search) { + edges { + node { + name + primaryDomain + storeType + status + planName + planVariantName + billingCurrency + createdAt + shortName + } + } + } + } +} diff --git a/packages/store/src/cli/services/store/info/admin-shop.test.ts b/packages/store/src/cli/services/store/info/admin-shop.test.ts index a66466990ec..47eb1ac252e 100644 --- a/packages/store/src/cli/services/store/info/admin-shop.test.ts +++ b/packages/store/src/cli/services/store/info/admin-shop.test.ts @@ -1,14 +1,11 @@ import {fetchAdminShop} from './admin-shop.js' import {prepareAdminStoreGraphQLContext} from '../execute/admin-context.js' -import {graphqlRequest} from '@shopify/cli-kit/node/api/graphql' +import {adminRequestDoc} from '@shopify/cli-kit/node/api/admin' import {AbortError} from '@shopify/cli-kit/node/error' import {describe, test, expect, vi, beforeEach} from 'vitest' vi.mock('../execute/admin-context.js') -vi.mock('@shopify/cli-kit/node/api/graphql') -vi.mock('@shopify/cli-kit/node/api/admin', () => ({ - adminUrl: (fqdn: string, version: string) => `https://${fqdn}/admin/api/${version}/graphql.json`, -})) +vi.mock('@shopify/cli-kit/node/api/admin') const SHOP = 'shop.myshopify.com' @@ -41,7 +38,7 @@ describe('fetchAdminShop', () => { test('returns mapped shop fields on success', async () => { vi.mocked(prepareAdminStoreGraphQLContext).mockResolvedValueOnce(adminContext() as never) - vi.mocked(graphqlRequest).mockResolvedValueOnce({ + vi.mocked(adminRequestDoc).mockResolvedValueOnce({ shop: { shopOwnerName: 'Alice', ianaTimezone: 'America/New_York', @@ -64,7 +61,7 @@ describe('fetchAdminShop', () => { test('omits shopifyPlus when the features object is absent', async () => { vi.mocked(prepareAdminStoreGraphQLContext).mockResolvedValueOnce(adminContext() as never) - vi.mocked(graphqlRequest).mockResolvedValueOnce({ + vi.mocked(adminRequestDoc).mockResolvedValueOnce({ shop: { shopOwnerName: 'Bob', ianaTimezone: null, @@ -82,7 +79,7 @@ describe('fetchAdminShop', () => { test('returns skipped with the error message when the Admin request fails', async () => { vi.mocked(prepareAdminStoreGraphQLContext).mockResolvedValueOnce(adminContext() as never) - vi.mocked(graphqlRequest).mockRejectedValueOnce(new Error('network down')) + vi.mocked(adminRequestDoc).mockRejectedValueOnce(new Error('network down')) const result = await fetchAdminShop(SHOP) expect(result.skipped).toBe(true) diff --git a/packages/store/src/cli/services/store/info/admin-shop.ts b/packages/store/src/cli/services/store/info/admin-shop.ts index 3c914aeae9d..f55a3efdf68 100644 --- a/packages/store/src/cli/services/store/info/admin-shop.ts +++ b/packages/store/src/cli/services/store/info/admin-shop.ts @@ -1,33 +1,13 @@ +import {StoreInfoAdminShop} from '../../../api/graphql/admin/generated/store-info-admin-shop.js' import {prepareAdminStoreGraphQLContext} from '../execute/admin-context.js' -import {adminUrl} from '@shopify/cli-kit/node/api/admin' -import {graphqlRequest} from '@shopify/cli-kit/node/api/graphql' +import {adminRequestDoc} from '@shopify/cli-kit/node/api/admin' import {AbortError} from '@shopify/cli-kit/node/error' import {compact} from '@shopify/cli-kit/common/object' import type {AdminShopFetchOutcome, AdminShopFields} from './types.js' - -const ADMIN_SHOP_QUERY = ` - query StoreInfoAdminShop { - shop { - shopOwnerName - ianaTimezone - setupRequired - features { - shopifyPlus - } - } - } -` - -interface AdminShopResponse { - shop: { - shopOwnerName?: string | null - ianaTimezone?: string | null - setupRequired?: boolean | null - features?: { - shopifyPlus?: boolean | null - } | null - } -} +import type { + StoreInfoAdminShopQuery, + StoreInfoAdminShopQueryVariables, +} from '../../../api/graphql/admin/generated/store-info-admin-shop.js' export async function fetchAdminShop(store: string): Promise { let context @@ -41,11 +21,11 @@ export async function fetchAdminShop(store: string): Promise({ - query: ADMIN_SHOP_QUERY, - api: 'Admin', - url: adminUrl(context.adminSession.storeFqdn, context.version, context.adminSession), - token: context.adminSession.token, + const response = await adminRequestDoc({ + query: StoreInfoAdminShop, + session: context.adminSession, + version: context.version, + variables: {}, responseOptions: {handleErrors: false}, }) @@ -62,7 +42,7 @@ export async function fetchAdminShop(store: string): Promise { }) test('throws AbortError when no destination matches the domain', async () => { - vi.mocked(businessPlatformRequest).mockResolvedValueOnce({ + vi.mocked(businessPlatformRequestDoc).mockResolvedValueOnce({ currentUserAccount: {destinations: {nodes: []}}, - } as DestinationsQueryResponse) + } as never) const err = await fetchDestinationsContext({store: SHOP}).catch((e: unknown) => e) expect(err).toBeInstanceOf(AbortError) @@ -44,7 +43,7 @@ describe('fetchDestinationsContext', () => { }) test('throws AbortError when domain match is missing from results', async () => { - vi.mocked(businessPlatformRequest).mockResolvedValueOnce({ + vi.mocked(businessPlatformRequestDoc).mockResolvedValueOnce({ currentUserAccount: { destinations: { nodes: [ @@ -55,7 +54,7 @@ describe('fetchDestinationsContext', () => { ], }, }, - } as DestinationsQueryResponse) + } as never) const err = await fetchDestinationsContext({store: SHOP}).catch((e: unknown) => e) expect(err).toBeInstanceOf(AbortError) @@ -63,7 +62,7 @@ describe('fetchDestinationsContext', () => { }) test('derives canonical myshopify handle from primaryDomain when BP returns handle: null', async () => { - vi.mocked(businessPlatformRequest) + vi.mocked(businessPlatformRequestDoc) .mockResolvedValueOnce({ currentUserAccount: { destinations: { @@ -77,10 +76,10 @@ describe('fetchDestinationsContext', () => { ], }, }, - } as DestinationsQueryResponse) + } as never) .mockResolvedValueOnce({ currentUserAccount: {organizationForDestination: {id: 'gid', name: 'Org'}}, - } as OrganizationForDestinationResponse) + } as never) const ctx = await fetchDestinationsContext({store: SHOP}) @@ -88,24 +87,24 @@ describe('fetchDestinationsContext', () => { }) test('searches BP with the subdomain rather than the full FQDN', async () => { - vi.mocked(businessPlatformRequest) + vi.mocked(businessPlatformRequestDoc) .mockResolvedValueOnce({ currentUserAccount: {destinations: {nodes: [destinationNode()]}}, - } as DestinationsQueryResponse) + } as never) .mockResolvedValueOnce({ currentUserAccount: {organizationForDestination: {id: 'gid', name: 'Org'}}, - } as OrganizationForDestinationResponse) + } as never) await fetchDestinationsContext({store: SHOP}) - expect(vi.mocked(businessPlatformRequest).mock.calls[0]?.[2]).toEqual({search: 'shop'}) + expect(vi.mocked(businessPlatformRequestDoc).mock.calls[0]?.[0].variables).toEqual({search: 'shop'}) }) test('returns destination + owning org on success', async () => { - vi.mocked(businessPlatformRequest) + vi.mocked(businessPlatformRequestDoc) .mockResolvedValueOnce({ currentUserAccount: {destinations: {nodes: [destinationNode()]}}, - } as DestinationsQueryResponse) + } as never) .mockResolvedValueOnce({ currentUserAccount: { organizationForDestination: { @@ -113,7 +112,7 @@ describe('fetchDestinationsContext', () => { name: 'Acme Org', }, }, - } as OrganizationForDestinationResponse) + } as never) const ctx = await fetchDestinationsContext({store: SHOP}) @@ -123,10 +122,10 @@ describe('fetchDestinationsContext', () => { }) test('records owning_org field error when the org request throws', async () => { - vi.mocked(businessPlatformRequest) + vi.mocked(businessPlatformRequestDoc) .mockResolvedValueOnce({ currentUserAccount: {destinations: {nodes: [destinationNode()]}}, - } as DestinationsQueryResponse) + } as never) .mockRejectedValueOnce(new Error('boom')) const ctx = await fetchDestinationsContext({store: SHOP}) @@ -140,13 +139,13 @@ describe('fetchDestinationsContext', () => { }) test('records owning_org field error when the org is missing from response', async () => { - vi.mocked(businessPlatformRequest) + vi.mocked(businessPlatformRequestDoc) .mockResolvedValueOnce({ currentUserAccount: {destinations: {nodes: [destinationNode()]}}, - } as DestinationsQueryResponse) + } as never) .mockResolvedValueOnce({ currentUserAccount: {organizationForDestination: null}, - } as OrganizationForDestinationResponse) + } as never) const ctx = await fetchDestinationsContext({store: SHOP}) @@ -155,16 +154,16 @@ describe('fetchDestinationsContext', () => { }) test('uses a provided token without re-authenticating', async () => { - vi.mocked(businessPlatformRequest).mockResolvedValueOnce({ + vi.mocked(businessPlatformRequestDoc).mockResolvedValueOnce({ currentUserAccount: {destinations: {nodes: [destinationNode()]}}, - } as DestinationsQueryResponse) - vi.mocked(businessPlatformRequest).mockResolvedValueOnce({ + } as never) + vi.mocked(businessPlatformRequestDoc).mockResolvedValueOnce({ currentUserAccount: {organizationForDestination: {id: 'gid', name: 'O'}}, - } as OrganizationForDestinationResponse) + } as never) await fetchDestinationsContext({store: SHOP, token: 'preset'}) expect(ensureAuthenticatedBusinessPlatform).not.toHaveBeenCalled() - expect(vi.mocked(businessPlatformRequest).mock.calls[0]?.[1]).toBe('preset') + expect(vi.mocked(businessPlatformRequestDoc).mock.calls[0]?.[0].token).toBe('preset') }) }) diff --git a/packages/store/src/cli/services/store/info/destinations.ts b/packages/store/src/cli/services/store/info/destinations.ts index 21e9dc4784b..efe79dff165 100644 --- a/packages/store/src/cli/services/store/info/destinations.ts +++ b/packages/store/src/cli/services/store/info/destinations.ts @@ -1,59 +1,23 @@ +import {StoreInfoDestinations} from '../../../api/graphql/business-platform-destinations/generated/store-info-destinations.js' +import {StoreInfoOwningOrg} from '../../../api/graphql/business-platform-destinations/generated/store-info-owning-org.js' import {AbortError} from '@shopify/cli-kit/node/error' -import {businessPlatformRequest} from '@shopify/cli-kit/node/api/business-platform' +import {businessPlatformRequestDoc} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' import {numericIdFromEncodedGid} from '@shopify/cli-kit/common/gid' import {extractHost, extractMyshopifyHandle} from '@shopify/cli-kit/common/url' +import type { + StoreInfoDestinationsQuery, + StoreInfoDestinationsQueryVariables, +} from '../../../api/graphql/business-platform-destinations/generated/store-info-destinations.js' +import type { + StoreInfoOwningOrgQuery, + StoreInfoOwningOrgQueryVariables, +} from '../../../api/graphql/business-platform-destinations/generated/store-info-owning-org.js' import type {DestinationNode, DestinationsContext, OwningOrgInternal, StoreInfoFieldError} from './types.js' -const DESTINATIONS_QUERY = ` - query StoreInfoDestinations($search: String!) { - currentUserAccount { - destinations(search: $search, shopsOnly: true, first: 25) { - nodes { - id - publicId - name - handle - shortName - primaryDomain - webUrl - status - accountStatus - isAppDevelopment - lastAccess - } - } - } - } -` - -const ORGANIZATION_FOR_DESTINATION_QUERY = ` - query StoreInfoOwningOrg($destinationPublicId: DestinationPublicID!) { - currentUserAccount { - organizationForDestination(destinationPublicId: $destinationPublicId) { - id - name - } - } - } -` - -export interface DestinationsQueryResponse { - currentUserAccount?: { - destinations: { - nodes: DestinationNode[] - } - } | null -} - -export interface OrganizationForDestinationResponse { - currentUserAccount?: { - organizationForDestination?: { - id: string - name: string - } | null - } | null -} +type DestinationNodeFromQuery = NonNullable< + StoreInfoDestinationsQuery['currentUserAccount'] +>['destinations']['nodes'][number] interface FetchDestinationsContextOptions { store: string @@ -62,14 +26,24 @@ interface FetchDestinationsContextOptions { export async function fetchDestinationsContext(options: FetchDestinationsContextOptions): Promise { const token = options.token ?? (await ensureAuthenticatedBusinessPlatform()) + const unauthorizedHandler = { + type: 'token_refresh' as const, + handler: async () => { + const newToken = await ensureAuthenticatedBusinessPlatform() + return {token: newToken} + }, + } // BP's destinations.search matches against handle/name; using the subdomain widens the hit // rate vs. passing the full FQDN. const lowerStore = options.store.toLowerCase() const subdomain = lowerStore.replace(/\.myshopify\.com$/, '') - const response = await businessPlatformRequest(DESTINATIONS_QUERY, token, { - search: subdomain, + const response = await businessPlatformRequestDoc({ + query: StoreInfoDestinations, + token, + variables: {search: subdomain}, + unauthorizedHandler, }) const nodes = response.currentUserAccount?.destinations.nodes ?? [] @@ -87,18 +61,22 @@ export async function fetchDestinationsContext(options: FetchDestinationsContext const canonicalHandle = extractMyshopifyHandle(matchedNode.primaryDomain) ?? extractMyshopifyHandle(matchedNode.webUrl) const matched: DestinationNode = { ...matchedNode, - handle: canonicalHandle ?? matchedNode.handle, + id: String(matchedNode.id), + publicId: String(matchedNode.publicId), + lastAccess: matchedNode.lastAccess == null ? null : String(matchedNode.lastAccess), + handle: canonicalHandle ?? matchedNode.handle ?? null, } let owningOrg: OwningOrgInternal | undefined let owningOrgError: StoreInfoFieldError | undefined try { - const orgResponse = await businessPlatformRequest( - ORGANIZATION_FOR_DESTINATION_QUERY, + const orgResponse = await businessPlatformRequestDoc({ + query: StoreInfoOwningOrg, token, - {destinationPublicId: matched.publicId}, - ) + variables: {destinationPublicId: matched.publicId}, + unauthorizedHandler, + }) const org = orgResponse.currentUserAccount?.organizationForDestination if (org) { const decodedId = org.id ? numericIdFromEncodedGid(org.id) : undefined @@ -127,7 +105,7 @@ export async function fetchDestinationsContext(options: FetchDestinationsContext } } -function matchesStore(node: DestinationNode, lowerStore: string): boolean { +function matchesStore(node: DestinationNodeFromQuery, lowerStore: string): boolean { // BP returns URL strings (sometimes with scheme, sometimes bare) in primaryDomain/webUrl; // extract the hostname and compare. handle/shortName are unreliable (often null or an // abbreviation rather than the myshopify subdomain). diff --git a/packages/store/src/cli/services/store/info/organization-shop.test.ts b/packages/store/src/cli/services/store/info/organization-shop.test.ts index 015a4e0ce92..be9cca49493 100644 --- a/packages/store/src/cli/services/store/info/organization-shop.test.ts +++ b/packages/store/src/cli/services/store/info/organization-shop.test.ts @@ -1,6 +1,5 @@ import {fetchOrganizationShop} from './organization-shop.js' -import type {OrganizationShopResponse} from './organization-shop.js' -import {businessPlatformOrganizationsRequest} from '@shopify/cli-kit/node/api/business-platform' +import {businessPlatformOrganizationsRequestDoc} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' import {BugError} from '@shopify/cli-kit/node/error' import {describe, test, expect, vi, beforeEach} from 'vitest' @@ -33,13 +32,13 @@ describe('fetchOrganizationShop', () => { }) test('returns the matched shop node', async () => { - vi.mocked(businessPlatformOrganizationsRequest).mockResolvedValueOnce({ + vi.mocked(businessPlatformOrganizationsRequestDoc).mockResolvedValueOnce({ organization: { id: 'gid', name: 'Acme', accessibleShops: {edges: [{node: shopNode()}]}, }, - } as OrganizationShopResponse) + } as never) const shop = await fetchOrganizationShop({store: SHOP, organizationId: ORG_ID}) expect(shop.name).toBe('My Shop') @@ -47,25 +46,25 @@ describe('fetchOrganizationShop', () => { }) test('throws BugError when no shop matches the domain', async () => { - vi.mocked(businessPlatformOrganizationsRequest).mockResolvedValueOnce({ + vi.mocked(businessPlatformOrganizationsRequestDoc).mockResolvedValueOnce({ organization: { id: 'gid', name: 'Acme', accessibleShops: {edges: [{node: shopNode({primaryDomain: 'https://other.myshopify.com'})}]}, }, - } as OrganizationShopResponse) + } as never) await expect(fetchOrganizationShop({store: SHOP, organizationId: ORG_ID})).rejects.toBeInstanceOf(BugError) }) test('passes organizationId and search variable to the request', async () => { - vi.mocked(businessPlatformOrganizationsRequest).mockResolvedValueOnce({ + vi.mocked(businessPlatformOrganizationsRequestDoc).mockResolvedValueOnce({ organization: {id: 'gid', name: 'Acme', accessibleShops: {edges: [{node: shopNode()}]}}, - } as OrganizationShopResponse) + } as never) await fetchOrganizationShop({store: SHOP, organizationId: ORG_ID, token: 'preset'}) - const call = vi.mocked(businessPlatformOrganizationsRequest).mock.calls[0]?.[0] + const call = vi.mocked(businessPlatformOrganizationsRequestDoc).mock.calls[0]?.[0] expect(call?.organizationId).toBe(ORG_ID) expect(call?.variables).toEqual({search: SHOP}) expect(call?.token).toBe('preset') @@ -73,7 +72,7 @@ describe('fetchOrganizationShop', () => { }) test('throws when organization is missing', async () => { - vi.mocked(businessPlatformOrganizationsRequest).mockResolvedValueOnce({organization: null} as OrganizationShopResponse) + vi.mocked(businessPlatformOrganizationsRequestDoc).mockResolvedValueOnce({organization: null} as never) await expect(fetchOrganizationShop({store: SHOP, organizationId: ORG_ID})).rejects.toBeInstanceOf(BugError) }) }) diff --git a/packages/store/src/cli/services/store/info/organization-shop.ts b/packages/store/src/cli/services/store/info/organization-shop.ts index 952e32f8cbe..8031c15fcad 100644 --- a/packages/store/src/cli/services/store/info/organization-shop.ts +++ b/packages/store/src/cli/services/store/info/organization-shop.ts @@ -1,45 +1,14 @@ +import {StoreInfoShop} from '../../../api/graphql/business-platform-organizations/generated/store-info-shop.js' +import type { + StoreInfoShopQuery, + StoreInfoShopQueryVariables, +} from '../../../api/graphql/business-platform-organizations/generated/store-info-shop.js' import {BugError} from '@shopify/cli-kit/node/error' -import {businessPlatformOrganizationsRequest} from '@shopify/cli-kit/node/api/business-platform' +import {businessPlatformOrganizationsRequestDoc} from '@shopify/cli-kit/node/api/business-platform' import {ensureAuthenticatedBusinessPlatform} from '@shopify/cli-kit/node/session' import {extractHost} from '@shopify/cli-kit/common/url' import type {OrganizationShopFields} from './types.js' -const ORGANIZATION_SHOP_QUERY = ` - query StoreInfoShop($search: String) { - organization { - id - name - accessibleShops(first: 5, search: $search) { - edges { - node { - name - primaryDomain - storeType - status - planName - planVariantName - billingCurrency - createdAt - shortName - } - } - } - } - } -` - -export interface OrganizationShopResponse { - organization?: { - id: string - name: string - accessibleShops?: { - edges: { - node: OrganizationShopFields - }[] - } - } | null -} - interface FetchOrganizationShopOptions { store: string organizationId: string @@ -58,8 +27,8 @@ export async function fetchOrganizationShop( }, } - const response = await businessPlatformOrganizationsRequest({ - query: ORGANIZATION_SHOP_QUERY, + const response = await businessPlatformOrganizationsRequestDoc({ + query: StoreInfoShop, token, organizationId: options.organizationId, variables: {search: options.store}, @@ -77,5 +46,15 @@ export async function fetchOrganizationShop( ) } - return matched + return { + name: matched.name, + primaryDomain: matched.primaryDomain ?? undefined, + storeType: matched.storeType ?? undefined, + status: matched.status, + planName: matched.planName ?? undefined, + planVariantName: matched.planVariantName ?? undefined, + billingCurrency: matched.billingCurrency ?? undefined, + createdAt: matched.createdAt == null ? undefined : String(matched.createdAt), + shortName: matched.shortName ?? undefined, + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6bc9736c72..3dde2272813 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -645,6 +645,9 @@ importers: packages/store: dependencies: + '@graphql-typed-document-node/core': + specifier: 3.2.0 + version: 3.2.0(graphql@16.10.0) '@oclif/core': specifier: 4.5.3 version: 4.5.3 From cc62e1a700afb77732feed12f2bbee2825869d7d Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Sun, 31 May 2026 21:50:02 +0300 Subject: [PATCH 21/21] Gitignore store package schemas; fetch via bin/get-graphql-schemas The schema files are sourced from external repos at codegen time (mirroring how packages/app and packages/organizations work) and shouldn't be tracked. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 1 + bin/get-graphql-schemas.js | 7 +- .../api/graphql/admin/admin_schema.graphql | 143187 --------------- .../destinations_schema.graphql | 691 - .../organizations_schema.graphql | 19059 -- 5 files changed, 7 insertions(+), 162938 deletions(-) delete mode 100644 packages/store/src/cli/api/graphql/admin/admin_schema.graphql delete mode 100644 packages/store/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql delete mode 100644 packages/store/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql diff --git a/.gitignore b/.gitignore index ecfacadde7d..893d5f0a5dd 100644 --- a/.gitignore +++ b/.gitignore @@ -202,6 +202,7 @@ packages/ui-extensions-dev-console/css-transform.js packages/ui-extensions-dev-console/dist packages/cli-kit/src/cli/api/graphql/*/*_schema.graphql packages/organizations/src/cli/api/graphql/*/*_schema.graphql +packages/store/src/cli/api/graphql/*/*_schema.graphql .claude/settings.local.json diff --git a/bin/get-graphql-schemas.js b/bin/get-graphql-schemas.js index b5a076dbd94..89fb15d0aa7 100755 --- a/bin/get-graphql-schemas.js +++ b/bin/get-graphql-schemas.js @@ -51,13 +51,17 @@ const schemas = [ localPaths: [ './packages/app/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql', './packages/organizations/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql', + './packages/store/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql', ], }, { owner: 'shop', repo: 'world', pathToFile: 'areas/platforms/organizations/db/graphql/organizations_schema.graphql', - localPaths: ['./packages/app/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql'], + localPaths: [ + './packages/app/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql', + './packages/store/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql', + ], }, { owner: 'shop', @@ -79,6 +83,7 @@ const schemas = [ './packages/cli-kit/src/cli/api/graphql/admin/admin_schema.graphql', './packages/app/src/cli/api/graphql/bulk-operations/admin_schema.graphql', './packages/app/src/cli/api/graphql/admin/admin_schema.graphql', + './packages/store/src/cli/api/graphql/admin/admin_schema.graphql', ], usesLfs: true, }, diff --git a/packages/store/src/cli/api/graphql/admin/admin_schema.graphql b/packages/store/src/cli/api/graphql/admin/admin_schema.graphql deleted file mode 100644 index 3847d6a17e7..00000000000 --- a/packages/store/src/cli/api/graphql/admin/admin_schema.graphql +++ /dev/null @@ -1,143187 +0,0 @@ -# This file is auto-generated from the current state of the GraphQL API. Instead of editing this file, -# please edit the ruby definition files and run `bin/rails graphql:schema:dump` to regenerate the schema. -# -# If you're just looking to browse, you may find it friendlier to use the graphiql browser which is -# available in services-internal at https://app.shopify.com/services/internal/shops/14168/graphql. -# Check out the "Docs" tab in the top right. - -""" -Marks an element of a GraphQL schema as requiring a specific access scope. -""" -directive @requiredAccess( - """ - The access scope required to access this element. - """ - scope: String! -) on FIELD_DEFINITION | INTERFACE | OBJECT | UNION - -""" -Declares the concrete GID types accepted by an argument or input field. -""" -directive @gidTypes( - """ - Names of the GID types accepted. - """ - types: [String!]! -) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION - -""" -Marks an element of a GraphQL schema as privately documented. -""" -directive @privatelyDocumented on ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION - -""" -Marks a field as protected. Carries the subject and content of the protection. -""" -directive @protectedField( - """ - The subject of the protection. - """ - subject: String = null - - """ - The content of the protection. - """ - content: String = null -) on FIELD_DEFINITION - -""" -Marks an object as protected. Carries the subject of the protection. -""" -directive @protectedObject( - """ - The subject of the protection. - """ - subject: String! -) on OBJECT - -""" -The component that owns a GraphQL type. -""" -directive @componentName( - """ - The component handle. - """ - name: String! -) on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | UNION - -schema { - query: QueryRoot - mutation: Mutation -} - -""" -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 - -""" -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 @idempotent( - """ - The key to identify the idempotent mutation. - """ - key: String! -) on FIELD - -""" -Requires that exactly one field must be supplied and that field must not be `null`. -""" -directive @oneOf on INPUT_OBJECT - -""" -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 - -""" -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 @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") @componentName(name: "checkouts") @protectedObject(subject: "customer") { - """ - The URL for the buyer to recover their checkout. - """ - abandonedCheckoutUrl: URL! - - """ - The billing address provided by the buyer. - Null if the user didn't provide a billing address. - """ - billingAddress: MailingAddress - - """ - The date and time when the buyer completed the checkout. - Null if the checkout hasn't been completed. - """ - completedAt: DateTime - - """ - The date and time when the checkout was created. - """ - createdAt: DateTime! - - """ - A list of extra information that has been added to the checkout. - """ - customAttributes: [Attribute!]! - - """ - The customer who created this checkout. - May be null if the checkout was created from a draft order or via an app. - """ - customer: Customer - - """ - A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that - returns the single next record, sorted ascending by ID. - """ - defaultCursor: String! - - """ - The discount codes entered by the buyer at checkout. - """ - discountCodes: [String!]! - - """ - A globally-unique ID. - """ - id: ID! - - """ - A list of the line items in this checkout. - """ - lineItems( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): AbandonedCheckoutLineItemConnection! - - """ - The number of products in the checkout. - """ - lineItemsQuantity: Int! @deprecated(reason: "Use [AbandonedCheckoutLineItem.quantity](https:\/\/shopify.dev\/api\/admin-graphql\/unstable\/objects\/AbandonedCheckoutLineItem#field-quantity) instead.") - - """ - Unique merchant-facing identifier for the checkout. - """ - name: String! - - """ - A merchant-facing note added to the checkout. Not visible to the buyer. - """ - note: String! - - """ - The shipping address to where the line items will be shipped. - Null if the user didn't provide a shipping address. - """ - shippingAddress: MailingAddress - - """ - The sum of all items in the checkout, including discounts but excluding shipping, taxes and tips. - """ - subtotalPriceSet: MoneyBag! - - """ - Individual taxes charged on the checkout. - """ - taxLines: [TaxLine!]! - - """ - Whether taxes are included in line item and shipping line prices. - """ - taxesIncluded: Boolean! - - """ - The total amount of discounts to be applied. - """ - totalDiscountSet: MoneyBag! - - """ - The total duties applied to the checkout. - """ - 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 date and time when the checkout was most recently updated. - """ - updatedAt: DateTime! -} - -""" -An auto-generated type for paginating through multiple AbandonedCheckouts. -""" -type AbandonedCheckoutConnection @componentName(name: "platform") { - """ - 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! -} - -""" -An auto-generated type which holds one AbandonedCheckout and a cursor during pagination. -""" -type AbandonedCheckoutEdge @componentName(name: "checkouts") { - """ - 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 AbandonedCheckoutEdge. - """ - node: AbandonedCheckout! -} - -""" -A single line item in an abandoned checkout. -""" -type AbandonedCheckoutLineItem implements Node @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") @componentName(name: "checkouts") { - """ - A list of line item components for this line item. - """ - components: [AbandonedCheckoutLineItemComponent!] - - """ - A list of extra information that has been added to the line item. - """ - customAttributes: [Attribute!]! - - """ - Discount allocations that have been applied on the line item. - """ - discountAllocations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DiscountAllocationConnection! - - """ - Final total price for the entire quantity of this line item, including discounts. - """ - discountedTotalPriceSet: MoneyBag! - - """ - 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. - """ - discountedTotalPriceWithCodeDiscount: MoneyBag! - - """ - The price of a single variant unit after discounts are applied at the line item level, in shop and presentment currencies. - """ - discountedUnitPriceSet: MoneyBag! - - """ - The price of a single variant unit after all discounts are applied, at both the line item and code-based line item level. - """ - discountedUnitPriceWithCodeDiscount: MoneyBag! - - """ - A globally-unique ID. - """ - id: ID! - - """ - 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 - - """ - Original total price for the entire quantity of this line item, before discounts. - """ - originalTotalPriceSet: MoneyBag! - - """ - Original price for a single unit of this line item, before discounts. - """ - originalUnitPriceSet: MoneyBag! - - """ - The parent relationship for this line item. - """ - parentRelationship: AbandonedCheckoutLineItemParentRelationship - - """ - Product for this line item. - NULL for custom line items and products that were deleted after checkout began. - """ - product: Product - - """ - The quantity of the line item. - """ - quantity: Int! - - """ - SKU for the inventory item associated with the variant, if any. - """ - sku: String - - """ - Title of the line item. Defaults to the product's title. - """ - title: String - - """ - Product variant for this line item. - NULL for custom line items and variants that were deleted after checkout began. - """ - variant: ProductVariant - - """ - Title of the variant for this line item. - NULL for custom line items and products that don't have distinct variants. - """ - variantTitle: String -} - -""" -The list of line item components that belong to a line item. -""" -type AbandonedCheckoutLineItemComponent @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") @componentName(name: "checkouts") { - """ - A globally-unique ID. - """ - id: ID! - - """ - The variant image associated with the line item component. - NULL if the variant associated doesn't have an image. - """ - image: Image - - """ - The quantity of the line item component. - """ - quantity: Int! - - """ - Title of the line item component. - """ - title: String! - - """ - The name of the variant. - """ - variantTitle: String -} - -""" -An auto-generated type for paginating through multiple AbandonedCheckoutLineItems. -""" -type AbandonedCheckoutLineItemConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AbandonedCheckoutLineItemEdge!]! - - """ - 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: [AbandonedCheckoutLineItem!]! - - """ - 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 AbandonedCheckoutLineItem and a cursor during pagination. -""" -type AbandonedCheckoutLineItemEdge @componentName(name: "checkouts") { - """ - 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 AbandonedCheckoutLineItemEdge. - """ - node: AbandonedCheckoutLineItem! -} - -""" -The line relationship between two line items in an abandoned checkout. -""" -type AbandonedCheckoutLineItemParentRelationship @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") @componentName(name: "checkouts") { - """ - The parent line item of the current line item. - """ - parent: AbandonedCheckoutLineItem! -} - -""" -The set of valid sort keys for the AbandonedCheckout query. -""" -enum AbandonedCheckoutSortKeys @componentName(name: "platform") { - """ - Sort by the `checkout_id` value. - """ - CHECKOUT_ID - - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `customer_name` value. - """ - CUSTOMER_NAME - - """ - 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 `total_price` value. - """ - TOTAL_PRICE -} - -""" -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. -""" -type Abandonment implements Node @componentName(name: "merchant_marketing") { - """ - The abandonment payload for the abandoned checkout. - """ - abandonedCheckoutPayload: AbandonedCheckout - - """ - The abandonment type. - """ - abandonmentType: AbandonmentAbandonmentType! - - """ - The app associated with an abandoned checkout. - """ - app: App! - - """ - Permalink to the cart page. - """ - cartUrl: URL - - """ - The date and time when the abandonment was created. - """ - createdAt: DateTime! - - """ - The customer who abandoned this event. - """ - customer: Customer! - - """ - Whether the customer has a draft order since this abandonment has been abandoned. - """ - customerHasNoDraftOrderSinceAbandonment: Boolean! - - """ - Whether the customer has completed an order since this checkout has been abandoned. - """ - customerHasNoOrderSinceAbandonment: Boolean! - - """ - The number of days since the last abandonment email was sent to the customer. - """ - daysSinceLastAbandonmentEmail: Int! - - """ - When the email was sent, if that's the case. - """ - emailSentAt: DateTime - - """ - The email state (e.g., sent or not sent). - """ - emailState: AbandonmentEmailState - - """ - The number of hours since the customer has last abandoned a checkout. - """ - hoursSinceLastAbandonedCheckout: Float - - """ - A globally-unique ID. - """ - id: ID! - - """ - Whether the products in abandonment are available. - """ - inventoryAvailable: Boolean! - - """ - Whether the abandonment event comes from a custom storefront channel. - """ - isFromCustomStorefront: Boolean! - - """ - Whether the abandonment event comes from the Online Store sales channel. - """ - isFromOnlineStore: Boolean! - - """ - Whether the abandonment event comes from the Shop app sales channel. - """ - isFromShopApp: Boolean! - - """ - Whether the abandonment event comes from Shop Pay. - """ - isFromShopPay: Boolean! - - """ - Whether the customer didn't complete another most significant step since this abandonment. - """ - isMostSignificantAbandonment: Boolean! - - """ - The date for the latest browse abandonment. - """ - lastBrowseAbandonmentDate: DateTime! - - """ - The date for the latest cart abandonment. - """ - lastCartAbandonmentDate: DateTime! - - """ - The date for the latest checkout abandonment. - """ - lastCheckoutAbandonmentDate: DateTime! - - """ - The most recent step type. - """ - mostRecentStep: AbandonmentAbandonmentType! - - """ - The products added to the cart during the customer abandoned visit. - """ - productsAddedToCart( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CustomerVisitProductInfoConnection! - - """ - The products viewed during the customer abandoned visit. - """ - productsViewed( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CustomerVisitProductInfoConnection! - - """ - The date and time when the visit started. - """ - visitStartedAt: DateTime -} - -""" -Specifies the abandonment type. -""" -enum AbandonmentAbandonmentType @componentName(name: "merchant_marketing") { - """ - The abandonment event is an abandoned browse. - """ - BROWSE - - """ - The abandonment event is an abandoned cart. - """ - CART - - """ - The abandonment event is an abandoned checkout. - """ - CHECKOUT -} - -""" -Specifies the delivery state of a marketing activity. -""" -enum AbandonmentDeliveryState @componentName(name: "merchant_marketing") { - """ - The marketing activity action has not yet been sent. - """ - NOT_SENT - - """ - The marketing activity action has been scheduled for later delivery. - """ - SCHEDULED - - """ - The marketing activity action has been sent. - """ - SENT -} - -""" -Specifies the email state. -""" -enum AbandonmentEmailState @componentName(name: "merchant_marketing") { - """ - The email has not yet been sent. - """ - NOT_SENT - - """ - The email has been scheduled for later delivery. - """ - SCHEDULED - - """ - The email has been sent. - """ - SENT -} - -""" -Return type for `abandonmentEmailStateUpdate` mutation. -""" -type AbandonmentEmailStateUpdatePayload @componentName(name: "platform") { - """ - The updated abandonment. - """ - abandonment: Abandonment - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [AbandonmentEmailStateUpdateUserError!]! -} - -""" -An error that occurs during the execution of `AbandonmentEmailStateUpdate`. -""" -type AbandonmentEmailStateUpdateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: AbandonmentEmailStateUpdateUserErrorCode - - """ - 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 `AbandonmentEmailStateUpdateUserError`. -""" -enum AbandonmentEmailStateUpdateUserErrorCode @componentName(name: "platform") { - """ - Unable to find an Abandonment for the provided ID. - """ - ABANDONMENT_NOT_FOUND -} - -""" -Return type for `abandonmentUpdateActivitiesDeliveryStatuses` mutation. -""" -type AbandonmentUpdateActivitiesDeliveryStatusesPayload @componentName(name: "platform") { - """ - The updated abandonment. - """ - abandonment: Abandonment - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [AbandonmentUpdateActivitiesDeliveryStatusesUserError!]! -} - -""" -An error that occurs during the execution of `AbandonmentUpdateActivitiesDeliveryStatuses`. -""" -type AbandonmentUpdateActivitiesDeliveryStatusesUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: AbandonmentUpdateActivitiesDeliveryStatusesUserErrorCode - - """ - 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 `AbandonmentUpdateActivitiesDeliveryStatusesUserError`. -""" -enum AbandonmentUpdateActivitiesDeliveryStatusesUserErrorCode @componentName(name: "platform") { - """ - Unable to find an Abandonment for the provided ID. - """ - ABANDONMENT_NOT_FOUND - - """ - Unable to find delivery status info for the provided ID. - """ - DELIVERY_STATUS_INFO_NOT_FOUND - - """ - Unable to find a marketing activity for the provided ID. - """ - MARKETING_ACTIVITY_NOT_FOUND -} - -""" -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 AccessScope @componentName(name: "apps") { - """ - A description of the actions that the access scope allows an app to perform. - """ - description: String! - - """ - 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`. - """ - handle: String! -} - -""" -Possible account types that a staff member can have. -""" -enum AccountType @componentName(name: "user_management") { - """ - The account of a partner who collaborates with the merchant. - """ - COLLABORATOR - - """ - The account of a partner collaborator team member. - """ - COLLABORATOR_TEAM_MEMBER - - """ - The user has not yet accepted the invitation to create an account. - """ - INVITED - - """ - The user has not yet accepted the invitation to become the store owner. - """ - INVITED_STORE_OWNER - - """ - The account can access the Shopify admin. - """ - REGULAR - - """ - The admin has not yet accepted the request to create a collaborator account. - """ - REQUESTED - - """ - The account cannot access the Shopify admin. - """ - RESTRICTED - - """ - The account can be signed into via a SAML provider. - """ - SAML -} - -""" -Represents an operation publishing all products to a publication. -""" -type AddAllProductsOperation implements Node & ResourceOperation @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { - """ - 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! -} - -""" -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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "returns") { - """ - 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!]! -} - -""" -A sale associated with an additional fee charge. -""" -type AdditionalFeeSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - The type of order action that the sale represents. - """ - actionType: SaleActionType! - - """ - The additional fees for the associated sale. - """ - additionalFee: SaleAdditionalFee! - - """ - 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 set of valid sort keys for the AdjustmentGroup query. -""" -enum AdjustmentGroupSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -A sale associated with an order price adjustment. -""" -type AdjustmentSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 set of valid sort keys for the Adjustments query. -""" -enum AdjustmentsSortKeys @componentName(name: "platform") { - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `time` value. - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - Whether all items are eligible for the discount. This value always returns `true`. - """ - allItems: Boolean! -} - -""" -Represents a merchant-defined goal for a specific analytics metric over a date range. -Merchants use analytics targets to track progress toward business objectives, such as reaching -a total sales amount or a number of orders within a given period. - -Each target is associated with a single metric and can optionally include filter expressions to -narrow the evaluated data. Use the -[`analyticsTargets`](https://shopify.dev/docs/api/admin-graphql/unstable/queries/analyticsTargets) query -to retrieve targets, and the -[`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetCreate), -[`analyticsTargetUpdate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetUpdate), -and [`analyticsTargetsDelete`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetsDelete) -mutations to manage them. -""" -type AnalyticsTarget implements Node @requiredAccess(scope: "`read_reports` access scope.") @componentName(name: "reporting") { - """ - The date and time when the analytics target was created. - """ - createdAt: DateTime! - - """ - The currency code stored on the target's expected value. Defaults to the shop currency when the target is created. - """ - currencyCode: CurrencyCode! - - """ - The end date of the period over which progress toward the target is measured. - """ - endDate: Date! - - """ - The goal value that the merchant aims to reach for the tracked metric within the target period. Must be greater than 0. - """ - expectedValue: Decimal! - - """ - An optional filter expression to narrow the data evaluated against this target. For example, `shipping_country = 'US'`. - """ - filters: String - - """ - A globally-unique ID. - """ - id: ID! - - """ - The identifier of the analytics metric that this target tracks, such as `total_sales` or `orders`. - """ - metric: String! - - """ - A human-readable label for the target, such as `Q1 Sales Target`. - """ - name: String! - - """ - The target's expected value converted to a specified presentment currency. - Returns `null` when the target metric isn't a money metric or the conversion - rate is unavailable. - """ - presentmentExpectedValue( - """ - The currency code to convert the expected value into. - """ - currencyCode: CurrencyCode! - ): MoneyV2 - - """ - A generated [ShopifyQL](https://shopify.dev/docs/api/shopifyql) query string - that fetches the current value of the tracked metric for this target's date - range and filters. - """ - shopifyqlQuery: String - - """ - The start date of the period over which progress toward the target is measured. - """ - startDate: Date! - - """ - The date and time when the analytics target was last updated. - """ - updatedAt: DateTime! -} - -""" -An auto-generated type for paginating through multiple AnalyticsTargets. -""" -type AnalyticsTargetConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AnalyticsTargetEdge!]! - - """ - A list of nodes that are contained in AnalyticsTargetEdge. 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: [AnalyticsTarget!]! - - """ - 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 [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget) -that tracks a merchant's goal for a specific metric over a date range. -""" -input AnalyticsTargetCreateInput @componentName(name: "reporting") { - """ - The end date of the period over which progress toward the target is measured. - """ - endDate: Date! - - """ - The goal value that the merchant aims to reach for the tracked metric within the target period. Must be greater than 0. - """ - expectedValue: Decimal! - - """ - An optional filter expression to narrow the data evaluated against this target. For example, `shipping_country = 'US'`. - """ - filters: String - - """ - The identifier of the analytics metric that this target tracks, such as `total_sales` or `orders`. - """ - metric: String! - - """ - A human-readable label for the target, such as `Q1 Sales Target`. - """ - name: String! - - """ - The start date of the period over which progress toward the target is measured. - """ - startDate: Date! -} - -""" -Return type for `analyticsTargetCreate` mutation. -""" -type AnalyticsTargetCreatePayload @componentName(name: "platform") { - """ - The newly created [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). - """ - analyticsTarget: AnalyticsTarget - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [AnalyticsTargetCreateUserError!]! -} - -""" -An error that occurs during the execution of `AnalyticsTargetCreate`. -""" -type AnalyticsTargetCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: AnalyticsTargetCreateUserErrorCode - - """ - 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 `AnalyticsTargetCreateUserError`. -""" -enum AnalyticsTargetCreateUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The provided metric is not valid for analytics targets. - """ - INVALID_METRIC - - """ - The input value is already taken. - """ - TAKEN -} - -""" -An auto-generated type which holds one AnalyticsTarget and a cursor during pagination. -""" -type AnalyticsTargetEdge @componentName(name: "reporting") { - """ - 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 AnalyticsTargetEdge. - """ - node: AnalyticsTarget! -} - -""" -The set of valid sort keys for the AnalyticsTarget query. -""" -enum AnalyticsTargetSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `end_date` value. - """ - END_DATE - - """ - Sort by the `expected_value` value. - """ - EXPECTED_VALUE - - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `metric` value. - """ - METRIC - - """ - Sort by the `name` value. - """ - NAME - - """ - Sort by the `start_date` value. - """ - START_DATE -} - -""" -The input fields for updating an existing [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). -Only provided fields are modified; omitted fields remain unchanged. -""" -input AnalyticsTargetUpdateInput @componentName(name: "reporting") { - """ - The end date of the period over which progress toward the target is measured. - """ - endDate: Date - - """ - The goal value that the merchant aims to reach for the tracked metric within the target period. Must be greater than 0. - """ - expectedValue: Decimal - - """ - An optional filter expression to narrow the data evaluated against this target. For example, `shipping_country = 'US'`. - """ - filters: String - - """ - The identifier of the analytics metric that this target tracks, such as `total_sales` or `orders`. - """ - metric: String - - """ - A human-readable label for the target, such as `Q1 Sales Target`. - """ - name: String - - """ - The start date of the period over which progress toward the target is measured. - """ - startDate: Date -} - -""" -Return type for `analyticsTargetUpdate` mutation. -""" -type AnalyticsTargetUpdatePayload @componentName(name: "platform") { - """ - The updated [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). - """ - analyticsTarget: AnalyticsTarget - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [AnalyticsTargetUpdateUserError!]! -} - -""" -An error that occurs during the execution of `AnalyticsTargetUpdate`. -""" -type AnalyticsTargetUpdateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: AnalyticsTargetUpdateUserErrorCode - - """ - 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 `AnalyticsTargetUpdateUserError`. -""" -enum AnalyticsTargetUpdateUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The provided metric is not valid for analytics targets. - """ - INVALID_METRIC - - """ - The analytics target was not found. - """ - NOT_FOUND - - """ - The input value is already taken. - """ - TAKEN -} - -""" -Return type for `analyticsTargetsDelete` mutation. -""" -type AnalyticsTargetsDeletePayload @componentName(name: "platform") { - """ - The IDs of the deleted analytics targets. - """ - deletedIds: [ID!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [AnalyticsTargetsDeleteUserError!]! -} - -""" -An error that occurs during the execution of `AnalyticsTargetsDelete`. -""" -type AnalyticsTargetsDeleteUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: AnalyticsTargetsDeleteUserErrorCode - - """ - 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 `AnalyticsTargetsDeleteUserError`. -""" -enum AnalyticsTargetsDeleteUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The analytics target was not found. - """ - NOT_FOUND -} - -""" -The Android mobile platform application. -""" -type AndroidApplication @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") @componentName(name: "mobile_support") { - """ - Whether Android App Links are supported by this app. - """ - appLinksEnabled: Boolean! - - """ - The Android application ID. - """ - applicationId: String - - """ - A globally-unique ID. - """ - id: ID! - - """ - The SHA256 fingerprints of the app's signing certificate. - """ - 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 @componentName(name: "platform") { - """ - 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! -} - -""" -A Shopify application that extends store functionality. Apps integrate with -Shopify through APIs to add features, automate workflows, or connect external services. - -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. -""" -type App implements Node @componentName(name: "apps") { - """ - A unique application API identifier. - """ - apiKey: String! - - """ - App store page URL of the app. - """ - appStoreAppUrl: URL - - """ - App store page URL of the developer who created the app. - """ - appStoreDeveloperUrl: URL - - """ - All requestable access scopes available to the app. - """ - availableAccessScopes: [AccessScope!]! - - """ - Banner image for the app. - """ - banner: Image! - - """ - The sales channels associated with this app. - """ - channels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection! - - """ - Description of the app. - """ - description: String - - """ - The name of the app developer. - """ - developerName: String - - """ - The type of app developer. - """ - developerType: AppDeveloperType! - - """ - Website of the developer who created the app. - """ - developerUrl: URL! @deprecated(reason: "Use `appStoreDeveloperUrl` instead.") - - """ - Whether the app uses the Embedded App SDK. - """ - embedded: Boolean! - - """ - Requirements that must be met before the app can be installed. - """ - failedRequirements: [FailedRequirement!]! - - """ - A list of app features that are shown in the Shopify App Store listing. - """ - features: [String!]! - - """ - Feedback from this app about the store. - """ - feedback: AppFeedback - - """ - Handle of the app. - """ - handle: String - - """ - Icon that represents the app. - """ - icon: Image! - - """ - A globally-unique ID. - """ - id: ID! - - """ - Webpage where you can install the app, if app requires explicit user permission. - """ - installUrl: URL - - """ - Corresponding AppInstallation for this shop and App. - Returns null if the App isn't installed. - """ - installation: AppInstallation - - """ - Whether the app is the [post purchase](https://shopify.dev/apps/checkout/post-purchase) app in use. - """ - isPostPurchaseAppInUse: Boolean! - - """ - Webpage that the app starts in. - """ - launchUrl: URL! @deprecated(reason: "Use AppInstallation.launchUrl instead") - - """ - Menu items for the app, which also appear as submenu items in left navigation sidebar in the Shopify admin. - """ - navigationItems: [NavigationItem!]! @deprecated(reason: "Use AppInstallation.navigationItems instead") - - """ - 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. - """ - optionalAccessScopes: [AccessScope!]! - - """ - Whether the app was previously installed on the current shop. - """ - previouslyInstalled: Boolean! - - """ - Detailed information about the app pricing. - """ - pricingDetails: String - - """ - Summary of the app pricing details. - """ - pricingDetailsSummary: String! - - """ - Link to app privacy policy. - """ - privacyPolicyUrl: URL - - """ - The public category for the app. - """ - publicCategory: AppPublicCategory! - - """ - Whether the app is published to the Shopify App Store. - """ - published: Boolean! - - """ - 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. - """ - requestedAccessScopes: [AccessScope!]! - - """ - Screenshots of the app. - """ - screenshots: [Image!]! - - """ - Whether the app was developed by Shopify. - """ - shopifyDeveloped: Boolean! - - """ - The star rating of the app. - """ - starRating: Float! - - """ - Name of the app. - """ - title: String! - - """ - 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. - """ - uninstallMessage: String! - - """ - Webpage where you can uninstall the app. - """ - uninstallUrl: URL @deprecated(reason: "Use AppInstallation.uninstallUrl instead") - - """ - The webhook API version for the app. - """ - webhookApiVersion: String! -} - -""" -A catalog that defines the publication associated with an app. -""" -type AppCatalog implements Catalog & Node @requiredAccess(scope: "`read_products` access scope or `read_product_listings` access scope. Also: The app owning the catalog needs either products or product listing rights.") @componentName(name: "merchandising") { - """ - The apps associated with the catalog. - """ - apps( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): AppConnection! - - """ - The channels associated with the catalog. - """ - channels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection! - - """ - 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 Apps. -""" -type AppConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AppEdge!]! - - """ - 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. - """ - nodes: [App!]! - - """ - An object that’s used to retrieve [cursor - information](https://shopify.dev/api/usage/pagination-graphql) about the current page. - """ - 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 @componentName(name: "billing") { - """ - The amount that can be used towards future app purchases in Shopify. - """ - amount: MoneyV2! - - """ - The date and time when the app credit was created. - """ - createdAt: DateTime! - - """ - The description of the app credit. - """ - description: String! - - """ - A globally-unique ID. - """ - id: ID! - - """ - Whether the app credit is a test transaction. - """ - test: Boolean! -} - -""" -An auto-generated type for paginating through multiple AppCredits. -""" -type AppCreditConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AppCreditEdge!]! - - """ - 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. - """ - nodes: [AppCredit!]! - - """ - 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 AppCredit and a cursor during pagination. -""" -type AppCreditEdge @componentName(name: "billing") { - """ - 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 AppCreditEdge. - """ - node: AppCredit! -} - -""" -Possible types of app developer. -""" -enum AppDeveloperType @componentName(name: "apps") { - """ - Indicates the app developer works directly for a Merchant. - """ - MERCHANT - - """ - Indicates the app developer is a Partner. - """ - PARTNER - - """ - Indicates the app developer is Shopify. - """ - SHOPIFY - - """ - Indicates the app developer is unknown. It is not categorized as any of the other developer types. - """ - UNKNOWN -} - -""" -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. -""" -type AppDiscountType @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - The name of the app extension that's providing the - [discount type](https://help.shopify.com/manual/discounts/discount-types). - """ - app: App! - - """ - The [App Bridge configuration](https://shopify.dev/docs/api/app-bridge) - for the [discount type](https://help.shopify.com/manual/discounts/discount-types). - """ - appBridge: FunctionsAppBridge! - - """ - 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). - """ - appKey: String! - - """ - A description of the - [discount type](https://help.shopify.com/manual/discounts/discount-types) - provided by the app extension. - """ - description: String - - """ - 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 list of [discount classes](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) - that this app extension supports. - """ - discountClasses: [DiscountClass!]! - - """ - 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). - """ - functionId: String! - - """ - The Shopify Function associated with this app discount rule. - """ - shopifyFunction: ShopifyFunction! - - """ - 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`. - """ - targetType: DiscountApplicationTargetType! @deprecated(reason: "Use `discountClasses` instead.") - - """ - The name of the [discount type](https://help.shopify.com/manual/discounts/discount-types) - that the app extension is providing. - """ - title: String! -} - -""" -An auto-generated type for paginating through multiple AppDiscountTypes. -""" -type AppDiscountTypeConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AppDiscountTypeEdge!]! - - """ - 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. - """ - nodes: [AppDiscountType!]! - - """ - 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 AppDiscountType and a cursor during pagination. -""" -type AppDiscountTypeEdge @componentName(name: "pricing") { - """ - 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 AppDiscountTypeEdge. - """ - node: AppDiscountType! -} - -""" -An auto-generated type which holds one App and a cursor during pagination. -""" -type AppEdge @componentName(name: "apps") { - """ - 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 AppEdge. - """ - node: App! -} - -""" -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 AppFeedback @componentName(name: "apps") { - """ - The application associated to the feedback. - """ - app: App! - - """ - The channel this feedback is for. - """ - channel: Channel - - """ - The date and time when the app feedback was generated. - """ - feedbackGeneratedAt: DateTime! - - """ - A link to where merchants can resolve errors. - """ - link: Link - - """ - The feedback message presented to the merchant. - """ - messages: [UserError!]! - - """ - Conveys the state of the feedback and whether it requires merchant action or not. - """ - state: ResourceFeedbackState! -} - -""" -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 AppInstallation implements HasMetafields & Node @componentName(name: "apps") { - """ - The access scopes granted to the application by a merchant during installation. - """ - accessScopes: [AccessScope!]! - - """ - The active application subscriptions billed to the shop on a recurring basis. - """ - activeSubscriptions: [AppSubscription!]! - - """ - All subscriptions created for a shop. - """ - allSubscriptions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! - - """ - Application which is installed. - """ - app: App! - - """ - Channel associated with the installed application. - """ - channel: Channel @deprecated(reason: "Use the root-level `channels` query instead.") - - """ - Credits that can be used towards future app purchases. - """ - credits( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The URL to launch the application. - """ - launchUrl: URL! - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - One-time purchases to a shop. - """ - oneTimePurchases( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 publication associated with the installed application. - """ - publication: Publication @deprecated(reason: "Use the root-level `publications` query instead.") - - """ - The records that track the externally-captured revenue for the app. The records are used for revenue attribution purposes. - """ - revenueAttributionRecords( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @requiredAccess(scope: "Access allowed for apps with `app_attributions` scope using offline tokens only. This API is under a private program and is not available to all partners.") - - """ - Subscriptions charge to a shop on a recurring basis. - """ - subscriptions: [AppSubscription!]! @deprecated(reason: "Use `activeSubscriptions` instead.") - - """ - The URL to uninstall the application. - """ - uninstallUrl: URL -} - -""" -The possible categories of an app installation, based on their purpose -or the environment they can run in. -""" -enum AppInstallationCategory @componentName(name: "apps") { - """ - Apps that serve as channels through which sales are made, such as the online store. - """ - CHANNEL - - """ - Apps that can be used in the POS mobile client. - """ - POS_EMBEDDED -} - -""" -An auto-generated type for paginating through multiple AppInstallations. -""" -type AppInstallationConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AppInstallationEdge!]! - - """ - 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. - """ - nodes: [AppInstallation!]! - - """ - 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 AppInstallation and a cursor during pagination. -""" -type AppInstallationEdge @componentName(name: "apps") { - """ - 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 AppInstallationEdge. - """ - node: AppInstallation! -} - -""" -The levels of privacy of an app installation. -""" -enum AppInstallationPrivacy @componentName(name: "apps") { - PRIVATE - PUBLIC -} - -""" -The set of valid sort keys for the AppInstallation query. -""" -enum AppInstallationSortKeys @componentName(name: "platform") { - """ - Sort by the `app_title` value. - """ - APP_TITLE - - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `installed_at` value. - """ - INSTALLED_AT -} - -""" -The pricing model for the app subscription. -The pricing model input can be either `appRecurringPricingDetails` or `appUsagePricingDetails`. -""" -input AppPlanInput @componentName(name: "billing") { - """ - The pricing details for recurring billing. - """ - appRecurringPricingDetails: AppRecurringPricingInput - - """ - The pricing details for usage-based billing. - """ - appUsagePricingDetails: AppUsagePricingInput -} - -""" -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 @componentName(name: "billing") { - """ - The plan billed to a shop on a recurring basis. - """ - pricingDetails: AppPricingDetails! -} - -""" -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. -""" -union AppPricingDetails @componentName(name: "billing") = AppRecurringPricing | AppUsagePricing - -""" -The frequency at which the shop is billed for an app subscription. -""" -enum AppPricingInterval @componentName(name: "billing") { - """ - The app subscription bills the shop annually. - """ - ANNUAL - - """ - The app subscription bills the shop every 30 days. - """ - EVERY_30_DAYS -} - -""" -The public-facing category for an app. -""" -enum AppPublicCategory @componentName(name: "apps") { - """ - The app's public category is [custom](https://shopify.dev/apps/distribution#capabilities-and-requirements). - """ - CUSTOM - - """ - 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). - """ - OTHER - - """ - The app's public category is [private](https://shopify.dev/apps/distribution#deprecated-app-types). - """ - PRIVATE - - """ - The app's public category is [public](https://shopify.dev/apps/distribution#capabilities-and-requirements). - """ - PUBLIC -} - -""" -Services and features purchased once by the store. -""" -interface AppPurchase @requiredAccess(scope: "The staff member must have permission to manage app billing or approve app charges if authenticated with an online access token as described in https:\/\/shopify.dev\/apps\/auth\/oauth\/access-modes.") @componentName(name: "billing") { - """ - The date and time when the app purchase occurred. - """ - createdAt: DateTime! - - """ - The name of the app purchase. - """ - name: String! - - """ - The amount to be charged to the store for the app purchase. - """ - price: MoneyV2! - - """ - The URL where the merchant is redirected after approving the app purchase. - """ - returnUrl: URL! - - """ - The status of the app purchase. - """ - status: AppPurchaseStatus! - - """ - Whether the app purchase is a test transaction. - """ - test: Boolean! -} - -""" -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 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 AppPurchaseOneTime implements AppPurchase & Node @requiredAccess(scope: "The staff member must have permission to manage app billing or approve app charges if authenticated with an online access token as described in https:\/\/shopify.dev\/apps\/auth\/oauth\/access-modes.") @componentName(name: "billing") { - """ - The date and time when the app purchase occurred. - """ - createdAt: DateTime! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The name of the app purchase. - """ - name: String! - - """ - The amount to be charged to the store for the app purchase. - """ - price: MoneyV2! - - """ - The URL where the merchant is redirected after approving the app purchase. - """ - returnUrl: URL! - - """ - The status of the app purchase. - """ - status: AppPurchaseStatus! - - """ - Whether the app purchase is a test transaction. - """ - test: Boolean! -} - -""" -An auto-generated type for paginating through multiple AppPurchaseOneTimes. -""" -type AppPurchaseOneTimeConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AppPurchaseOneTimeEdge!]! - - """ - 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. - """ - nodes: [AppPurchaseOneTime!]! - - """ - 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 `appPurchaseOneTimeCreate` mutation. -""" -type AppPurchaseOneTimeCreatePayload @componentName(name: "platform") { - """ - The newly created app one-time purchase. - """ - appPurchaseOneTime: AppPurchaseOneTime - - """ - The URL that the merchant can access to approve or decline the newly created app one-time purchase. - - 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. - """ - confirmationUrl: URL - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -An auto-generated type which holds one AppPurchaseOneTime and a cursor during pagination. -""" -type AppPurchaseOneTimeEdge @componentName(name: "billing") { - """ - 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 AppPurchaseOneTimeEdge. - """ - node: AppPurchaseOneTime! -} - -""" -The approval status of the app purchase. - -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 @componentName(name: "billing") { - """ - 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. - """ - ACCEPTED @deprecated(reason: "When a merchant accepts an app purchase, the status immediately changes from `pending` to `active`.") - - """ - 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. - """ - ACTIVE - - """ - The app purchase was declined by the merchant. - """ - DECLINED - - """ - The app purchase was not accepted within two days of being created. - """ - EXPIRED - - """ - The app purchase is pending approval by the merchant. - """ - 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 @componentName(name: "billing") { - """ - The discount applied to the subscription for a given number of billing intervals. - """ - discount: AppSubscriptionDiscount - - """ - The frequency at which the subscribing shop is billed for an app subscription. - """ - interval: AppPricingInterval! - - """ - The app store pricing plan handle. - """ - planHandle: String - - """ - The amount and currency to be charged to the subscribing shop every billing interval. - """ - 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 @componentName(name: "billing") { - """ - The discount applied to the subscription for a given number of billing intervals. - """ - discount: AppSubscriptionDiscountInput - - """ - How often the app subscription generates a charge. - """ - interval: AppPricingInterval = EVERY_30_DAYS - - """ - The amount to be charged to the store every billing interval. - """ - price: MoneyInput! -} - -""" -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. - -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. - -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 - -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. - -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 @requiredAccess(scope: "Access allowed for apps with `app_attributions` scope using offline tokens only. This API is under a private program and is not available to all partners.") @componentName(name: "billing") { - """ - The financial amount captured in this attribution. - """ - amount: MoneyV2! - - """ - The timestamp when the financial amount was captured. - """ - capturedAt: DateTime! - - """ - The timestamp at which this revenue attribution was issued. - """ - createdAt: DateTime! - - """ - A globally-unique ID. - """ - id: ID! - - """ - 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). - """ - idempotencyKey: String! - - """ - Indicates whether this is a test submission. - """ - test: Boolean! - - """ - The type of revenue attribution. - """ - type: AppRevenueAttributionType! -} - -""" -An auto-generated type for paginating through multiple AppRevenueAttributionRecords. -""" -type AppRevenueAttributionRecordConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AppRevenueAttributionRecordEdge!]! - - """ - 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. - """ - nodes: [AppRevenueAttributionRecord!]! - - """ - 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 AppRevenueAttributionRecord and a cursor during pagination. -""" -type AppRevenueAttributionRecordEdge @componentName(name: "billing") { - """ - 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 AppRevenueAttributionRecordEdge. - """ - node: AppRevenueAttributionRecord! -} - -""" -The set of valid sort keys for the AppRevenueAttributionRecord query. -""" -enum AppRevenueAttributionRecordSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -Represents the billing types of revenue attribution. -""" -enum AppRevenueAttributionType @componentName(name: "billing") { - """ - App purchase related revenue collection. - """ - APPLICATION_PURCHASE - - """ - App subscription revenue collection. - """ - APPLICATION_SUBSCRIPTION - - """ - App usage-based revenue collection. - """ - APPLICATION_USAGE - - """ - Other app revenue collection type. - """ - OTHER -} - -""" -Represents an error that happens while revoking a granted scope. -""" -type AppRevokeAccessScopesAppRevokeScopeError implements DisplayableError @componentName(name: "access_and_auth") { - """ - The error code. - """ - code: AppRevokeAccessScopesAppRevokeScopeErrorCode - - """ - 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 `AppRevokeAccessScopesAppRevokeScopeError`. -""" -enum AppRevokeAccessScopesAppRevokeScopeErrorCode @componentName(name: "platform") { - """ - The application cannot be found. - """ - APPLICATION_CANNOT_BE_FOUND - - """ - App is not installed on shop. - """ - APP_NOT_INSTALLED - - """ - Already granted implied scopes cannot be revoked. - """ - CANNOT_REVOKE_IMPLIED_SCOPES - - """ - Required scopes cannot be revoked. - """ - CANNOT_REVOKE_REQUIRED_SCOPES - - """ - Cannot revoke optional scopes that haven't been declared. - """ - CANNOT_REVOKE_UNDECLARED_SCOPES - - """ - No app found on the access token. - """ - MISSING_SOURCE_APP - - """ - The requested list of scopes to revoke includes invalid handles. - """ - UNKNOWN_SCOPES -} - -""" -Return type for `appRevokeAccessScopes` mutation. -""" -type AppRevokeAccessScopesPayload @componentName(name: "platform") { - """ - The list of scope handles that have been revoked. - """ - revoked: [AccessScope!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [AppRevokeAccessScopesAppRevokeScopeError!]! -} - -""" -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). - -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 AppSubscription implements Node @componentName(name: "billing") { - """ - The app the subscription is generating charges for. - """ - app: App! - - """ - The date and time when the app subscription was created. - """ - createdAt: DateTime! - - """ - The date and time when the current app subscription period ends. Returns `null` if the subscription isn't active. - """ - currentPeriodEnd: DateTime - - """ - A globally-unique ID. - """ - id: ID! - - """ - The plans attached to the app subscription. - """ - lineItems: [AppSubscriptionLineItem!]! - - """ - The name of the app subscription. - """ - name: String! - - """ - The URL that the merchant is redirected to after approving the app subscription. - """ - returnUrl: URL! - - """ - The status of the app subscription. - """ - status: AppSubscriptionStatus! - - """ - Specifies whether the app subscription is a test transaction. - """ - test: Boolean! - - """ - The number of free trial days, starting at the subscription's creation date, by which billing is delayed. - """ - trialDays: Int! -} - -""" -Return type for `appSubscriptionCancel` mutation. -""" -type AppSubscriptionCancelPayload @componentName(name: "platform") { - """ - The cancelled app subscription. - """ - appSubscription: AppSubscription - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -An auto-generated type for paginating through multiple AppSubscriptions. -""" -type AppSubscriptionConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AppSubscriptionEdge!]! - - """ - 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. - """ - nodes: [AppSubscription!]! - - """ - 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 `appSubscriptionCreate` mutation. -""" -type AppSubscriptionCreatePayload @componentName(name: "platform") { - """ - The newly-created app subscription. - """ - appSubscription: AppSubscription - - """ - The URL pointing to the page where the merchant approves or declines the charges for an app subscription. - """ - confirmationUrl: URL - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Discount applied to the recurring pricing portion of a subscription. -""" -type AppSubscriptionDiscount @componentName(name: "billing") { - """ - 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. - """ - durationLimitInIntervals: Int - - """ - The price of the subscription after the discount is applied. - """ - priceAfterDiscount: MoneyV2! - - """ - The remaining number of billing intervals to which the discount will be applied. - """ - remainingDurationInIntervals: Int - - """ - The value of the discount applied every billing interval. - """ - value: AppSubscriptionDiscountValue! -} - -""" -The fixed amount value of a discount. -""" -type AppSubscriptionDiscountAmount @componentName(name: "billing") { - """ - The fixed amount value of a discount. - """ - amount: MoneyV2! -} - -""" -The input fields to specify a discount to the recurring pricing portion of a -subscription over a number of billing intervals. -""" -input AppSubscriptionDiscountInput @componentName(name: "billing") { - """ - 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. - """ - durationLimitInIntervals: Int - - """ - The value to be discounted every billing interval. - """ - value: AppSubscriptionDiscountValueInput -} - -""" -The percentage value of a discount. -""" -type AppSubscriptionDiscountPercentage @componentName(name: "billing") { - """ - The percentage value of a discount. - """ - percentage: Float! -} - -""" -The value of the discount. -""" -union AppSubscriptionDiscountValue @componentName(name: "billing") = AppSubscriptionDiscountAmount | AppSubscriptionDiscountPercentage - -""" -The input fields to specify the value discounted every billing interval. -""" -input AppSubscriptionDiscountValueInput @componentName(name: "billing") { - """ - The monetary value of a discount. - """ - amount: Decimal - - """ - The percentage value of a discount. - """ - percentage: Float -} - -""" -An auto-generated type which holds one AppSubscription and a cursor during pagination. -""" -type AppSubscriptionEdge @componentName(name: "billing") { - """ - 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 AppSubscriptionEdge. - """ - node: AppSubscription! -} - -""" -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. - -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. - -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 - -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 @componentName(name: "billing") { - """ - A globally-unique ID. - """ - id: ID! - - """ - The pricing model for the app subscription. - """ - plan: AppPlanV2! - - """ - A list of the store's usage records for a usage pricing plan. - """ - usageRecords( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! -} - -""" -The input fields to add more than one pricing plan to an app subscription. -""" -input AppSubscriptionLineItemInput @componentName(name: "billing") { - """ - The pricing model for the app subscription. - """ - plan: AppPlanInput! -} - -""" -Return type for `appSubscriptionLineItemUpdate` mutation. -""" -type AppSubscriptionLineItemUpdatePayload @componentName(name: "platform") { - """ - The updated app subscription. - """ - appSubscription: AppSubscription - - """ - The URL where the merchant approves or declines the updated app subscription line item. - """ - confirmationUrl: URL - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -The replacement behavior when creating an app subscription for a merchant with an already existing app subscription. -""" -enum AppSubscriptionReplacementBehavior @componentName(name: "apps") { - """ - Cancels the merchant's current app subscription immediately and replaces it with the newly created app subscription. - """ - APPLY_IMMEDIATELY - - """ - 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. - """ - APPLY_ON_NEXT_BILLING_CYCLE - - """ - 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. - """ - STANDARD -} - -""" -The set of valid sort keys for the AppSubscription query. -""" -enum AppSubscriptionSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -The status of the app subscription. -""" -enum AppSubscriptionStatus @componentName(name: "billing") { - """ - The app subscription has been approved by the merchant and is ready to be activated by the app. - """ - ACCEPTED @deprecated(reason: "When a merchant approves an app subscription, the status immediately transitions from `pending` to `active`.") - - """ - The app subscription has been approved by the merchant. Active app - subscriptions are billed to the shop. After payment, partners receive payouts. - """ - ACTIVE - - """ - 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. - """ - CANCELLED - - """ - The app subscription was declined by the merchant. This is a terminal state. - """ - DECLINED - - """ - The app subscription wasn't approved by the merchant within two days of being created. This is a terminal state. - """ - EXPIRED - - """ - The app subscription is on hold due to non-payment. The subscription re-activates after payments resume. - """ - FROZEN - - """ - The app subscription is pending approval by the merchant. - """ - PENDING -} - -""" -Return type for `appSubscriptionTrialExtend` mutation. -""" -type AppSubscriptionTrialExtendPayload @componentName(name: "platform") { - """ - The app subscription that had its trial extended. - """ - appSubscription: AppSubscription - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [AppSubscriptionTrialExtendUserError!]! -} - -""" -An error that occurs during the execution of `AppSubscriptionTrialExtend`. -""" -type AppSubscriptionTrialExtendUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: AppSubscriptionTrialExtendUserErrorCode - - """ - 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 `AppSubscriptionTrialExtendUserError`. -""" -enum AppSubscriptionTrialExtendUserErrorCode @componentName(name: "platform") { - """ - The app subscription isn't active. - """ - SUBSCRIPTION_NOT_ACTIVE - - """ - The app subscription wasn't found. - """ - SUBSCRIPTION_NOT_FOUND - - """ - The trial isn't active. - """ - TRIAL_NOT_ACTIVE -} - -""" -The set of valid sort keys for the AppTransaction query. -""" -enum AppTransactionSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -Represents an error that happens while uninstalling an app. -""" -type AppUninstallAppUninstallError implements DisplayableError @componentName(name: "apps") { - """ - The error code. - """ - code: AppUninstallAppUninstallErrorCode - - """ - 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 `AppUninstallAppUninstallError`. -""" -enum AppUninstallAppUninstallErrorCode @componentName(name: "platform") { - """ - The app cannot be found. - """ - APP_NOT_FOUND - - """ - The app is not installed. - """ - APP_NOT_INSTALLED - - """ - An error occurred while uninstalling the app. - """ - APP_UNINSTALL_ERROR - - """ - User does not have sufficient permissions to uninstall this app. - """ - USER_PERMISSIONS_INSUFFICIENT -} - -""" -Return type for `appUninstall` mutation. -""" -type AppUninstallPayload @componentName(name: "platform") { - """ - The uninstalled app. - """ - app: App - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [AppUninstallAppUninstallError!]! -} - -""" -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 AppUsagePricing @componentName(name: "billing") { - """ - The total usage records for interval. - """ - balanceUsed: MoneyV2! - - """ - 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! - - """ - The frequency with which the app usage records are billed. - """ - interval: AppPricingInterval! - - """ - 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. - """ - terms: String! -} - -""" -The input fields to issue arbitrary charges for app usage associated with a subscription. -""" -input AppUsagePricingInput @componentName(name: "billing") { - """ - The maximum amount of usage charges that can be incurred within a subscription billing interval. - """ - cappedAmount: MoneyInput! - - """ - The terms and conditions for app usage. These terms stipulate the pricing model for the charges that an app creates. - """ - terms: String! -} - -""" -Store usage for app subscriptions with usage pricing. -""" -type AppUsageRecord implements Node @requiredAccess(scope: "The staff member must have permission to manage app billing or approve app charges if authenticated with an online access token as described in https:\/\/shopify.dev\/apps\/auth\/oauth\/access-modes.") @componentName(name: "billing") { - """ - The date and time when the usage record was created. - """ - createdAt: DateTime! - - """ - The description of the app usage record. - """ - description: String! - - """ - A globally-unique ID. - """ - id: ID! - - """ - A unique key generated by the client to avoid duplicate charges. - """ - idempotencyKey: String - - """ - The price of the usage record. - """ - price: MoneyV2! - - """ - Defines the usage pricing plan the merchant is subscribed to. - """ - subscriptionLineItem: AppSubscriptionLineItem! -} - -""" -An auto-generated type for paginating through multiple AppUsageRecords. -""" -type AppUsageRecordConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [AppUsageRecordEdge!]! - - """ - 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. - """ - nodes: [AppUsageRecord!]! - - """ - 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 `appUsageRecordCreate` mutation. -""" -type AppUsageRecordCreatePayload @componentName(name: "platform") { - """ - The newly created app usage record. - """ - appUsageRecord: AppUsageRecord - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -An auto-generated type which holds one AppUsageRecord and a cursor during pagination. -""" -type AppUsageRecordEdge @componentName(name: "billing") { - """ - 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 AppUsageRecordEdge. - """ - node: AppUsageRecord! -} - -""" -The set of valid sort keys for the AppUsageRecord query. -""" -enum AppUsageRecordSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -The Apple mobile platform application. -""" -type AppleApplication @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") @componentName(name: "mobile_support") { - """ - The iOS App Clip application ID. - """ - appClipApplicationId: String - - """ - Whether iOS App Clips are enabled for this app. - """ - appClipsEnabled: Boolean! - - """ - The iOS App ID. - """ - appId: String - - """ - A globally-unique ID. - """ - id: ID! - - """ - Whether iOS shared web credentials are enabled for this app. - """ - sharedWebCredentialsEnabled: Boolean! - - """ - Whether iOS Universal Links are supported by this app. - """ - universalLinksEnabled: Boolean! -} - -""" -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. - -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. -""" -type Article implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Navigable & Node @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { - """ - The name of the author of the article. - """ - author: ArticleAuthor - - """ - The blog containing the article. - """ - blog: Blog! - - """ - The text of the article's body, complete with HTML markup. - """ - body: HTML! - - """ - List of the article's comments. - """ - comments( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | published_status | string | Filter by published status | - `any`
- - `published`
- `unpublished` | | - `published_status:any`
- - `published_status:published`
- `published_status:unpublished` | - | status | string | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CommentConnection! - - """ - Count of comments. Limited to a maximum of 10000 by default. - """ - commentsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | published_status | string | Filter by published status | - `any`
- - `published`
- `unpublished` | | - `published_status:any`
- - `published_status:published`
- `published_status:unpublished` | - | status | string | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): Count @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") - - """ - The date and time (ISO 8601 format) when the article 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 paginated list of events associated with the host subject. - """ - events( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): EventConnection! - - """ - 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. - """ - handle: String! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The image associated with the article. - """ - image: Image - - """ - Whether or not the article 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - The date and time (ISO 8601 format) when the article became or will become visible. - Returns null when the article isn't visible. - """ - publishedAt: DateTime - - """ - 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. - """ - summary: HTML - - """ - A comma-separated list of tags. - Tags are additional short descriptors formatted as a string of comma-separated values. - """ - tags: [String!]! - - """ - 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`. - """ - templateSuffix: String - - """ - The title of the article. - """ - 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 @gidTypes(types: ["Market"]) - ): [Translation!]! - - """ - The date and time (ISO 8601 format) when the article was last updated. - """ - updatedAt: DateTime -} - -""" -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 ArticleAuthor @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { - """ - The author's full name. - """ - name: String! -} - -""" -An auto-generated type for paginating through multiple ArticleAuthors. -""" -type ArticleAuthorConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [ArticleAuthorEdge!]! - - """ - 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. - """ - nodes: [ArticleAuthor!]! - - """ - 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 ArticleAuthor and a cursor during pagination. -""" -type ArticleAuthorEdge @componentName(name: "online_store") { - """ - 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 ArticleAuthorEdge. - """ - node: ArticleAuthor! -} - -""" -The input fields of a blog when an article is created or updated. -""" -input ArticleBlogInput @componentName(name: "online_store") { - """ - The title of the blog. - """ - title: String! -} - -""" -An auto-generated type for paginating through multiple Articles. -""" -type ArticleConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [ArticleEdge!]! - - """ - 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. - """ - nodes: [Article!]! - - """ - 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 article. -""" -input ArticleCreateInput @componentName(name: "online_store") { - """ - The name of the author of the article. - """ - author: AuthorInput! - - """ - The ID of the blog containing the article. - """ - blogId: ID @gidTypes(types: ["Blog"]) - - """ - The text of the article's body, complete with HTML markup. - """ - body: HTML - - """ - 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. - """ - handle: String - - """ - The image associated with the article. - """ - image: ArticleImageInput - - """ - Whether or not the article should be visible. - """ - isPublished: Boolean - - """ - The input fields to create or update a metafield. - """ - metafields: [MetafieldInput!] - - """ - The date and time (ISO 8601 format) when the article should become visible. - """ - publishDate: DateTime - - """ - 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. - """ - summary: HTML - - """ - A comma-separated list of tags. - Tags are additional short descriptors formatted as a string of comma-separated values. - """ - tags: [String!] - - """ - 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. - """ - templateSuffix: String - - """ - The title of the article. - """ - title: String! -} - -""" -Return type for `articleCreate` mutation. -""" -type ArticleCreatePayload @componentName(name: "platform") { - """ - The article that was created. - """ - article: Article - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ArticleCreateUserError!]! -} - -""" -An error that occurs during the execution of `ArticleCreate`. -""" -type ArticleCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ArticleCreateUserErrorCode - - """ - 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 `ArticleCreateUserError`. -""" -enum ArticleCreateUserErrorCode @componentName(name: "platform") { - """ - Can't create an article author if both author name and user ID are supplied. - """ - AMBIGUOUS_AUTHOR - - """ - Can't create a blog from input if a blog ID is supplied. - """ - AMBIGUOUS_BLOG - - """ - Can't create an article if both author name and user ID are blank. - """ - AUTHOR_FIELD_REQUIRED - - """ - User must exist if a user ID is supplied. - """ - AUTHOR_MUST_EXIST - - """ - The input value is blank. - """ - BLANK - - """ - Must reference or create a blog when creating an article. - """ - BLOG_REFERENCE_REQUIRED - - """ - The input value is invalid. - """ - INVALID - - """ - Can’t set isPublished to true and also set a future publish date. - """ - INVALID_PUBLISH_DATE - - """ - The metafield type is invalid. - """ - INVALID_TYPE - - """ - The value is invalid for the metafield type or for the definition options. - """ - INVALID_VALUE - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - Image upload failed. - """ - UPLOAD_FAILED -} - -""" -Return type for `articleDelete` mutation. -""" -type ArticleDeletePayload @componentName(name: "platform") { - """ - The ID of the deleted article. - """ - deletedArticleId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ArticleDeleteUserError!]! -} - -""" -An error that occurs during the execution of `ArticleDelete`. -""" -type ArticleDeleteUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ArticleDeleteUserErrorCode - - """ - 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 `ArticleDeleteUserError`. -""" -enum ArticleDeleteUserErrorCode @componentName(name: "platform") { - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -An auto-generated type which holds one Article and a cursor during pagination. -""" -type ArticleEdge @componentName(name: "online_store") { - """ - 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. - """ - node: Article! -} - -""" -The input fields for an image associated with an article. -""" -input ArticleImageInput @componentName(name: "online_store") { - """ - A word or phrase to share the nature or contents of an image. - """ - altText: String - - """ - The URL of the image. - """ - url: String -} - -""" -The set of valid sort keys for the Article query. -""" -enum ArticleSortKeys @componentName(name: "platform") { - """ - Sort by the `author` value. - """ - AUTHOR - - """ - Sort by the `blog_title` value. - """ - BLOG_TITLE - - """ - 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 -} - -""" -Possible sort of tags. -""" -enum ArticleTagSort @componentName(name: "online_store") { - """ - Sort alphabetically.. - """ - ALPHABETICAL - - """ - Sort by popularity, starting with the most popular tag. - """ - POPULAR -} - -""" -The input fields to update an article. -""" -input ArticleUpdateInput @componentName(name: "online_store") { - """ - The name of the author of the article. - """ - author: AuthorInput - - """ - The ID of the blog containing the article. - """ - blogId: ID @gidTypes(types: ["Blog"]) - - """ - The text of the article's body, complete with HTML markup. - """ - body: HTML - - """ - 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. - """ - handle: String - - """ - The image associated with the article. - """ - image: ArticleImageInput - - """ - Whether or not the article should be visible. - """ - isPublished: Boolean - - """ - The input fields to create or update a metafield. - """ - metafields: [MetafieldInput!] - - """ - The date and time (ISO 8601 format) when the article should become visible. - """ - publishDate: DateTime - - """ - 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 - - """ - 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. - """ - summary: HTML - - """ - A comma-separated list of tags. - Tags are additional short descriptors formatted as a string of comma-separated values. - """ - tags: [String!] - - """ - 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. - """ - templateSuffix: String - - """ - The title of the article. - """ - title: String -} - -""" -Return type for `articleUpdate` mutation. -""" -type ArticleUpdatePayload @componentName(name: "platform") { - """ - The article that was updated. - """ - article: Article - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ArticleUpdateUserError!]! -} - -""" -An error that occurs during the execution of `ArticleUpdate`. -""" -type ArticleUpdateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ArticleUpdateUserErrorCode - - """ - 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 `ArticleUpdateUserError`. -""" -enum ArticleUpdateUserErrorCode @componentName(name: "platform") { - """ - Can't update an article author if both author name and user ID are supplied. - """ - AMBIGUOUS_AUTHOR - - """ - Can't create a blog from input if a blog ID is supplied. - """ - AMBIGUOUS_BLOG - - """ - User must exist if a user ID is supplied. - """ - AUTHOR_MUST_EXIST - - """ - The input value is blank. - """ - BLANK - - """ - The input value is invalid. - """ - INVALID - - """ - Can’t set isPublished to true and also set a future publish date. - """ - INVALID_PUBLISH_DATE - - """ - The metafield type is invalid. - """ - INVALID_TYPE - - """ - The value is invalid for the metafield type or for the definition options. - """ - INVALID_VALUE - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - Image upload failed. - """ - UPLOAD_FAILED -} - -""" -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 Attribute @componentName(name: "platform") { - """ - The key or name of the attribute. For example, `"customer_first_order"`. - """ - key: String! - - """ - The value of the attribute. For example, `"true"`. - """ - value: String -} - -""" -The input fields for an attribute. -""" -input AttributeInput @componentName(name: "platform") { - """ - Key or name of the attribute. - """ - key: String! - - """ - Value of the attribute. - """ - value: String! -} - -""" -The intended audience for the order status page. -""" -enum Audience @componentName(name: "sales") { - """ - Intended for customer notifications. - """ - CUSTOMERVIEW - - """ - Intended for merchant wanting to preview the order status page. Should be used immediately after querying. - """ - MERCHANTVIEW -} - -""" -The input fields for an author. Either the `name` or `user_id` fields can be supplied, but never both. -""" -input AuthorInput @componentName(name: "online_store") { - """ - The author's full name. - """ - name: String - - """ - The ID of a staff member's account. - """ - userId: ID @gidTypes(types: ["StaffMember"]) -} - -""" -Automatic discount applications capture the intentions of a discount that was automatically applied. -""" -type AutomaticDiscountApplication implements DiscountApplication @componentName(name: "sales") { - """ - 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 title of the discount application. - """ - title: String! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -The set of valid sort keys for the AutomaticDiscount query. -""" -enum AutomaticDiscountSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -Represents an object containing all information for channels available to a shop. -""" -type AvailableChannelDefinitionsByChannel @componentName(name: "channels") { - """ - The channel definitions for channels installed on a shop. - """ - channelDefinitions: [ChannelDefinition!]! - - """ - The name of the channel. - """ - channelName: String! -} - -""" -The entitlements for B2B. -""" -type B2BType @componentName(name: "billing") { - """ - Whether B2B is enabled. - """ - enabled: Boolean! -} - -""" -The input fields for updating a backup region with exactly one required option. -""" -input BackupRegionUpdateInput @componentName(name: "markets") { - """ - A country code for the backup region. - """ - countryCode: CountryCode! -} - -""" -Return type for `backupRegionUpdate` mutation. -""" -type BackupRegionUpdatePayload @componentName(name: "platform") { - """ - Returns the updated backup region. - """ - backupRegion: MarketRegion - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MarketUserError!]! -} - -""" -The possible types for a badge. -""" -enum BadgeType @componentName(name: "merchant_marketing") { - """ - This badge has type `attention`. - """ - ATTENTION - - """ - This badge has type `critical`. - """ - CRITICAL - - """ - This badge has type `default`. - """ - DEFAULT - - """ - This badge has type `info`. - """ - INFO - - """ - This badge has type `success`. - """ - SUCCESS - - """ - This badge has type `warning`. - """ - WARNING -} - -""" -Shopify Balance account details. -""" -type BalanceAccount @requiredAccess(scope: "`read_shopify_balance_accounts_information` access scope. Also: The user must have app permission for finance apps.") @componentName(name: "banking") { - """ - The shop's Shopify Balance accounts information. - """ - bankAccounts: [BalanceBankAccount!]! -} - -""" -A Shopify Balance bank account. -""" -type BalanceBankAccount @requiredAccess(scope: "`read_shopify_balance_accounts_information` access scope. Also: The user must have app permission for finance apps.") @componentName(name: "banking") { - """ - The account's account number. - """ - accountNumber: String! - - """ - The account's available balance. - """ - availableBalance: MoneyV2! - - """ - The account's ID. - """ - id: ID! - - """ - The account's nickname. - """ - nickname: String - - """ - Whether the account is the primary account. - """ - primary: Boolean! - - """ - The account's routing number. - """ - routingNumber: String! - - """ - The account's status. - """ - status: Status! -} - -""" -The set of valid sort keys for the BalanceTransaction query. -""" -enum BalanceTransactionSortKeys @componentName(name: "platform") { - """ - Sort by the `amount` value. - """ - AMOUNT - - """ - Sort by the `fee` value. - """ - FEE - - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `net` value. - """ - NET - - """ - Sort by the `order_name` value. - """ - ORDER_NAME - - """ - Sort by the `payment_method_name` value. - """ - PAYMENT_METHOD_NAME - - """ - Sort by the `payout_date` value. - """ - PAYOUT_DATE - - """ - Sort by the `payout_status` value. - """ - PAYOUT_STATUS - - """ - Sort by the `processed_at` value. - """ - PROCESSED_AT - - """ - Sort by the `transaction_type` value. - """ - TRANSACTION_TYPE -} - -""" -Represents a bank account payment instrument. -""" -type BankAccount @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - The type of account holder. - """ - accountHolderType: BankAccountHolderType! - - """ - The type of bank account. - """ - accountType: BankAccountType! - - """ - The name of the bank. - """ - bankName: String! - - """ - The billing address associated with the bank account. - """ - billingAddress: CustomerPaymentInstrumentBillingAddress - - """ - The last four digits of the account number. - """ - lastDigits: String! -} - -""" -The type of bank account holder. -""" -enum BankAccountHolderType @componentName(name: "payments") { - """ - A company account holder. - """ - COMPANY - - """ - An individual account holder. - """ - INDIVIDUAL -} - -""" -The type of bank account. -""" -enum BankAccountType @componentName(name: "payments") { - """ - A checking account. - """ - CHECKING - - """ - A savings account. - """ - SAVINGS -} - -""" -The valid types of actions a user should be able to perform in an financial app. -""" -enum BankingFinanceAppAccess @componentName(name: "banking") { - """ - Indication that the user has blocked money movement due to MFA disabled. - """ - MONEY_MOVEMENT_BLOCKED_MFA - - """ - Indication that the user has restricted money movement. - """ - MONEY_MOVEMENT_RESTRICTED - - """ - Ability to perform actions that moves money. - """ - MOVE_MONEY - - """ - Read access in the financial app. - """ - READ_ACCESS -} - -""" -Generic payment details that are related to a transaction. -""" -interface BasePaymentDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") { - """ - The name of payment method used by the buyer. - """ - paymentMethodName: String -} - -""" -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 @componentName(name: "platform") { - """ - The action that occured. - """ - action: String! - - """ - Provides additional content for collapsible timeline events. - """ - additionalContent: JSON - - """ - Provides additional data for event consumers. - """ - additionalData: JSON - - """ - The name of the app that created the event. - """ - appTitle: String - - """ - Refers to a certain event and its resources. - """ - arguments: JSON - - """ - Whether the event was created by an app. - """ - attributeToApp: Boolean! - - """ - Whether the event was caused by an admin user. - """ - attributeToUser: Boolean! - - """ - The entity which performed the action that generated the event. - """ - author: String - - """ - The date and time when the event was created. - """ - createdAt: DateTime! - - """ - Whether the event is critical. - """ - criticalAlert: Boolean! - - """ - Whether this event has additional content. - """ - hasAdditionalContent: Boolean! - - """ - A globally-unique ID. - """ - id: ID! - - """ - Human readable text that describes the event. - """ - message: FormattedString! - - """ - Human readable text that supports the event message. - """ - secondaryMessage: FormattedString - - """ - 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). - """ - subject: HasEvents - - """ - The ID of the resource that generated the event. - """ - subjectId: ID! - - """ - The type of the resource that generated the event. - """ - 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 @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error code. - """ - code: BillingAttemptUserErrorCode - - """ - 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 `BillingAttemptUserError`. -""" -enum BillingAttemptUserErrorCode @componentName(name: "platform") { - """ - Billing cycle charge attempt made more than 24 hours before the billing cycle `billingAttemptExpectedDate`. - """ - BILLING_CYCLE_CHARGE_BEFORE_EXPECTED_DATE - - """ - Billing cycle must not be skipped. - """ - BILLING_CYCLE_SKIPPED - - """ - The input value is blank. - """ - BLANK - - """ - Subscription contract does not exist. - """ - CONTRACT_NOT_FOUND - - """ - Subscription contract cannot be billed if paused. - """ - CONTRACT_PAUSED - - """ - Subscription contract cannot be billed once terminated. - """ - CONTRACT_TERMINATED - - """ - Subscription contract is under review, origin order is high risk and unfulfilled. - """ - CONTRACT_UNDER_REVIEW - - """ - Billing cycle selector cannot select billing cycle outside of index range. - """ - CYCLE_INDEX_OUT_OF_RANGE - - """ - Billing cycle selector cannot select billing cycle outside of start date range. - """ - CYCLE_START_DATE_OUT_OF_RANGE - - """ - The input value is invalid. - """ - INVALID - - """ - Origin time cannot be before the contract creation time. - """ - ORIGIN_TIME_BEFORE_CONTRACT_CREATION - - """ - Origin time needs to be within the selected billing cycle's start and end at date. - """ - ORIGIN_TIME_OUT_OF_RANGE - - """ - Failed to process the billing attempt. - """ - PROCESSING_FAILED - - """ - Billing attempt rate limit exceeded - try later. - """ - THROTTLED - - """ - Billing cycle selector cannot select upcoming billing cycle past limit. - """ - UPCOMING_CYCLE_LIMIT_EXCEEDED -} - -""" -A feature definition for a plan that is marketed. -""" -type BillingPlanFeature @componentName(name: "billing") @privatelyDocumented { - """ - Description of the feature. - """ - description: String! - - """ - Whether the feature requires Shopify Payments to be enabled. - """ - requiresShopifyPayments: Boolean! - - """ - A summary of the feature. - """ - summary: String! - - """ - The type of feature. - """ - type: String! - - """ - The scalar value for the feature. - """ - values: [BillingPlanFeatureValue!]! -} - -""" -A section on the plan feature grid. -""" -type BillingPlanFeatureSection @componentName(name: "billing") @privatelyDocumented { - """ - The category in which a group of features belongs to. - """ - featureCategory: String! - - """ - The set of features. - """ - features: [BillingPlanFeature!]! - - """ - Title to display for section. - """ - title: String! -} - -""" -A key value pair for a feature with its plan name and value. -""" -type BillingPlanFeatureValue @componentName(name: "billing") @privatelyDocumented { - """ - Plan name to which the feature belongs. - """ - planName: String! - - """ - The value for the feature. - """ - value: JSON! - - """ - The optional value type for this feature value. - """ - valueType: BillingPlanFeatureValueType -} - -""" -The type of a plan feature value. -""" -enum BillingPlanFeatureValueType @componentName(name: "billing") { - """ - An optional add-on value. - """ - ADD_ON -} - -""" -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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { - """ - List of the blog's articles. - """ - articles( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ArticleConnection! - - """ - Count of articles. Limited to a maximum of 10000 by default. - """ - articlesCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - ): Count @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") - - """ - Indicates whether readers can post comments to the blog and if comments are moderated or not. - """ - commentPolicy: CommentPolicy! - - """ - The date and time when the blog was created. - """ - createdAt: DateTime! - - """ - The paginated list of events associated with the host subject. - """ - events( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): EventConnection! - - """ - FeedBurner provider details. Any blogs that aren't already integrated with FeedBurner can't use the service. - """ - feed: BlogFeed - - """ - 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! - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - A list of tags associated with the 200 most recent blog articles. - """ - tags: [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 - - """ - The title of the blog. - """ - 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 @gidTypes(types: ["Market"]) - ): [Translation!]! - - """ - The date and time when the blog was update. - """ - updatedAt: DateTime -} - -""" -An auto-generated type for paginating through multiple Blogs. -""" -type BlogConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [BlogEdge!]! - - """ - 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. - """ - 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 @componentName(name: "online_store") { - """ - Indicates whether readers can post comments to the blog and whether comments are moderated. - """ - commentPolicy: CommentPolicy - - """ - 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 - - """ - Attaches additional metadata to a store's resources. - """ - metafields: [MetafieldInput!] - - """ - 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 - - """ - The title of the blog. - """ - title: String! -} - -""" -Return type for `blogCreate` mutation. -""" -type BlogCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - The input value is invalid. - """ - INVALID - - """ - The metafield type is invalid. - """ - INVALID_TYPE - - """ - The value is invalid for the metafield type or for the definition options. - """ - INVALID_VALUE - - """ - The input value is too long. - """ - TOO_LONG -} - -""" -Return type for `blogDelete` mutation. -""" -type BlogDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { - """ - Blog feed provider url. - """ - location: URL! - - """ - Blog feed provider path. - """ - path: String! -} - -""" -The set of valid sort keys for the Blog query. -""" -enum BlogSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - Indicates whether readers can post comments to the blog and whether comments are moderated. - """ - commentPolicy: CommentPolicy - - """ - 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 - - """ - Attaches additional metadata to a store's resources. - """ - metafields: [MetafieldInput!] - - """ - Whether to redirect blog posts automatically. - """ - redirectArticles: Boolean = false - - """ - 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 - - """ - 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 - - """ - The title of the blog. - """ - title: String -} - -""" -Return type for `blogUpdate` mutation. -""" -type BlogUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - 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 -} - -""" -Return type for `bulkDiscountResourceFeedbackCreate` mutation. -""" -type BulkDiscountResourceFeedbackCreatePayload @componentName(name: "platform") { - """ - The feedback that's created. - """ - feedback: [DiscountResourceFeedback!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [BulkDiscountResourceFeedbackCreateUserError!]! -} - -""" -An error that occurs during the execution of `BulkDiscountResourceFeedbackCreate`. -""" -type BulkDiscountResourceFeedbackCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: BulkDiscountResourceFeedbackCreateUserErrorCode - - """ - 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 `BulkDiscountResourceFeedbackCreateUserError`. -""" -enum BulkDiscountResourceFeedbackCreateUserErrorCode @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - The discount wasn't found or isn't available to the channel. - """ - DISCOUNT_NOT_FOUND - - """ - 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 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 input value needs to be blank. - """ - PRESENT -} - -""" -Possible error codes that can be returned by `BulkMutationUserError`. -""" -enum BulkMutationErrorCode @componentName(name: "platform") { - """ - 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 - - """ - 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 - - """ - Bulk operations limit reached. Please try again later. - """ - LIMIT_REACHED - - """ - 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 - - """ - 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 -} - -""" -Represents an error that happens during execution of a bulk mutation. -""" -type BulkMutationUserError implements DisplayableError @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Only accessible by supported access tokens: https:\/\/shopify.dev\/docs\/api\/usage\/bulk-operations\/queries#access-token-considerations.") @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The bulk operation is a mutation. - """ - MUTATION - - """ - The bulk operation is a query. - """ - QUERY -} - -""" -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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - Bulk operations limit reached. Please try again later. - """ - LIMIT_REACHED - - """ - A bulk operation is already in progress. - """ - OPERATION_IN_PROGRESS -} - -""" -The set of valid sort keys for the BulkOperations query. -""" -enum BulkOperationsSortKeys @componentName(name: "platform") { - """ - Sort by the `completed_at` value. - """ - COMPLETED_AT - - """ - Sort by the `created_at` value. - """ - CREATED_AT -} - -""" -Return type for `bulkProductResourceFeedbackCreate` mutation. -""" -type BulkProductResourceFeedbackCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - 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 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 channel was not found or does not belong to this app. - """ - NOT_FOUND - - """ - The feedback for a later version of this resource was already accepted. - """ - OUTDATED_FEEDBACK - - """ - The input value needs to be blank. - """ - PRESENT - - """ - The product wasn't found or isn't available to the channel. - """ - PRODUCT_NOT_FOUND -} - -""" -The input fields representing the components of a bundle line item. -""" -input BundlesDraftOrderBundleLineItemComponentInput @componentName(name: "draft_orders") { - """ - 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 - - """ - The ID of the product variant corresponding to the bundle component. - """ - variantId: ID @gidTypes(types: ["ProductVariant"]) -} - -""" -Represents the Bundles feature configuration for the shop. -""" -type BundlesFeature @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - Deleting the resource failed. - """ - FAILED_TO_DELETE - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - The input is invalid. - """ - INVALID_INPUT - - """ - The number of resources exceeded the limit. - """ - LIMIT_REACHED - - """ - The input is empty. - """ - NO_INPUT - - """ - Missing a required field. - """ - REQUIRED - - """ - The resource wasn't found. - """ - RESOURCE_NOT_FOUND - - """ - The input value is already taken. - """ - TAKEN - - """ - The field value is too long. - """ - TOO_LONG - - """ - Unexpected type. - """ - UNEXPECTED_TYPE -} - -""" -An error that happens during the execution of a business customer mutation. -""" -type BusinessCustomerUserError implements DisplayableError @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope.") @componentName(name: "business_customers") { - """ - 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 @componentName(name: "shop_identity") { - """ - 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! - - """ - The stable central legal entity ID associated with this business entity. - """ - legalEntityId: BigInt - - """ - 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 @accessRestricted(reason: "Requires the `read_shopify_payments` approval scope.") -} - -""" -Represents the address of a merchant's Business Entity. -""" -type BusinessEntityAddress @componentName(name: "shop_identity") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - Whether to checkout to draft order for merchant review. - """ - checkoutToDraft: Boolean - - """ - The input fields configuring the deposit a B2B buyer. - """ - deposit: DepositInput - - """ - Whether to allow customers to edit their shipping address at checkout. - """ - editableShippingAddress: Boolean - - """ - Represents the merchant configured payment terms. - """ - paymentTermsTemplateId: ID @gidTypes(types: ["PaymentTermsTemplate"]) -} - -""" -The input fields for a buyer signal. -""" -input BuyerSignalInput @componentName(name: "markets") { - """ - The country code of the buyer. - """ - countryCode: CountryCode! - - """ - The province or state code. - """ - province: String -} - -""" -The input fields for exchange line items on a calculated return. -""" -input CalculateExchangeLineItemInput @componentName(name: "returns") { - """ - The discount to be applied to the exchange line item. - """ - appliedDiscount: ExchangeLineItemAppliedDiscountInput - - """ - The quantity of the item to be added. - """ - quantity: Int! - - """ - The ID of the product variant to be added to the order as part of an exchange. - """ - variantId: ID @gidTypes(types: ["ProductVariant"]) -} - -""" -The input fields to calculate return amounts associated with an order. -""" -input CalculateReturnInput @componentName(name: "returns") { - """ - The exchange line items to add to the order. - """ - exchangeLineItems: [CalculateExchangeLineItemInput!] = [] - - """ - The ID of the order that will be returned. - """ - orderId: ID! @gidTypes(types: ["Order"]) - - """ - The line items from the order to include in the return. - """ - returnLineItems: [CalculateReturnLineItemInput!] = [] - - """ - The return shipping fee associated with the return. - """ - returnShippingFee: ReturnShippingFeeInput -} - -""" -The input fields for return line items on a calculated return. -""" -input CalculateReturnLineItemInput @componentName(name: "returns") { - """ - The ID of the fulfillment line item to be returned. - """ - fulfillmentLineItemId: ID! @gidTypes(types: ["FulfillmentLineItem"]) - - """ - The quantity of the item to be returned. - """ - quantity: Int! - - """ - The restocking fee for the return line item. - """ - restockingFee: RestockingFeeInput -} - -""" -A discount that is automatically applied to an order that is being edited. -""" -type CalculatedAutomaticDiscountApplication implements CalculatedDiscountApplication @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope or `read_returns` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope or `read_returns` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") @protectedObject(subject: "customer") { - """ - 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! - - """ - The amount due later. - When there are payment terms, this is the total price minus the deposit amount (if any). - When there are no payment terms, this is 0. - """ - amountDueLaterSet: MoneyBag! - - """ - The amount due now. - When there are payment terms this is the value of the deposit (0 by default). - When there are no payment terms, this is the total price. - """ - amountDueNowSet: MoneyBag! - - """ - 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 - - """ - The portion required to be paid at checkout. - """ - deposit: DepositConfiguration - - """ - 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 @protectedField(subject: "customer", content: "phone") - - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") @protectedObject(subject: "customer") { - """ - 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 source of the line item's merchandise information. - """ - merchandiseSource: DraftOrderLineItemMerchandiseSourceType! - - """ - 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 ID of the variant associated with the line item. Will still be returned even if the variant has been - deleted since the draft was created or last updated. - """ - variantId: ID - - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 - - """ - The weight unit and value of the line item. - """ - weight: Weight -} - -""" -An auto-generated type for paginating through multiple CalculatedLineItems. -""" -type CalculatedLineItemConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope or `read_returns` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - Returns only the new discount applications being added to the order in the current edit. - """ - addedDiscountApplications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | editable | boolean | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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!]! - - """ - Duties charged on the order. - """ - totalDuties: TotalDuties - - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - The shipping line was added as part of the current order edit. - """ - ADDED - - """ - The shipping line has no staged changes associated with it. - """ - NONE - - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Carrier service creation failed. - """ - CARRIER_SERVICE_CREATE_FAILED -} - -""" -Return type for `carrierServiceDelete` mutation. -""" -type CarrierServiceDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Carrier service deletion failed. - """ - CARRIER_SERVICE_DELETE_FAILED -} - -""" -The set of valid sort keys for the CarrierService query. -""" -enum CarrierServiceSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_cart_transforms` access scope.") @componentName(name: "merchandising") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! -} - -""" -An auto-generated type for paginating through multiple CartTransforms. -""" -type CartTransformConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - No Shopify Function found for provided function_id. - """ - FUNCTION_NOT_FOUND - - """ - Failed to create cart transform due to invalid input. - """ - INPUT_INVALID - - """ - 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 -} - -""" -Return type for `cartTransformDelete` mutation. -""" -type CartTransformDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "shop_identity") { - """ - The cart transform operations eligible for the shop. - """ - eligibleOperations: CartTransformEligibleOperations! -} - -""" -The set of valid sort keys for the CashActivities query. -""" -enum CashActivitiesSortKeys @componentName(name: "platform") { - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `time` value. - """ - TIME -} - -""" -An activity on a cash drawer. -""" -interface CashActivity @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The amount of cash added or removed as part of the activity. - """ - cash: MoneyV2! - - """ - The point of sale device payment session associated with the activity. - """ - paymentSession: PointOfSaleDevicePaymentSession! - - """ - The staff member who performed the activity. - """ - staffMember: StaffMember! - - """ - The time at which the activity occurred. - """ - time: DateTime! -} - -""" -An auto-generated type for paginating through multiple CashActivities. -""" -type CashActivityConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [CashActivityEdge!]! - - """ - A list of nodes that are contained in CashActivityEdge. 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: [CashActivity!]! - - """ - 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 CashActivity and a cursor during pagination. -""" -type CashActivityEdge @componentName(name: "retail") { - """ - 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 CashActivityEdge. - """ - node: CashActivity! -} - -""" -A cash adjustment activity. -""" -type CashAdjustmentActivity implements CashActivity @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The amount of cash added or removed as part of the activity. - """ - cash: MoneyV2! - - """ - The gift card associated with the activity. - """ - giftCard: GiftCard - - """ - A note associated with the activity. - """ - note: String - - """ - The point of sale device payment session associated with the activity. - """ - paymentSession: PointOfSaleDevicePaymentSession! - - """ - The reason code for the activity. - """ - reasonCode: CashManagementReasonCode - - """ - The staff member who performed the activity. - """ - staffMember: StaffMember! - - """ - The time at which the activity occurred. - """ - time: DateTime! - - """ - The type of adjustment activity. - """ - type: CashAdjustmentActivityType! -} - -""" -The type of adjustment activity. -""" -enum CashAdjustmentActivityType @componentName(name: "retail") { - """ - A manual cash adjustment. - """ - ADJUSTMENT - - """ - A cash payout, such as a gift card cash out. - """ - CASH_PAYOUT - - """ - A closing adjustment. - """ - CLOSING_ADJUSTMENT -} - -""" -A cash count activity. -""" -type CashCountActivity implements CashActivity @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The amount of cash added or removed as part of the activity. - """ - cash: MoneyV2! - - """ - The amount of cash counted during the activity. - """ - cashCounted: MoneyV2! - - """ - The discrepancy between the counted and expected cash amounts. - """ - cashDiscrepancy: MoneyV2! - - """ - The expected amount of cash in the drawer at the time of the activity. - """ - cashExpected: MoneyV2! - - """ - A note associated with the activity. - """ - note: String - - """ - The point of sale device payment session associated with the activity. - """ - paymentSession: PointOfSaleDevicePaymentSession! - - """ - The reason code for the activity. - """ - reasonCode: CashManagementReasonCode - - """ - The staff member who performed the activity. - """ - staffMember: StaffMember! - - """ - The time at which the activity occurred. - """ - time: DateTime! - - """ - The type of count activity. - """ - type: CashCountActivityType! -} - -""" -The type of count activity. -""" -enum CashCountActivityType @componentName(name: "retail") { - """ - A count performed at the closing of a session. - """ - CLOSING - - """ - A count performed during a session. - """ - MID_SESSION - - """ - A count performed at the opening of a session. - """ - OPENING -} - -""" -A cash drawer for cash management. -""" -type CashDrawer implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The current balance in the cash drawer. - """ - balance: MoneyV2! - - """ - The activities on the cash drawer. - """ - cashActivities( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | type | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CashActivitiesSortKeys = TIME - - """ - Filter activities by staff member. - """ - staffMemberId: ID @gidTypes(types: ["StaffMember"]) - ): CashActivityConnection! - - """ - A unique ID for the cash drawer. - """ - id: ID! - - """ - The location of the cash drawer. - """ - location: Location! - - """ - The name of the cash drawer. - """ - name: String! - - """ - The net sales for this cash drawer. - """ - netSales( - """ - The date and time range for filtering net sales. - """ - dateRange: CashDrawerDateRangeInput! - ): MoneyV2! - - """ - The Point of Sale devices assigned to this cash drawer. - """ - pointOfSaleDevices( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - ): PointOfSaleDeviceConnection - - """ - The total adjustments for this cash drawer. - """ - totalAdjustments( - """ - The date and time range for filtering adjustments. - """ - dateRange: CashDrawerDateRangeInput! - ): MoneyV2! - - """ - The total discrepancies for this cash drawer. - """ - totalDiscrepancies( - """ - The date and time range for filtering discrepancies. - """ - dateRange: CashDrawerDateRangeInput! - ): MoneyV2! - - """ - The total refunds for this cash drawer. - """ - totalRefunds( - """ - The date and time range for filtering refunds. - """ - dateRange: CashDrawerDateRangeInput! - ): MoneyV2! - - """ - The total sales for this cash drawer. - """ - totalSales( - """ - The date and time range for filtering sales. - """ - dateRange: CashDrawerDateRangeInput! - ): MoneyV2! -} - -""" -An auto-generated type for paginating through multiple CashDrawers. -""" -type CashDrawerConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [CashDrawerEdge!]! - - """ - A list of nodes that are contained in CashDrawerEdge. 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: [CashDrawer!]! - - """ - 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 `cashDrawerCreate` mutation. -""" -type CashDrawerCreatePayload @componentName(name: "platform") { - """ - The created cash drawer. - """ - cashDrawer: CashDrawer - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [CashDrawerCreateUserError!]! -} - -""" -An error that occurs during the execution of `CashDrawerCreate`. -""" -type CashDrawerCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: CashDrawerCreateUserErrorCode - - """ - 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 `CashDrawerCreateUserError`. -""" -enum CashDrawerCreateUserErrorCode @componentName(name: "platform") { - """ - A cash drawer with this name already exists at the specified location. - """ - CASH_DRAWER_ALREADY_EXISTS - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The name provided is invalid. - """ - INVALID_NAME - - """ - The location was not found. - """ - LOCATION_NOT_FOUND - - """ - Failed to create cash drawer. - """ - NOT_SAVED -} - -""" -The input fields for date and time range filter. -""" -input CashDrawerDateRangeInput @componentName(name: "retail") { - """ - The start of the date and time range. - """ - from: DateTime! - - """ - The end of the date and time range. - """ - to: DateTime! -} - -""" -An auto-generated type which holds one CashDrawer and a cursor during pagination. -""" -type CashDrawerEdge @componentName(name: "retail") { - """ - 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 CashDrawerEdge. - """ - node: CashDrawer! -} - -""" -Return type for `cashDrawerFindOrCreate` mutation. -""" -type CashDrawerFindOrCreatePayload @componentName(name: "platform") { - """ - The cash drawer. - """ - cashDrawer: CashDrawer - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [CashDrawerFindOrCreateUserError!]! -} - -""" -An error that occurs during the execution of `CashDrawerFindOrCreate`. -""" -type CashDrawerFindOrCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: CashDrawerFindOrCreateUserErrorCode - - """ - 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 `CashDrawerFindOrCreateUserError`. -""" -enum CashDrawerFindOrCreateUserErrorCode @componentName(name: "platform") { - """ - The cash drawer assignment already exists. - """ - CASH_DRAWER_ASSIGNMENT_ALREADY_EXISTS - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The location was not found. - """ - LOCATION_NOT_FOUND - - """ - Failed to find or create cash drawer. - """ - NOT_SAVED - - """ - The point of sale device was not found. - """ - POINT_OF_SALE_DEVICE_NOT_FOUND -} - -""" -The input fields for updating a cash drawer. -""" -input CashDrawerUpdateInput @componentName(name: "retail") { - """ - The new name for the cash drawer. - """ - name: String! -} - -""" -Return type for `cashDrawerUpdate` mutation. -""" -type CashDrawerUpdatePayload @componentName(name: "platform") { - """ - The updated cash drawer. - """ - cashDrawer: CashDrawer - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [CashDrawerUpdateUserError!]! -} - -""" -An error that occurs during the execution of `CashDrawerUpdate`. -""" -type CashDrawerUpdateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: CashDrawerUpdateUserErrorCode - - """ - 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 `CashDrawerUpdateUserError`. -""" -enum CashDrawerUpdateUserErrorCode @componentName(name: "platform") { - """ - A cash drawer with this name already exists at the specified location. - """ - CASH_DRAWER_ALREADY_EXISTS - - """ - The cash drawer was not found. - """ - CASH_DRAWER_NOT_FOUND - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The name provided is invalid. - """ - INVALID_NAME - - """ - Failed to update cash drawer. - """ - NOT_SAVED -} - -""" -Custom reason code. -""" -type CashManagementCustomReasonCode implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The code for the custom reason code. - """ - code: String! - - """ - A globally-unique ID. - """ - id: ID! -} - -""" -Default reason code. -""" -type CashManagementDefaultReasonCode implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The code for the default reason code. - """ - code: CashManagementDefaultReasonCodeEnum! - - """ - A globally-unique ID. - """ - id: ID! -} - -""" -Default reason codes for cash management. -""" -enum CashManagementDefaultReasonCodeEnum @componentName(name: "retail") { - """ - Point of sale device payment session was automatically closed because the device switched to a different location. - """ - AUTO_END_SESSION_LOCATION_CHANGE - - """ - Point of sale device payment session was automatically closed because a staff member logged out. - """ - AUTO_END_SESSION_LOGOUT - - """ - Point of sale device payment session was automatically opened by a cash payment at checkout. - """ - AUTO_START_SESSION_CHECKOUT - - """ - Cash count. - """ - CASH_COUNT - - """ - Cash payout. - """ - CASH_PAYOUT - - """ - Cash pickup. - """ - CASH_PICKUP - - """ - Change correction. - """ - CHANGE_CORRECTION - - """ - Other. - """ - OTHER - - """ - Petty cash. - """ - PETTY_CASH - - """ - Tip payout. - """ - TIP_PAYOUT -} - -""" -Reason code for cash management. -""" -union CashManagementReasonCode @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") = CashManagementCustomReasonCode | CashManagementDefaultReasonCode | CashManagementSystemReasonCode - -""" -An auto-generated type for paginating through multiple CashManagementReasonCodes. -""" -type CashManagementReasonCodeConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [CashManagementReasonCodeEdge!]! - - """ - A list of nodes that are contained in CashManagementReasonCodeEdge. 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: [CashManagementReasonCode!]! - - """ - 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 `cashManagementReasonCodeCreate` mutation. -""" -type CashManagementReasonCodeCreatePayload @componentName(name: "platform") { - """ - The created cash management reason code. - """ - reasonCode: CashManagementCustomReasonCode - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [CashManagementReasonCodeCreateUserError!]! -} - -""" -An error that occurs during the execution of `CashManagementReasonCodeCreate`. -""" -type CashManagementReasonCodeCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: CashManagementReasonCodeCreateUserErrorCode - - """ - 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 `CashManagementReasonCodeCreateUserError`. -""" -enum CashManagementReasonCodeCreateUserErrorCode @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - The reason code already exists. - """ - CODE_ALREADY_EXISTS - - """ - Failed to create cash management reason code. - """ - NOT_SAVED -} - -""" -Return type for `cashManagementReasonCodeDelete` mutation. -""" -type CashManagementReasonCodeDeletePayload @componentName(name: "platform") { - """ - The deleted cash management reason code gid. - """ - deletedId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [CashManagementReasonCodeDeleteUserError!]! -} - -""" -An error that occurs during the execution of `CashManagementReasonCodeDelete`. -""" -type CashManagementReasonCodeDeleteUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: CashManagementReasonCodeDeleteUserErrorCode - - """ - 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 `CashManagementReasonCodeDeleteUserError`. -""" -enum CashManagementReasonCodeDeleteUserErrorCode @componentName(name: "platform") { - """ - Database error occurred. - """ - DATABASE_ERROR - - """ - SYSTEM type reason codes are not deletable. - """ - NOT_DELETABLE - - """ - Reason code not found. - """ - NOT_FOUND -} - -""" -An auto-generated type which holds one CashManagementReasonCode and a cursor during pagination. -""" -type CashManagementReasonCodeEdge @componentName(name: "retail") { - """ - 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 CashManagementReasonCodeEdge. - """ - node: CashManagementReasonCode! -} - -""" -A summary of cash management data. -""" -type CashManagementSummary @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The cumulative cash balance of all cash drawers at the provided end date. - """ - cashBalanceAtEnd: MoneyV2! - - """ - The cumulative cash balance of all cash drawers at the provided start date. - """ - cashBalanceAtStart: MoneyV2! - - """ - The net cash flow during the specified period (start date to end date). Calculated as net sales plus adjustments. - """ - netCash: MoneyV2! - - """ - The number of sessions that were closed during the specified period (start date to end date). - """ - sessionsClosed: Int! - - """ - The number of sessions that were opened during the specified period (start date to end date). - """ - sessionsOpened: Int! - - """ - The total cash discrepancies during the specified period (start date to end date). - """ - totalDiscrepancies: MoneyV2! -} - -""" -System reason code. -""" -type CashManagementSystemReasonCode implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The code for the system reason code. - """ - code: CashManagementSystemReasonCodeEnum! - - """ - A globally-unique ID. - """ - id: ID! -} - -""" -System reason codes for cash management. -""" -enum CashManagementSystemReasonCodeEnum @componentName(name: "retail") { - """ - Point of sale device payment session was automatically closed because the device switched to a different location. - """ - AUTO_END_SESSION_LOCATION_CHANGE - - """ - Point of sale device payment session was automatically closed because a staff member logged out. - """ - AUTO_END_SESSION_LOGOUT - - """ - Point of sale device payment session was automatically opened by a cash payment at checkout. - """ - AUTO_START_SESSION_CHECKOUT - - """ - Cash payout. - """ - CASH_PAYOUT - - """ - Float setup. - """ - FLOAT_SETUP - - """ - Other. - """ - OTHER @deprecated(reason: "Use CashManagementDefaultReasonCodeEnum.OTHER instead.") -} - -""" -The rounding adjustment applied to total payment or refund received for an Order involving cash payments. -""" -type CashRoundingAdjustment @requiredAccess(scope: "`read_orders` access scope or `read_quick_sale` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "retail") { - """ - 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 @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The adjustments made to the cash drawer during this session. - """ - adjustments( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | kind | string | - | processed_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "retail") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 cash transaction activity. -""" -type CashTransactionActivity implements CashActivity @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The amount of cash added or removed as part of the activity. - """ - cash: MoneyV2! - - """ - The order transaction associated with the activity. - """ - orderTransaction: OrderTransaction! - - """ - The point of sale device payment session associated with the activity. - """ - paymentSession: PointOfSaleDevicePaymentSession! - - """ - The staff member who performed the activity. - """ - staffMember: StaffMember! - - """ - The time at which the activity occurred. - """ - time: DateTime! - - """ - The type of transaction activity. - """ - type: CashTransactionActivityType! -} - -""" -The type of transaction activity. -""" -enum CashTransactionActivityType @componentName(name: "retail") { - """ - Change given to a customer. - """ - CHANGE - - """ - A cash refund. - """ - REFUND - - """ - A cash sale. - """ - SALE -} - -""" -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 @requiredAccess(scope: "products or product_listings read access scope. The user must have permission to view markets or customers or companies.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The IDs of the company locations to associate to the catalog. - """ - companyLocationIds: [ID!] @gidTypes(types: ["CompanyLocation"]) - - """ - The IDs of the markets to associate to the catalog. - """ - marketIds: [ID!] @gidTypes(types: ["Market"]) -} - -""" -Return type for `catalogContextUpdate` mutation. -""" -type CatalogContextUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The context associated with the catalog. - """ - context: CatalogContextInput! - - """ - The ID of the price list to associate to the catalog. - """ - priceListId: ID @gidTypes(types: ["PriceList"]) - - """ - 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 @gidTypes(types: ["Publication"]) - - """ - The status of the catalog. - """ - status: CatalogStatus! - - """ - The name of the catalog. - """ - title: String! -} - -""" -Return type for `catalogCreate` mutation. -""" -type CatalogCreatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The catalog is active. - """ - ACTIVE - - """ - The catalog is archived. - """ - ARCHIVED - - """ - The catalog is in draft. - """ - DRAFT -} - -""" -The associated catalog's type. -""" -enum CatalogType @componentName(name: "merchandising") { - """ - Catalogs belonging to apps. - """ - APP - - """ - Catalogs belonging to company locations. - """ - COMPANY_LOCATION - - """ - Catalogs belonging to markets. - """ - MARKET - - """ - Not associated to a catalog. - """ - NONE -} - -""" -The input fields used to update a catalog. -""" -input CatalogUpdateInput @componentName(name: "merchandising") { - """ - The context associated with the catalog. - """ - context: CatalogContextInput - - """ - The ID of the price list to associate to the catalog. - """ - priceListId: ID @gidTypes(types: ["PriceList"]) - - """ - The ID of the publication to associate to the catalog. - """ - publicationId: ID @gidTypes(types: ["Publication"]) - - """ - The status of the catalog. - """ - status: CatalogStatus - - """ - The name of the catalog. - """ - title: String -} - -""" -Return type for `catalogUpdate` mutation. -""" -type CatalogUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - An app catalog cannot be assigned to a price list. - """ - APP_CATALOG_PRICE_LIST_ASSIGNMENT - - """ - You've reached the maximum number of B2B catalogs allowed for your plan. - """ - B2B_CATALOG_LIMIT_REACHED - - """ - The input value is blank. - """ - BLANK - - """ - The catalog can't be associated with more than one market. - """ - CANNOT_ADD_MORE_THAN_ONE_MARKET - - """ - Cannot create a catalog for an app. - """ - CANNOT_CREATE_APP_CATALOG - - """ - Cannot create a catalog for a market. - """ - CANNOT_CREATE_MARKET_CATALOG - - """ - Cannot delete a catalog for an app. - """ - CANNOT_DELETE_APP_CATALOG - - """ - Cannot delete a catalog for a market. - """ - CANNOT_DELETE_MARKET_CATALOG - - """ - Cannot modify a catalog for an app. - """ - CANNOT_MODIFY_APP_CATALOG - - """ - Cannot modify a catalog for a market. - """ - CANNOT_MODIFY_MARKET_CATALOG - - """ - 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 - - """ - Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. - """ - CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES - - """ - The catalog context is currently being modified. Please try again later. - """ - CATALOG_CONTEXT_LOCKED - - """ - Catalog failed to save. - """ - CATALOG_FAILED_TO_SAVE - - """ - The catalog wasn't found. - """ - CATALOG_NOT_FOUND - - """ - A company location catalog outside of a supported plan can only have an archived status. - """ - COMPANY_LOCATION_CATALOG_STATUS_PLAN - - """ - The company location could not be found. - """ - COMPANY_LOCATION_NOT_FOUND - - """ - 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 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 input value is invalid. - """ - INVALID - - """ - The catalog context type is invalid. - """ - INVALID_CATALOG_CONTEXT_TYPE - - """ - Cannot change context to specified type. - """ - INVALID_CONTEXT_CHANGE - - """ - The managed country belongs to another catalog. - """ - MANAGED_COUNTRY_BELONGS_TO_ANOTHER_CATALOG - - """ - The catalog's market and price list currencies do not match. - """ - MARKET_AND_PRICE_LIST_CURRENCY_MISMATCH - - """ - A market catalog must have an active status. - """ - MARKET_CATALOG_STATUS - - """ - Market not found. - """ - MARKET_NOT_FOUND - - """ - Market already belongs to another catalog. - """ - MARKET_TAKEN - - """ - Must provide exactly one context type. - """ - MUST_PROVIDE_EXACTLY_ONE_CONTEXT_TYPE - - """ - Price list failed to save. - """ - PRICE_LIST_FAILED_TO_SAVE - - """ - The price list is currently being modified. Please try again later. - """ - PRICE_LIST_LOCKED - - """ - A price list cannot be assigned to the primary market. - """ - PRICE_LIST_NOT_ALLOWED_FOR_PRIMARY_MARKET - - """ - Price list not found. - """ - PRICE_LIST_NOT_FOUND - - """ - Publication not found. - """ - PUBLICATION_NOT_FOUND - - """ - Must have `contexts_to_add` or `contexts_to_remove` argument. - """ - REQUIRES_CONTEXTS_TO_ADD_OR_REMOVE - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT - - """ - Catalogs assigned to company locations can't be set to active with your plan. - """ - UNPERMITTED_ENTITLEMENTS_DIRECT_CATALOG_ASSIGNMENT - - """ - Managing this catalog is not supported by your plan. - """ - UNPERMITTED_ENTITLEMENTS_MARKET_CATALOGS - - """ - Can't perform this action on a catalog of this type. - """ - UNSUPPORTED_CATALOG_ACTION -} - -""" -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 @componentName(name: "channels") { - """ - The unique account ID for the merchant on the external platform. This value is - opaque to Shopify — its format is determined by the channel, such as an Amazon - Seller ID or Google Merchant Center ID. - """ - accountId: String - - """ - The merchant-facing name for the external account. Displayed in Shopify Admin - wherever the channel connection is referenced, such as in Markets and order attribution. - """ - accountName: String - - """ - The regions where the channel is currently active. Includes spec-declared regions plus regions with active product feeds. - """ - activeRegions: [CountryCode!]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationConnection! - - """ - The list of collections published to the channel. - """ - collections( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @gidTypes(types: ["Collection"]) - ): Boolean! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The markets associated with this channel. - """ - markets( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MarketConnection - - """ - The number of markets associated with this channel. - """ - marketsCount: Count - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationConnection! - - """ - The list of products published to the channel. - """ - products( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-1234` | - | 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` | - | 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` | - | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) - field. | | | - `collection_id:108179161409` | - | 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` | - | 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'` | - | 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` | - | error_feedback | string | Filter by products with publishing errors. | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | 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` | - | has_only_composites | boolean | Filter by products that have only - composite variants. | | | - `has_only_composites:true` | - | 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` | - | has_variant_with_components | boolean | Filter by products that have - variants with associated components. | | | - - `has_variant_with_components:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_total | integer | Filter by inventory count. | | | - - `inventory_total:0`
- `inventory_total:>150`
- - `inventory_total:>=200` | - | 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` | - | 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"` | - | out_of_stock_somewhere | boolean | Filter by products that are out of - stock in at least one location. | | | - `out_of_stock_somewhere:true` | - | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) - field. | | | - `price:100.57` | - | 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` | - | 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` | - | product_type | string | Filter by a comma-separated list of [product - types](https://help.shopify.com/manual/products/details/product-type). | | | - - `product_type:snowboard` | - | publication_ids | string | Filter by a comma-separated list of publication - IDs that are associated with the product. | | | - - `publication_ids:184111530305,184111694145` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | `active` | - - `status:active,draft` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) - field. | | | - `title:The Minimal Snowboard` | - | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) - enabled. | | | - `tracks_inventory:true` | - | 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'` | - | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) - field. | | | - `variant_id:45779434701121` | - | 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'` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): Count @requiredAccess(scope: "`read_products` access scope.") - - """ - The resource feedback for the channel. Returns `null` when no active feedback - exists—for example, after `shopResourceFeedbackCreate` is called with `state: - ACCEPTED`, which clears the feedback signal. A `null` result is expected and - means the channel has no outstanding feedback. - """ - resourceFeedback: AppFeedback - - """ - The handle of the [channel specification](https://shopify.dev/docs/apps/build/sales-channels/channel-config-extension) - bound to this channel. The specification declares the channel's regional - coverage, capabilities, and requirements, and is deployed by the Sales Channel - application via `shopify app deploy`. - """ - specificationHandle: String - - """ - Whether the channel supports future publishing. - """ - supportsFuturePublishing: Boolean! -} - -""" -An auto-generated type for paginating through multiple Channels. -""" -type ChannelConnection @componentName(name: "platform") { - """ - 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! -} - -""" -The input fields for creating a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). -""" -input ChannelCreateInput @componentName(name: "channels") { - """ - A unique identifier for the merchant's account on the external platform, such - as an Amazon Seller ID or Google Merchant Center ID. Used together with - `specificationHandle` to uniquely identify the channel connection. - """ - accountId: String! - - """ - The merchant-facing name for the external account. Displayed in Shopify Admin - wherever the channel connection is referenced, such as in Markets and order - attribution. Should match how the merchant recognises the account on the - external platform. - """ - accountName: String! - - """ - A unique, human-readable identifier for the channel within the shop. For - example, `amazon-us-A1B2C3D4E5F6G7`. Used for lookups via [`channelByHandle`](https://shopify.dev/docs/api/admin-graphql/latest/queries/channelByHandle). - If not provided, auto-generated from the specification handle and account ID. - Must be unique across all channels on the shop. - """ - handle: String - - """ - The handle of the [channel specification](https://shopify.dev/docs/apps/build/sales-channels/channel-config-extension) - to bind to this channel. The specification must have been deployed by the - calling application via `shopify app deploy`. Determines the channel's - regional coverage, capabilities, and requirements. - """ - specificationHandle: String! -} - -""" -Return type for `channelCreate` mutation. -""" -type ChannelCreatePayload @componentName(name: "platform") { - """ - The channel that was created. - """ - channel: Channel - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ChannelCreateUserError!]! -} - -""" -An error that occurs during the execution of `ChannelCreate`. -""" -type ChannelCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ChannelCreateUserErrorCode - - """ - 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 `ChannelCreateUserError`. -""" -enum ChannelCreateUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -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. The -marketplace flag identifies whether this surface represents a marketplace -channel such as shops on Facebook, Instagram, or Buy on Google. -""" -type ChannelDefinition implements Node @componentName(name: "channels") { - """ - 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") -} - -""" -Return type for `channelDelete` mutation. -""" -type ChannelDeletePayload @componentName(name: "platform") { - """ - The ID of the deleted channel. - """ - deletedId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ChannelDeleteUserError!]! -} - -""" -An error that occurs during the execution of `ChannelDelete`. -""" -type ChannelDeleteUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ChannelDeleteUserErrorCode - - """ - 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 `ChannelDeleteUserError`. -""" -enum ChannelDeleteUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -An auto-generated type which holds one Channel and a cursor during pagination. -""" -type ChannelEdge @componentName(name: "channels") { - """ - 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! -} - -""" -Return type for `channelFullSync` mutation. -""" -type ChannelFullSyncPayload @componentName(name: "platform") { - """ - Trace information for each country-language product feed that was triggered. Returns one entry per feed. - """ - fullSyncTraceInfo: [FullSyncTraceInfo!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ChannelFullSyncUserError!]! -} - -""" -An error that occurs during the execution of `ChannelFullSync`. -""" -type ChannelFullSyncUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ChannelFullSyncUserErrorCode - - """ - 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 `ChannelFullSyncUserError`. -""" -enum ChannelFullSyncUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -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 @componentName(name: "channels") { - """ - 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! -} - -""" -The input fields for updating a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). -""" -input ChannelUpdateInput @componentName(name: "channels") { - """ - An updated identifier for the merchant's account on the external platform. - Changing this value signals that the channel connection now represents a - different external account. - """ - accountId: String - - """ - An updated merchant-facing name for the external account. Displayed in Shopify - Admin when multiple channels exist for the same app, to help merchants - distinguish between connections. - """ - accountName: String - - """ - A new unique identifier for the channel within the shop. Must be unique across - all channels on the shop. Handles are typically set at creation and rarely - changed — use when correcting a handle or migrating legacy channel records. - """ - handle: String - - """ - The handle of the [channel specification](https://shopify.dev/docs/apps/build/sales-channels/channel-config-extension) - to bind to this channel. When changed, the platform re-evaluates the - specification's country coverage against the shop's region markets and - reconciles product feeds accordingly. - """ - specificationHandle: String -} - -""" -Return type for `channelUpdate` mutation. -""" -type ChannelUpdatePayload @componentName(name: "platform") { - """ - The channel that was updated. - """ - channel: Channel - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ChannelUpdateUserError!]! -} - -""" -An error that occurs during the execution of `ChannelUpdate`. -""" -type ChannelUpdateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ChannelUpdateUserErrorCode - - """ - 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 `ChannelUpdateUserError`. -""" -enum ChannelUpdateUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -A condition checking the channel that the visitor is shopping from. -""" -type ChannelsCondition @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - The application level for the condition. - """ - applicationLevel: MarketConditionApplicationType - - """ - The channels that comprise the market. - """ - channels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection! - - """ - The total number of channels condition. - """ - channelsCount: Count -} - -""" -A checkout and account configuration packages branding settings, UI extensions, and overrides for a shop's checkout. -""" -type CheckoutAndAccountsConfiguration implements CheckoutAndAccountsConfigurationInterface & Node @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The branding configuration. - """ - branding: CheckoutAndAccountsConfigurationBranding - - """ - The date and time when the configuration was created. - """ - createdAt: DateTime! - - """ - The date and time when the configuration was last edited. - """ - editedAt: DateTime! - - """ - A globally-unique ID. - """ - id: ID! - - """ - Whether the configuration is published or not. - """ - isPublished: Boolean! - - """ - The configuration name. - """ - name: String! - - """ - The list of overrides for the configuration. - """ - overrides: [CheckoutAndAccountsConfigurationOverride!]! - - """ - The date and time when the configuration was last updated. - """ - updatedAt: DateTime! -} - -""" -The branding configuration for checkout and customer accounts. -""" -type CheckoutAndAccountsConfigurationBranding @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The components that apply to all surfaces. - """ - components: CheckoutAndAccountsConfigurationBrandingComponents - - """ - The design tokens allow 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. - """ - designTokens: CheckoutAndAccountsConfigurationBrandingDesignTokens - - """ - The surface-specific customizations. - """ - surfaces: CheckoutAndAccountsConfigurationBrandingSurfaces -} - -""" -The container background style. -""" -enum CheckoutAndAccountsConfigurationBrandingBackground @componentName(name: "checkouts") { - """ - The Base background style. - """ - BASE - - """ - The Subdued background style. - """ - SUBDUED -} - -""" -The base color role customizations for a surface. -""" -type CheckoutAndAccountsConfigurationBrandingBaseColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - 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 customizing a base group of colors. -""" -input CheckoutAndAccountsConfigurationBrandingBaseColorRolesInput @componentName(name: "checkouts") { - """ - 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 -} - -""" -Possible values for the border. -""" -enum CheckoutAndAccountsConfigurationBrandingBorder @componentName(name: "checkouts") { - """ - The Block End border. - """ - BLOCK_END - - """ - The Full border. - """ - FULL - - """ - The None border. - """ - NONE -} - -""" -The container border style. -""" -enum CheckoutAndAccountsConfigurationBrandingBorderStyle @componentName(name: "checkouts") { - """ - The Base border style. - """ - BASE - - """ - The Dashed border style. - """ - DASHED - - """ - The Dotted border style. - """ - DOTTED -} - -""" -The container border width. -""" -enum CheckoutAndAccountsConfigurationBrandingBorderWidth @componentName(name: "checkouts") { - """ - The Base border width. - """ - BASE - - """ - The Large border width. - """ - LARGE - - """ - The Large 100 border width. - """ - LARGE_100 - - """ - The Large 200 border width. - """ - LARGE_200 -} - -""" -The buttons customizations. -""" -type CheckoutAndAccountsConfigurationBrandingButton @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The block padding. - """ - blockPadding: CheckoutAndAccountsConfigurationBrandingSpacing - - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The inline padding. - """ - inlinePadding: CheckoutAndAccountsConfigurationBrandingSpacing - - """ - The typography. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypographyStyle -} - -""" -The input fields for customizing the buttons. -""" -input CheckoutAndAccountsConfigurationBrandingButtonInput @componentName(name: "checkouts") { - """ - The block padding. - """ - blockPadding: CheckoutAndAccountsConfigurationBrandingSpacing - - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The inline padding. - """ - inlinePadding: CheckoutAndAccountsConfigurationBrandingSpacing - - """ - The typography style. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypographyStyleInput -} - -""" -The customizations for the breadcrumbs that represent a buyer's journey to the checkout. -""" -type CheckoutAndAccountsConfigurationBrandingBuyerJourney @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - An option to display or hide the breadcrumbs that represent the buyer's journey on 3-page checkout. - """ - visibility: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -The input fields for updating breadcrumb customizations, which represent the buyer's journey to checkout. -""" -input CheckoutAndAccountsConfigurationBrandingBuyerJourneyInput @componentName(name: "checkouts") { - """ - The visibility customizations for updating breadcrumbs, which represent the buyer's journey to checkout. - """ - visibility: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -The customizations that you can make to cart links at checkout. -""" -type CheckoutAndAccountsConfigurationBrandingCartLink @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - Whether the cart link is visible at checkout. - """ - visibility: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -Possible values for the cart link content type for the header. -""" -enum CheckoutAndAccountsConfigurationBrandingCartLinkContentType @componentName(name: "checkouts") { - """ - 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 customizing the cart link at Checkout. -""" -input CheckoutAndAccountsConfigurationBrandingCartLinkInput @componentName(name: "checkouts") { - """ - 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: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -The checkboxes customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCheckbox @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius -} - -""" -The input fields for customizing the checkboxes. -""" -input CheckoutAndAccountsConfigurationBrandingCheckboxInput @componentName(name: "checkouts") { - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius -} - -""" -The checkout-specific component customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCheckoutComponents @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The customizations for the breadcrumbs that represent a buyer's journey to the checkout. - """ - buyerJourney: CheckoutAndAccountsConfigurationBrandingBuyerJourney - - """ - 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: CheckoutAndAccountsConfigurationBrandingCartLink - - """ - The content container customizations. - """ - content: CheckoutAndAccountsConfigurationBrandingContent - - """ - The express checkout customizations. - """ - expressCheckout: CheckoutAndAccountsConfigurationBrandingExpressCheckout - - """ - The checkout footer customizations. - """ - footer: CheckoutAndAccountsConfigurationBrandingCheckoutFooter - - """ - The checkout header customizations. - """ - header: CheckoutAndAccountsConfigurationBrandingCheckoutHeader - - """ - The main checkout customizations. - """ - main: CheckoutAndAccountsConfigurationBrandingMain - - """ - The order summary customizations. - """ - orderSummary: CheckoutAndAccountsConfigurationBrandingOrderSummary -} - -""" -The input fields for customizing the Checkout components. -""" -input CheckoutAndAccountsConfigurationBrandingCheckoutComponentsInput @componentName(name: "checkouts") { - """ - The breadcrumbs that represent a buyer's journey to the checkout. - """ - buyerJourney: CheckoutAndAccountsConfigurationBrandingBuyerJourneyInput - - """ - 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: CheckoutAndAccountsConfigurationBrandingCartLinkInput - - """ - The content container. - """ - content: CheckoutAndAccountsConfigurationBrandingContentInput - - """ - The express checkout. - """ - expressCheckout: CheckoutAndAccountsConfigurationBrandingExpressCheckoutInput - - """ - The footer. - """ - footer: CheckoutAndAccountsConfigurationBrandingCheckoutFooterInput - - """ - The header. - """ - header: CheckoutAndAccountsConfigurationBrandingCheckoutHeaderInput - - """ - The main area. - """ - main: CheckoutAndAccountsConfigurationBrandingMainInput - - """ - The order summary. - """ - orderSummary: CheckoutAndAccountsConfigurationBrandingOrderSummaryInput -} - -""" -A container for the checkout footer section customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCheckoutFooter @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The footer alignment. - """ - alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment - - """ - The background style of the footer container. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The footer content settings. - """ - content: CheckoutAndAccountsConfigurationBrandingFooterContent - - """ - The divided setting. - """ - divided: Boolean - - """ - The padding of the footer container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The footer position. - """ - position: CheckoutAndAccountsConfigurationBrandingFooterPosition -} - -""" -The input fields for customizing the checkout footer. -""" -input CheckoutAndAccountsConfigurationBrandingCheckoutFooterInput @componentName(name: "checkouts") { - """ - The footer alignment settings. You can set the footer native content alignment to the left, center, or right. - """ - alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment - - """ - The background style of the footer container. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The input field for setting the footer content customizations. - """ - content: CheckoutAndAccountsConfigurationBrandingFooterContentInput - - """ - The divided setting. - """ - divided: Boolean - - """ - The padding of the footer container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The footer position. - """ - position: CheckoutAndAccountsConfigurationBrandingFooterPosition -} - -""" -The checkout header customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCheckoutHeader @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The header alignment. - """ - alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment - - """ - The background style of the header container. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - 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: CheckoutAndAccountsConfigurationBrandingHeaderCartLink - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The divided setting. - """ - divided: Boolean - - """ - The store logo. - """ - logo: CheckoutAndAccountsConfigurationBrandingLogo - - """ - The padding of the header container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The header position. - """ - position: CheckoutAndAccountsConfigurationBrandingHeaderPosition -} - -""" -The input fields for customizing the checkout header. -""" -input CheckoutAndAccountsConfigurationBrandingCheckoutHeaderInput @componentName(name: "checkouts") { - """ - The header alignment. - """ - alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment - - """ - The background style of the header container. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - 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: CheckoutAndAccountsConfigurationBrandingHeaderCartLinkInput - - """ - The colors customizations for the header container. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The divided setting. - """ - divided: Boolean - - """ - The store logo. - """ - logo: CheckoutAndAccountsConfigurationBrandingLogoInput - - """ - The padding of the header container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The header position. - """ - position: CheckoutAndAccountsConfigurationBrandingHeaderPosition -} - -""" -The checkout-specific component customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCheckoutSurface @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The checkout components. - """ - components: CheckoutAndAccountsConfigurationBrandingCheckoutComponents -} - -""" -The input fields for customizing the Checkout surface. -""" -input CheckoutAndAccountsConfigurationBrandingCheckoutSurfaceInput @componentName(name: "checkouts") { - """ - The Checkout components. - """ - components: CheckoutAndAccountsConfigurationBrandingCheckoutComponentsInput -} - -""" -The choice list customizations. -""" -type CheckoutAndAccountsConfigurationBrandingChoiceList @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The 'group' variant of ChoiceList. - """ - group: CheckoutAndAccountsConfigurationBrandingChoiceListGroup -} - -""" -The customizations that apply to the 'group' variant of ChoiceList. -""" -type CheckoutAndAccountsConfigurationBrandingChoiceListGroup @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The spacing between UI elements in the list. - """ - spacing: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The input fields for customizing the 'group' variant of ChoiceList. -""" -input CheckoutAndAccountsConfigurationBrandingChoiceListGroupInput @componentName(name: "checkouts") { - """ - The spacing between UI elements in the list. - """ - spacing: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The input fields for customizing the choice list. -""" -input CheckoutAndAccountsConfigurationBrandingChoiceListInput @componentName(name: "checkouts") { - """ - The 'group' variant of ChoiceList. - """ - group: CheckoutAndAccountsConfigurationBrandingChoiceListGroupInput -} - -""" -The color role customizations for a surface. -""" -type CheckoutAndAccountsConfigurationBrandingColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - 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 customizing a group of colors used together on a surface. -""" -input CheckoutAndAccountsConfigurationBrandingColorRolesInput @componentName(name: "checkouts") { - """ - 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 color settings used to customize the user interface. -""" -type CheckoutAndAccountsConfigurationBrandingColors @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The main colors, used for the surface background, text, links, and more. - """ - base: CheckoutAndAccountsConfigurationBrandingBaseColorRoles - - """ - 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: CheckoutAndAccountsConfigurationBrandingControlColorRoles - - """ - The colors of the primary button. For example, the main payment, or **Pay now** button. - """ - primaryButton: CheckoutAndAccountsConfigurationBrandingPrimaryButtonColorRoles - - """ - The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. - """ - secondaryButton: CheckoutAndAccountsConfigurationBrandingSecondaryButtonColorRoles -} - -""" -The input fields for customizing a base set of colors, from which every component pulls its colors. -""" -input CheckoutAndAccountsConfigurationBrandingColorsInput @componentName(name: "checkouts") { - """ - The main colors, used for the surface background, text, links, and more. - """ - base: CheckoutAndAccountsConfigurationBrandingBaseColorRolesInput - - """ - 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: CheckoutAndAccountsConfigurationBrandingControlColorRolesInput - - """ - The colors of the primary button. For example, the main payment, or **Pay now** button. - """ - primaryButton: CheckoutAndAccountsConfigurationBrandingPrimaryButtonColorRolesInput - - """ - The colors of the secondary button, which is used for secondary actions. For example, **Buy again**. - """ - secondaryButton: CheckoutAndAccountsConfigurationBrandingSecondaryButtonColorRolesInput -} - -""" -The base component customizations that apply to all surfaces. -""" -type CheckoutAndAccountsConfigurationBrandingComponents @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The checkboxes. - """ - checkbox: CheckoutAndAccountsConfigurationBrandingCheckbox - - """ - The choice list. - """ - choiceList: CheckoutAndAccountsConfigurationBrandingChoiceList - - """ - The form controls. - """ - control: CheckoutAndAccountsConfigurationBrandingControl - - """ - 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: CheckoutAndAccountsConfigurationBrandingDividerStyle - - """ - The favicon. - """ - favicon: CheckoutAndAccountsConfigurationBrandingImageValue - - """ - The footer. - """ - footer: CheckoutAndAccountsConfigurationBrandingFooter - - """ - The header. - """ - header: CheckoutAndAccountsConfigurationBrandingHeader - - """ - The Heading Level 1. - """ - headingLevel1: CheckoutAndAccountsConfigurationBrandingHeadingLevel - - """ - The Heading Level 2. - """ - headingLevel2: CheckoutAndAccountsConfigurationBrandingHeadingLevel - - """ - The Heading Level 3. - """ - headingLevel3: CheckoutAndAccountsConfigurationBrandingHeadingLevel - - """ - The main area. - """ - main: CheckoutAndAccountsConfigurationBrandingMain - - """ - The merchandise thumbnails. - """ - merchandiseThumbnail: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnail - - """ - The primary buttons. - """ - primaryButton: CheckoutAndAccountsConfigurationBrandingButton - - """ - The secondary buttons. - """ - secondaryButton: CheckoutAndAccountsConfigurationBrandingButton - - """ - The selects. - """ - select: CheckoutAndAccountsConfigurationBrandingSelect - - """ - The shared settings. - """ - shared: CheckoutAndAccountsConfigurationBrandingShared - - """ - The text fields. - """ - textField: CheckoutAndAccountsConfigurationBrandingTextField -} - -""" -The input fields for customizing the components. -""" -input CheckoutAndAccountsConfigurationBrandingComponentsInput @componentName(name: "checkouts") { - """ - The checkboxes customizations. - """ - checkbox: CheckoutAndAccountsConfigurationBrandingCheckboxInput - - """ - The choice list customizations. - """ - choiceList: CheckoutAndAccountsConfigurationBrandingChoiceListInput - - """ - The form controls customizations. - """ - control: CheckoutAndAccountsConfigurationBrandingControlInput - - """ - The divider customizations. - """ - divider: CheckoutAndAccountsConfigurationBrandingDividerStyleInput - - """ - The favicon. - """ - favicon: CheckoutAndAccountsConfigurationBrandingImageInput - - """ - The footer customizations. - """ - footer: CheckoutAndAccountsConfigurationBrandingFooterInput - - """ - The header customizations. - """ - header: CheckoutAndAccountsConfigurationBrandingHeaderInput - - """ - The Heading Level 1 customizations. - """ - headingLevel1: CheckoutAndAccountsConfigurationBrandingHeadingLevelInput - - """ - The Heading Level 2 customizations. - """ - headingLevel2: CheckoutAndAccountsConfigurationBrandingHeadingLevelInput - - """ - The Heading Level 3 customizations. - """ - headingLevel3: CheckoutAndAccountsConfigurationBrandingHeadingLevelInput - - """ - The main area customizations. - """ - main: CheckoutAndAccountsConfigurationBrandingMainInput - - """ - The merchandise thumbnails customizations. - """ - merchandiseThumbnail: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailInput - - """ - The primary buttons customizations. - """ - primaryButton: CheckoutAndAccountsConfigurationBrandingButtonInput - - """ - The secondary buttons customizations. - """ - secondaryButton: CheckoutAndAccountsConfigurationBrandingButtonInput - - """ - The selects customizations. - """ - select: CheckoutAndAccountsConfigurationBrandingSelectInput - - """ - The shared customizations. - """ - shared: CheckoutAndAccountsConfigurationBrandingSharedInput - - """ - The text fields customizations. - """ - textField: CheckoutAndAccountsConfigurationBrandingTextFieldInput -} - -""" -The container's divider customizations. -""" -type CheckoutAndAccountsConfigurationBrandingContainerDivider @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The divider style. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The divider width. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth - - """ - The divider visibility. - """ - visibility: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -The input fields for customizing a container's divider. -""" -input CheckoutAndAccountsConfigurationBrandingContainerDividerInput @componentName(name: "checkouts") { - """ - The divider style. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The divider width. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth - - """ - The divider visibility. - """ - visibility: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -The content customizations. -""" -type CheckoutAndAccountsConfigurationBrandingContent @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The divider style and visibility. - """ - divider: CheckoutAndAccountsConfigurationBrandingContainerDivider -} - -""" -The input fields for customizing the content container. -""" -input CheckoutAndAccountsConfigurationBrandingContentInput @componentName(name: "checkouts") { - """ - Divider style and visibility on the content container. - """ - divider: CheckoutAndAccountsConfigurationBrandingContainerDividerInput -} - -""" -The form controls customizations. -""" -type CheckoutAndAccountsConfigurationBrandingControl @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The label position. - """ - labelPosition: CheckoutAndAccountsConfigurationBrandingLabelPosition -} - -""" -The form control color customizations. -""" -type CheckoutAndAccountsConfigurationBrandingControlColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - 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: CheckoutAndAccountsConfigurationBrandingColorRoles - - """ - The color of text. - """ - text: String -} - -""" -The input fields for customizing colors for form controls. -""" -input CheckoutAndAccountsConfigurationBrandingControlColorRolesInput @componentName(name: "checkouts") { - """ - 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: CheckoutAndAccountsConfigurationBrandingColorRolesInput - - """ - The color of text. - """ - text: String -} - -""" -The input fields for customizing the form controls. -""" -input CheckoutAndAccountsConfigurationBrandingControlInput @componentName(name: "checkouts") { - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The label position. - """ - labelPosition: CheckoutAndAccountsConfigurationBrandingLabelPosition -} - -""" -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). -""" -enum CheckoutAndAccountsConfigurationBrandingCornerRadius @componentName(name: "checkouts") { - """ - The corner radius with a pixel value defined by designTokens.cornerRadius.base. - """ - BASE - - """ - The corner radius with a pixel value defined by designTokens.cornerRadius.large. - """ - LARGE - - """ - The 0px corner radius (square corners). - """ - NONE - - """ - The corner radius with a pixel value defined by designTokens.cornerRadius.small. - """ - SMALL -} - -""" -The corner radius variable customizations that define the pixel size of corner radius options. -""" -type CheckoutAndAccountsConfigurationBrandingCornerRadiusVariables @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - 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 for customizing the corner radius variables. -""" -input CheckoutAndAccountsConfigurationBrandingCornerRadiusVariablesInput @componentName(name: "checkouts") { - """ - 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 - - """ - The value in pixels for small corner radii. It should be greater than zero. Example: 3. - """ - small: Int -} - -""" -The custom font customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCustomFont @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - Globally unique ID reference to the custom font file. - """ - genericFileId: ID - - """ - The font sources. - """ - sources: String - - """ - The font weight. - """ - weight: Int -} - -""" -The custom font group customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCustomFontGroup @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The base custom font. - """ - base: CheckoutAndAccountsConfigurationBrandingCustomFont - - """ - The bold custom font. - """ - bold: CheckoutAndAccountsConfigurationBrandingCustomFont - - """ - The font loading strategy. - """ - loadingStrategy: CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy - - """ - The font group name. - """ - name: String -} - -""" -The input fields for customizing a custom font group. -""" -input CheckoutAndAccountsConfigurationBrandingCustomFontGroupInput @componentName(name: "checkouts") { - """ - The base font. - """ - base: CheckoutAndAccountsConfigurationBrandingCustomFontInput! - - """ - The bold font. - """ - bold: CheckoutAndAccountsConfigurationBrandingCustomFontInput! - - """ - The font loading strategy. - """ - loadingStrategy: CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy -} - -""" -The input fields for customizing a custom font. -""" -input CheckoutAndAccountsConfigurationBrandingCustomFontInput @componentName(name: "checkouts") { - """ - A globally-unique ID for a font file uploaded via the Files api. Allowed font types are .woff and .woff2. - """ - genericFileId: ID! @gidTypes(types: ["GenericFile"]) - - """ - The font weight. Its value should be between 100 and 900. - """ - weight: Int! -} - -""" -The customer accounts-specific component customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCustomerAccountsComponents @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The footer customizations. - """ - footer: CheckoutAndAccountsConfigurationBrandingCustomerAccountsFooter - - """ - The header customizations. - """ - header: CheckoutAndAccountsConfigurationBrandingCustomerAccountsHeader - - """ - The main customer accounts customizations. - """ - main: CheckoutAndAccountsConfigurationBrandingCustomerAccountsMain -} - -""" -The input fields for customizing the Customer Accounts components. -""" -input CheckoutAndAccountsConfigurationBrandingCustomerAccountsComponentsInput @componentName(name: "checkouts") { - """ - The footer customizations. - """ - footer: CheckoutAndAccountsConfigurationBrandingCustomerAccountsFooterInput - - """ - The header customizations. - """ - header: CheckoutAndAccountsConfigurationBrandingCustomerAccountsHeaderInput - - """ - The main area customizations. - """ - main: CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainInput -} - -""" -A container for the customer accounts footer section customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCustomerAccountsFooter @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The footer alignment. - """ - alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The padding of the footer container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The input fields for customizing the customer accounts footer. -""" -input CheckoutAndAccountsConfigurationBrandingCustomerAccountsFooterInput @componentName(name: "checkouts") { - """ - The footer alignment settings. You can set the footer native content alignment to the left, center, or right. - """ - alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The padding of the footer container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The checkout header customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCustomerAccountsHeader @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The header alignment. - """ - alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The store logo. - """ - logo: CheckoutAndAccountsConfigurationBrandingCustomerAccountsLogo - - """ - The padding of the header container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The input fields for customizing the customer accounts header. -""" -input CheckoutAndAccountsConfigurationBrandingCustomerAccountsHeaderInput @componentName(name: "checkouts") { - """ - The header alignment. - """ - alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment - - """ - The colors customizations for the header container. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The store logo. - """ - logo: CheckoutAndAccountsConfigurationBrandingCustomerAccountsLogoInput - - """ - The padding of the header container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The customer accounts store logo customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCustomerAccountsLogo @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The logo image. - """ - image: CheckoutAndAccountsConfigurationBrandingImageValue - - """ - The maximum width of the logo. - """ - maxWidth: Int -} - -""" -The input fields for customizing the logo. -""" -input CheckoutAndAccountsConfigurationBrandingCustomerAccountsLogoInput @componentName(name: "checkouts") { - """ - The logo image. - """ - image: CheckoutAndAccountsConfigurationBrandingImageInput - - """ - The maximum width of the logo. - """ - maxWidth: Int -} - -""" -The customer accounts-specific main customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCustomerAccountsMain @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The customer accounts main section. - """ - section: CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainSection -} - -""" -The input fields for customizing the main container. -""" -input CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainInput @componentName(name: "checkouts") { - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The customizations for the main sections. - """ - section: CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainSectionInput -} - -""" -The customer accounts branding section customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainSection @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The background style of the main sections. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The border for the main sections. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The border style of the main sections. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The border width of the main sections. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The corner radius of the main sections. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The padding of the main sections. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The shadow of the main sections. - """ - shadow: CheckoutAndAccountsConfigurationBrandingShadow -} - -""" -The input fields for customizing the customer accounts branding section. -""" -input CheckoutAndAccountsConfigurationBrandingCustomerAccountsMainSectionInput @componentName(name: "checkouts") { - """ - The background style of the main sections. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The border for the main sections. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The border style of the main sections. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The border width of the main sections. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The corner radius of the main sections. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The padding of the main sections. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The shadow of the main sections. - """ - shadow: CheckoutAndAccountsConfigurationBrandingShadow -} - -""" -The customer accounts-specific component customizations. -""" -type CheckoutAndAccountsConfigurationBrandingCustomerAccountsSurface @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The customer accounts components. - """ - components: CheckoutAndAccountsConfigurationBrandingCustomerAccountsComponents -} - -""" -The input fields for customizing the Customer Accounts surface. -""" -input CheckoutAndAccountsConfigurationBrandingCustomerAccountsSurfaceInput @componentName(name: "checkouts") { - """ - The Customer Accounts components. - """ - components: CheckoutAndAccountsConfigurationBrandingCustomerAccountsComponentsInput -} - -""" -The color customizations. -""" -type CheckoutAndAccountsConfigurationBrandingDesignTokenColors @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - A set of colors used together on a surface. - """ - palette: CheckoutAndAccountsConfigurationBrandingPalette -} - -""" -The design token customizations allow 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 CheckoutAndAccountsConfigurationBrandingDesignTokens @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The colors for global colors. - """ - colors: CheckoutAndAccountsConfigurationBrandingDesignTokenColors - - """ - The corner radius variables. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadiusVariables - - """ - The typography. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypography -} - -""" -The input fields for customizing the colors. -""" -input CheckoutAndAccountsConfigurationBrandingDesignTokensColorsInput @componentName(name: "checkouts") { - """ - The input to update the color palette. - """ - palette: CheckoutAndAccountsConfigurationBrandingPaletteInput -} - -""" -The input fields for customizing the design tokens. -""" -input CheckoutAndAccountsConfigurationBrandingDesignTokensInput @componentName(name: "checkouts") { - """ - The color customizations for global colors. - """ - colors: CheckoutAndAccountsConfigurationBrandingDesignTokensColorsInput - - """ - The corner radius variables. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadiusVariablesInput - - """ - The typography. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypographyInput -} - -""" -The customizations for the page, content, main, and order summary dividers. -""" -type CheckoutAndAccountsConfigurationBrandingDividerStyle @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The border style for the divider. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The border width for the divider. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth -} - -""" -The input fields for customizing the global divider. -""" -input CheckoutAndAccountsConfigurationBrandingDividerStyleInput @componentName(name: "checkouts") { - """ - The border style for the divider. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The border width for the divider. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth -} - -""" -The Express Checkout customizations. -""" -type CheckoutAndAccountsConfigurationBrandingExpressCheckout @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The Express Checkout buttons customizations. - """ - button: CheckoutAndAccountsConfigurationBrandingExpressCheckoutButton -} - -""" -The Express Checkout button customizations. -""" -type CheckoutAndAccountsConfigurationBrandingExpressCheckoutButton @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius -} - -""" -The input fields for customizing the express checkout button. -""" -input CheckoutAndAccountsConfigurationBrandingExpressCheckoutButtonInput @componentName(name: "checkouts") { - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius -} - -""" -The input fields for customizing the Express Checkout. -""" -input CheckoutAndAccountsConfigurationBrandingExpressCheckoutInput @componentName(name: "checkouts") { - """ - The Express Checkout buttons customizations. - """ - button: CheckoutAndAccountsConfigurationBrandingExpressCheckoutButtonInput -} - -""" -A group of fonts. -""" -union CheckoutAndAccountsConfigurationBrandingFontGroup @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") = CheckoutAndAccountsConfigurationBrandingCustomFontGroup | CheckoutAndAccountsConfigurationBrandingShopifyFontGroup - -""" -The input fields used to update a font group. -""" -input CheckoutAndAccountsConfigurationBrandingFontGroupInput @oneOf @componentName(name: "checkouts") { - """ - A custom font group. - """ - customFontGroup: CheckoutAndAccountsConfigurationBrandingCustomFontGroupInput - - """ - A Shopify font group. - """ - shopifyFontGroup: CheckoutAndAccountsConfigurationBrandingShopifyFontGroupInput -} - -""" -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 CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy @componentName(name: "checkouts") { - """ - 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 a short swap period. - """ - FALLBACK - - """ - Gives the font face an extremely small block period and no swap period. - """ - OPTIONAL - - """ - Gives the font face an extremely small block period and an infinite swap period. - """ - SWAP -} - -""" -The font size customizations. -""" -type CheckoutAndAccountsConfigurationBrandingFontSize @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - 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 for customizing the font size. -""" -input CheckoutAndAccountsConfigurationBrandingFontSizeInput @componentName(name: "checkouts") { - """ - 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 CheckoutAndAccountsConfigurationBrandingFooter @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The footer alignment. - """ - alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment - - """ - The background style of the footer container. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The footer content settings. - """ - content: CheckoutAndAccountsConfigurationBrandingFooterContent - - """ - The divided setting. - """ - divided: Boolean - - """ - The padding of the footer container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -Possible values for the footer alignment. -""" -enum CheckoutAndAccountsConfigurationBrandingFooterAlignment @componentName(name: "checkouts") { - """ - The checkout footer alignment Center value. - """ - CENTER - - """ - The checkout footer alignment End value. - """ - END - - """ - The checkout footer alignment Start value. - """ - START -} - -""" -The footer content customizations. -""" -type CheckoutAndAccountsConfigurationBrandingFooterContent @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The visibility for footer content. - """ - visibility: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -The input fields for customizing the footer content. -""" -input CheckoutAndAccountsConfigurationBrandingFooterContentInput @componentName(name: "checkouts") { - """ - The visibility customizations for footer content. - """ - visibility: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -The input fields for customizing the checkout footer. -""" -input CheckoutAndAccountsConfigurationBrandingFooterInput @componentName(name: "checkouts") { - """ - The footer alignment settings. You can set the footer native content alignment to the left, center, or right. - """ - alignment: CheckoutAndAccountsConfigurationBrandingFooterAlignment - - """ - The background style of the footer container. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The input field for setting the footer content customizations. - """ - content: CheckoutAndAccountsConfigurationBrandingFooterContentInput - - """ - The divided setting. - """ - divided: Boolean - - """ - The padding of the footer container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -Possible values for the footer position. -""" -enum CheckoutAndAccountsConfigurationBrandingFooterPosition @componentName(name: "checkouts") { - """ - The End footer position. - """ - END - - """ - The Inline footer position. - """ - INLINE -} - -""" -The header customizations. -""" -type CheckoutAndAccountsConfigurationBrandingHeader @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The header alignment. - """ - alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment - - """ - The background style of the header container. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The divided setting. - """ - divided: Boolean - - """ - The store logo. - """ - logo: CheckoutAndAccountsConfigurationBrandingLogo - - """ - The padding of the header container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The possible header alignments. -""" -enum CheckoutAndAccountsConfigurationBrandingHeaderAlignment @componentName(name: "checkouts") { - """ - Center alignment. - """ - CENTER - - """ - End alignment. - """ - END - - """ - Start alignment. - """ - START -} - -""" -The header cart link customizations. -""" -type CheckoutAndAccountsConfigurationBrandingHeaderCartLink @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - 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: CheckoutAndAccountsConfigurationBrandingCartLinkContentType - - """ - 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: CheckoutAndAccountsConfigurationBrandingImageValue -} - -""" -The input fields for customizing the cart link for 1-page checkout. This field -allows to customize the cart icon that renders by default on 1-page checkout. -""" -input CheckoutAndAccountsConfigurationBrandingHeaderCartLinkInput @componentName(name: "checkouts") { - """ - 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: CheckoutAndAccountsConfigurationBrandingCartLinkContentType - - """ - 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: CheckoutAndAccountsConfigurationBrandingImageInput -} - -""" -The input fields for customizing the header. -""" -input CheckoutAndAccountsConfigurationBrandingHeaderInput @componentName(name: "checkouts") { - """ - The header alignment. - """ - alignment: CheckoutAndAccountsConfigurationBrandingHeaderAlignment - - """ - The background style of the header container. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The colors customizations for the header container. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The divided setting. - """ - divided: Boolean - - """ - The store logo. - """ - logo: CheckoutAndAccountsConfigurationBrandingLogoInput - - """ - The padding of the header container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The possible header positions. -""" -enum CheckoutAndAccountsConfigurationBrandingHeaderPosition @componentName(name: "checkouts") { - """ - Inline position. - """ - INLINE - - """ - Secondary inline position. - """ - INLINE_SECONDARY - - """ - Start position. - """ - START -} - -""" -The heading level customizations. -""" -type CheckoutAndAccountsConfigurationBrandingHeadingLevel @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The typography. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypographyStyle -} - -""" -The input fields for customizing the heading level. -""" -input CheckoutAndAccountsConfigurationBrandingHeadingLevelInput @componentName(name: "checkouts") { - """ - The typography. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypographyStyleInput -} - -""" -The image. -""" -type CheckoutAndAccountsConfigurationBrandingImage @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The image details. - """ - image: Image -} - -""" -The input fields for customizing the image. -""" -input CheckoutAndAccountsConfigurationBrandingImageInput @oneOf @componentName(name: "checkouts") { - """ - A globally-unique ID. - """ - mediaImageId: ID @gidTypes(types: ["MediaImage"]) -} - -""" -The image value. -""" -union CheckoutAndAccountsConfigurationBrandingImageValue @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") = CheckoutAndAccountsConfigurationBrandingImage - -""" -The input fields for customizing Checkout and Customer Accounts branding. -""" -input CheckoutAndAccountsConfigurationBrandingInput @componentName(name: "checkouts") { - """ - The customizations that apply to specific components or areas of the user interface. - """ - components: CheckoutAndAccountsConfigurationBrandingComponentsInput - - """ - The design tokens 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. - """ - designTokens: CheckoutAndAccountsConfigurationBrandingDesignTokensInput - - """ - The surface-level customizations. - """ - surfaces: CheckoutAndAccountsConfigurationBrandingSurfacesInput -} - -""" -The label position options. -""" -enum CheckoutAndAccountsConfigurationBrandingLabelPosition @componentName(name: "checkouts") { - """ - The Inside label position. - """ - INSIDE - - """ - The Outside label position. - """ - OUTSIDE -} - -""" -The store logo customizations. -""" -type CheckoutAndAccountsConfigurationBrandingLogo @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The logo image. - """ - image: CheckoutAndAccountsConfigurationBrandingImageValue - - """ - The maximum width of the logo. - """ - maxWidth: Int - - """ - The visibility of the logo. - """ - visibility: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -The input fields for customizing the logo. -""" -input CheckoutAndAccountsConfigurationBrandingLogoInput @componentName(name: "checkouts") { - """ - The logo image. - """ - image: CheckoutAndAccountsConfigurationBrandingImageInput - - """ - The maximum width of the logo. - """ - maxWidth: Int - - """ - The visibility of the logo. - """ - visibility: CheckoutAndAccountsConfigurationBrandingVisibility -} - -""" -The main container customizations. -""" -type CheckoutAndAccountsConfigurationBrandingMain @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The main container's divider style and visibility. - """ - divider: CheckoutAndAccountsConfigurationBrandingContainerDivider - - """ - The main sections. - """ - section: CheckoutAndAccountsConfigurationBrandingMainSection -} - -""" -The input fields for customizing the main container. -""" -input CheckoutAndAccountsConfigurationBrandingMainInput @componentName(name: "checkouts") { - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - Divider style and visibility on the main container. - """ - divider: CheckoutAndAccountsConfigurationBrandingContainerDividerInput - - """ - The customizations for the main sections. - """ - section: CheckoutAndAccountsConfigurationBrandingMainSectionInput -} - -""" -The main sections customizations. -""" -type CheckoutAndAccountsConfigurationBrandingMainSection @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The background style of the main sections. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The border for the main sections. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The border style of the main sections. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The border width of the main sections. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The corner radius of the main sections. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The padding of the main sections. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The shadow of the main sections. - """ - shadow: CheckoutAndAccountsConfigurationBrandingShadow -} - -""" -The input fields for customizing the main sections. -""" -input CheckoutAndAccountsConfigurationBrandingMainSectionInput @componentName(name: "checkouts") { - """ - The background style of the main sections. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The border for the main sections. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The border style of the main sections. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The border width of the main sections. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The corner radius of the main sections. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The padding of the main sections. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The shadow of the main sections. - """ - shadow: CheckoutAndAccountsConfigurationBrandingShadow -} - -""" -The merchandise thumbnails customizations. -""" -type CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnail @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The merchandise thumbnail badge. - """ - badge: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadge - - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The property used to customize how the product image fits within merchandise thumbnails. - """ - fit: CheckoutAndAccountsConfigurationBrandingObjectFit -} - -""" -The merchandise thumbnail badges customizations. -""" -type CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadge @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The background. - """ - background: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeBackground -} - -""" -The merchandise thumbnail badge background. -""" -enum CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeBackground @componentName(name: "checkouts") { - """ - The Accent background. - """ - ACCENT - - """ - The Base background. - """ - BASE -} - -""" -The input fields for customizing the merchandise thumbnail badges. -""" -input CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeInput @componentName(name: "checkouts") { - """ - The background. - """ - background: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeBackground -} - -""" -The input fields for customizing the merchandise thumbnails. -""" -input CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailInput @componentName(name: "checkouts") { - """ - The aspect ratio. - """ - aspectRatio: Float - - """ - The merchandise thumbnail badge. - """ - badge: CheckoutAndAccountsConfigurationBrandingMerchandiseThumbnailBadgeInput - - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The corner radius. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The property used to customize how the product image fits within merchandise thumbnails. - """ - fit: CheckoutAndAccountsConfigurationBrandingObjectFit -} - -""" -Possible values for object fit. -""" -enum CheckoutAndAccountsConfigurationBrandingObjectFit @componentName(name: "checkouts") { - """ - 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 CheckoutAndAccountsConfigurationBrandingOrderSummary @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The background image of the order summary container. - """ - backgroundImage: CheckoutAndAccountsConfigurationBrandingImageValue - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The order summary container's divider style and visibility. - """ - divider: CheckoutAndAccountsConfigurationBrandingContainerDivider - - """ - The order summary sections. - """ - section: CheckoutAndAccountsConfigurationBrandingOrderSummarySection -} - -""" -The input fields for customizing the order summary container. -""" -input CheckoutAndAccountsConfigurationBrandingOrderSummaryInput @componentName(name: "checkouts") { - """ - The background image of the order summary container (must not be of SVG format). - """ - backgroundImage: CheckoutAndAccountsConfigurationBrandingImageInput - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - Divider style and visibility on the order summary container. - """ - divider: CheckoutAndAccountsConfigurationBrandingContainerDividerInput - - """ - The customizations for the order summary sections. - """ - section: CheckoutAndAccountsConfigurationBrandingOrderSummarySectionInput -} - -""" -The order summary sections customizations. -""" -type CheckoutAndAccountsConfigurationBrandingOrderSummarySection @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The background style of the order summary sections. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The border for the order summary sections. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The border style of the order summary sections. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The border width of the order summary sections. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The corner radius of the order summary sections. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The padding of the order summary sections. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The shadow of the order summary sections. - """ - shadow: CheckoutAndAccountsConfigurationBrandingShadow -} - -""" -The input fields for customizing the order summary sections. -""" -input CheckoutAndAccountsConfigurationBrandingOrderSummarySectionInput @componentName(name: "checkouts") { - """ - The background style of the order summary sections. - """ - background: CheckoutAndAccountsConfigurationBrandingBackground - - """ - The border for the order summary sections. - """ - border: CheckoutAndAccountsConfigurationBrandingSimpleBorder - - """ - The border style of the order summary sections. - """ - borderStyle: CheckoutAndAccountsConfigurationBrandingBorderStyle - - """ - The border width of the order summary sections. - """ - borderWidth: CheckoutAndAccountsConfigurationBrandingBorderWidth - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The corner radius of the order summary sections. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingCornerRadius - - """ - The padding of the order summary sections. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword - - """ - The shadow of the order summary sections. - """ - shadow: CheckoutAndAccountsConfigurationBrandingShadow -} - -""" -A set of colors used together on a surface. -""" -type CheckoutAndAccountsConfigurationBrandingPalette @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - A color in the palette (hex value). - """ - color1: String - - """ - A color in the palette (hex value). - """ - color10: String - - """ - A color in the palette (hex value). - """ - color11: String - - """ - A color in the palette (hex value). - """ - color12: String - - """ - A color in the palette (hex value). - """ - color13: String - - """ - A color in the palette (hex value). - """ - color14: String - - """ - A color in the palette (hex value). - """ - color15: String - - """ - A color in the palette (hex value). - """ - color16: String - - """ - A color in the palette (hex value). - """ - color17: String - - """ - A color in the palette (hex value). - """ - color18: String - - """ - A color in the palette (hex value). - """ - color19: String - - """ - A color in the palette (hex value). - """ - color2: String - - """ - A color in the palette (hex value). - """ - color20: String - - """ - A color in the palette (hex value). - """ - color3: String - - """ - A color in the palette (hex value). - """ - color4: String - - """ - A color in the palette (hex value). - """ - color5: String - - """ - A color in the palette (hex value). - """ - color6: String - - """ - A color in the palette (hex value). - """ - color7: String - - """ - A color in the palette (hex value). - """ - color8: String - - """ - A color in the palette (hex value). - """ - color9: String -} - -""" -The input fields to update the color palette. -""" -input CheckoutAndAccountsConfigurationBrandingPaletteInput @componentName(name: "checkouts") { - """ - A color in the palette (hex value). - """ - color1: String - - """ - A color in the palette (hex value). - """ - color10: String - - """ - A color in the palette (hex value). - """ - color11: String - - """ - A color in the palette (hex value). - """ - color12: String - - """ - A color in the palette (hex value). - """ - color13: String - - """ - A color in the palette (hex value). - """ - color14: String - - """ - A color in the palette (hex value). - """ - color15: String - - """ - A color in the palette (hex value). - """ - color16: String - - """ - A color in the palette (hex value). - """ - color17: String - - """ - A color in the palette (hex value). - """ - color18: String - - """ - A color in the palette (hex value). - """ - color19: String - - """ - A color in the palette (hex value). - """ - color2: String - - """ - A color in the palette (hex value). - """ - color20: String - - """ - A color in the palette (hex value). - """ - color3: String - - """ - A color in the palette (hex value). - """ - color4: String - - """ - A color in the palette (hex value). - """ - color5: String - - """ - A color in the palette (hex value). - """ - color6: String - - """ - A color in the palette (hex value). - """ - color7: String - - """ - A color in the palette (hex value). - """ - color8: String - - """ - A color in the palette (hex value). - """ - color9: String -} - -""" -The primary button color customizations. -""" -type CheckoutAndAccountsConfigurationBrandingPrimaryButtonColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - 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: CheckoutAndAccountsConfigurationBrandingColorRoles - - """ - The color of icons. - """ - icon: String - - """ - The color of text. - """ - text: String -} - -""" -The input fields for customizing colors for primary buttons. -""" -input CheckoutAndAccountsConfigurationBrandingPrimaryButtonColorRolesInput @componentName(name: "checkouts") { - """ - 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: CheckoutAndAccountsConfigurationBrandingColorRolesInput - - """ - The color of icons. - """ - icon: String - - """ - The color of text. - """ - text: String -} - -""" -The secondary button color customizations. -""" -type CheckoutAndAccountsConfigurationBrandingSecondaryButtonColorRoles @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - 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: CheckoutAndAccountsConfigurationBrandingColorRoles - - """ - The color of icons. - """ - icon: String - - """ - The color of text. - """ - text: String -} - -""" -The input fields for customizing colors for secondary buttons. -""" -input CheckoutAndAccountsConfigurationBrandingSecondaryButtonColorRolesInput @componentName(name: "checkouts") { - """ - 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: CheckoutAndAccountsConfigurationBrandingColorRolesInput - - """ - The color of icons. - """ - icon: String - - """ - The color of text. - """ - text: String -} - -""" -The selects customizations. -""" -type CheckoutAndAccountsConfigurationBrandingSelect @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingBorder - - """ - The typography. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypographyStyle -} - -""" -The input fields for customizing the selects. -""" -input CheckoutAndAccountsConfigurationBrandingSelectInput @componentName(name: "checkouts") { - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingBorder - - """ - The typography. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypographyStyleInput -} - -""" -The container shadow. -""" -enum CheckoutAndAccountsConfigurationBrandingShadow @componentName(name: "checkouts") { - """ - The Base shadow. - """ - BASE - - """ - The Large 100 shadow. - """ - LARGE_100 - - """ - The Large 200 shadow. - """ - LARGE_200 - - """ - The Small 100 shadow. - """ - SMALL_100 - - """ - The Small 200 shadow. - """ - SMALL_200 -} - -""" -The shared customizations. -""" -type CheckoutAndAccountsConfigurationBrandingShared @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The shared color customizations for semantic and functional colors. - """ - colors: CheckoutAndAccountsConfigurationBrandingSharedColors - - """ - The shared corner radius setting that overrides all other [corner radius](https://shopify.dev/docs/api/admin-graphql/latest/enums/CheckoutAndAccountsConfigurationBrandingCornerRadius) - customizations. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingSharedCornerRadius - - """ - The shared typography customizations. - """ - typography: CheckoutAndAccountsConfigurationBrandingSharedTypographyStyle -} - -""" -Shared color customizations for semantic and functional colors. -""" -type CheckoutAndAccountsConfigurationBrandingSharedColors @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The accent color for interactive elements. - """ - accent: String - - """ - The button color. - """ - button: String - - """ - The form control color. - """ - control: String - - """ - The critical/error color. - """ - critical: String - - """ - The decorative color. - """ - decorative: String - - """ - The informational color. - """ - info: String - - """ - The success color. - """ - success: String - - """ - The warning color. - """ - warning: String -} - -""" -The input fields for customizing shared colors. -""" -input CheckoutAndAccountsConfigurationBrandingSharedColorsInput @componentName(name: "checkouts") { - """ - The accent color for interactive elements. - """ - accent: String - - """ - The button color. - """ - button: String - - """ - The form control color. - """ - control: String - - """ - The critical/error color. - """ - critical: String - - """ - The decorative color. - """ - decorative: String - - """ - The informational color. - """ - info: String - - """ - The success color. - """ - success: String - - """ - The warning color. - """ - warning: String -} - -""" -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). -""" -enum CheckoutAndAccountsConfigurationBrandingSharedCornerRadius @componentName(name: "checkouts") { - """ - Set the shared corner radius override to 0px (square corners). - """ - NONE -} - -""" -The input fields for customizing the shared settings. -""" -input CheckoutAndAccountsConfigurationBrandingSharedInput @componentName(name: "checkouts") { - """ - The shared color customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingSharedColorsInput - - """ - Select a shared corner radius setting that overrides all other corner radii customizations. - """ - cornerRadius: CheckoutAndAccountsConfigurationBrandingSharedCornerRadius - - """ - The shared typography customizations. - """ - typography: CheckoutAndAccountsConfigurationBrandingSharedTypographyStyleInput -} - -""" -The shared typography customizations. -""" -type CheckoutAndAccountsConfigurationBrandingSharedTypographyStyle @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The kerning. - """ - kerning: CheckoutAndAccountsConfigurationBrandingTypographyKerning - - """ - The letter case. - """ - letterCase: CheckoutAndAccountsConfigurationBrandingTypographyLetterCase -} - -""" -The input fields for customizing the shared typography. -""" -input CheckoutAndAccountsConfigurationBrandingSharedTypographyStyleInput @componentName(name: "checkouts") { - """ - The kerning. - """ - kerning: CheckoutAndAccountsConfigurationBrandingTypographyKerning - - """ - The letter case. - """ - letterCase: CheckoutAndAccountsConfigurationBrandingTypographyLetterCase -} - -""" -The Shopify font customizations. -""" -type CheckoutAndAccountsConfigurationBrandingShopifyFont @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The font sources. - """ - sources: String - - """ - The font weight. - """ - weight: Int -} - -""" -The Shopify font group customizations. -""" -type CheckoutAndAccountsConfigurationBrandingShopifyFontGroup @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The base Shopify font. - """ - base: CheckoutAndAccountsConfigurationBrandingShopifyFont - - """ - The bold Shopify font. - """ - bold: CheckoutAndAccountsConfigurationBrandingShopifyFont - - """ - The font loading strategy. - """ - loadingStrategy: CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy - - """ - The font group name. - """ - name: String -} - -""" -The input fields for customizing a Shopify font group. -""" -input CheckoutAndAccountsConfigurationBrandingShopifyFontGroupInput @componentName(name: "checkouts") { - """ - The Shopify base font handle. - """ - baseFontHandle: String! - - """ - The Shopify bold font handle. - """ - boldFontHandle: String! - - """ - The font loading strategy. - """ - loadingStrategy: CheckoutAndAccountsConfigurationBrandingFontLoadingStrategy -} - -""" -The sign-in-specific component customizations. -""" -type CheckoutAndAccountsConfigurationBrandingSignInComponents @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The header customizations. - """ - header: CheckoutAndAccountsConfigurationBrandingSignInHeader - - """ - The main customizations. - """ - main: CheckoutAndAccountsConfigurationBrandingSignInMain -} - -""" -The input fields for customizing the sign-in components. -""" -input CheckoutAndAccountsConfigurationBrandingSignInComponentsInput @componentName(name: "checkouts") { - """ - The header customizations. - """ - header: CheckoutAndAccountsConfigurationBrandingSignInHeaderInput - - """ - The main customizations. - """ - main: CheckoutAndAccountsConfigurationBrandingSignInMainInput -} - -""" -The sign-in header customizations. -""" -type CheckoutAndAccountsConfigurationBrandingSignInHeader @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The store logo. - """ - logo: CheckoutAndAccountsConfigurationBrandingSignInLogo - - """ - The padding of the header container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The input fields for customizing the sign-in header. -""" -input CheckoutAndAccountsConfigurationBrandingSignInHeaderInput @componentName(name: "checkouts") { - """ - The store logo. - """ - logo: CheckoutAndAccountsConfigurationBrandingSignInLogoInput - - """ - The padding of the header container. - """ - padding: CheckoutAndAccountsConfigurationBrandingSpacingKeyword -} - -""" -The sign-in store logo customizations. -""" -type CheckoutAndAccountsConfigurationBrandingSignInLogo @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The logo image. - """ - image: CheckoutAndAccountsConfigurationBrandingImageValue - - """ - The maximum width of the logo. - """ - maxWidth: Int -} - -""" -The input fields for customizing the sign-in logo. -""" -input CheckoutAndAccountsConfigurationBrandingSignInLogoInput @componentName(name: "checkouts") { - """ - The logo image. - """ - image: CheckoutAndAccountsConfigurationBrandingImageInput - - """ - The maximum width of the logo. - """ - maxWidth: Int -} - -""" -The sign-in-specific main customizations. -""" -type CheckoutAndAccountsConfigurationBrandingSignInMain @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The background image of the main container. - """ - backgroundImage: CheckoutAndAccountsConfigurationBrandingImageValue - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColors - - """ - The main sections. - """ - section: CheckoutAndAccountsConfigurationBrandingMainSection -} - -""" -The input fields for customizing the sign-in main container. -""" -input CheckoutAndAccountsConfigurationBrandingSignInMainInput @componentName(name: "checkouts") { - """ - The background image of the main container. - """ - backgroundImage: CheckoutAndAccountsConfigurationBrandingImageInput - - """ - The colors customizations. - """ - colors: CheckoutAndAccountsConfigurationBrandingColorsInput - - """ - The customizations for the main sections. - """ - section: CheckoutAndAccountsConfigurationBrandingMainSectionInput -} - -""" -The sign-in-specific component customizations. -""" -type CheckoutAndAccountsConfigurationBrandingSignInSurface @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The sign-in components. - """ - components: CheckoutAndAccountsConfigurationBrandingSignInComponents -} - -""" -The input fields for customizing the sign-in surface. -""" -input CheckoutAndAccountsConfigurationBrandingSignInSurfaceInput @componentName(name: "checkouts") { - """ - The sign-in components. - """ - components: CheckoutAndAccountsConfigurationBrandingSignInComponentsInput -} - -""" -Possible values for the simple border. -""" -enum CheckoutAndAccountsConfigurationBrandingSimpleBorder @componentName(name: "checkouts") { - """ - The Full simple border. - """ - FULL - - """ - The None simple border. - """ - NONE -} - -""" -Possible values for the spacing. -""" -enum CheckoutAndAccountsConfigurationBrandingSpacing @componentName(name: "checkouts") { - """ - The Base spacing. - """ - BASE - - """ - The Extra Loose spacing. - """ - EXTRA_LOOSE - - """ - The Extra Tight spacing. - """ - EXTRA_TIGHT - - """ - The Loose spacing. - """ - LOOSE - - """ - The None spacing. - """ - NONE - - """ - The Tight spacing. - """ - TIGHT -} - -""" -The spacing between UI elements. -""" -enum CheckoutAndAccountsConfigurationBrandingSpacingKeyword @componentName(name: "checkouts") { - """ - The Base spacing. - """ - BASE - - """ - 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 None spacing. - """ - NONE - - """ - 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 surface-specific component customizations for checkout and customer accounts. -""" -type CheckoutAndAccountsConfigurationBrandingSurfaces @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The checkout-specific component overrides. - """ - checkout: CheckoutAndAccountsConfigurationBrandingCheckoutSurface - - """ - The customer accounts-specific component overrides. - """ - customerAccounts: CheckoutAndAccountsConfigurationBrandingCustomerAccountsSurface - - """ - The sign-in-specific component overrides. - """ - signIn: CheckoutAndAccountsConfigurationBrandingSignInSurface -} - -""" -The input fields for customizing surfaces branding. -""" -input CheckoutAndAccountsConfigurationBrandingSurfacesInput @componentName(name: "checkouts") { - """ - The checkout surface customizations. - """ - checkout: CheckoutAndAccountsConfigurationBrandingCheckoutSurfaceInput - - """ - The customer accounts surface customizations. - """ - customerAccounts: CheckoutAndAccountsConfigurationBrandingCustomerAccountsSurfaceInput - - """ - The sign-in surface customizations. - """ - signIn: CheckoutAndAccountsConfigurationBrandingSignInSurfaceInput -} - -""" -The text fields customizations. -""" -type CheckoutAndAccountsConfigurationBrandingTextField @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingBorder - - """ - The typography. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypographyStyle -} - -""" -The input fields for customizing the text fields. -""" -input CheckoutAndAccountsConfigurationBrandingTextFieldInput @componentName(name: "checkouts") { - """ - The border. - """ - border: CheckoutAndAccountsConfigurationBrandingBorder - - """ - The typography. - """ - typography: CheckoutAndAccountsConfigurationBrandingTypographyStyleInput -} - -""" -The typography customizations. -""" -type CheckoutAndAccountsConfigurationBrandingTypography @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The font group used for most components such as text, buttons and form controls. - """ - primary: CheckoutAndAccountsConfigurationBrandingFontGroup - - """ - The font group used for heading components by default. - """ - secondary: CheckoutAndAccountsConfigurationBrandingFontGroup - - """ - The font size (base size in pixels and scaling between different sizes). - """ - size: CheckoutAndAccountsConfigurationBrandingFontSize -} - -""" -The font selection. -""" -enum CheckoutAndAccountsConfigurationBrandingTypographyFont @componentName(name: "checkouts") { - """ - The primary font. - """ - PRIMARY - - """ - The secondary font. - """ - SECONDARY -} - -""" -The input fields for customizing the typography. -""" -input CheckoutAndAccountsConfigurationBrandingTypographyInput @componentName(name: "checkouts") { - """ - The font group used for most components such as text, buttons and form controls. - """ - primary: CheckoutAndAccountsConfigurationBrandingFontGroupInput - - """ - The font group used for heading components by default. - """ - secondary: CheckoutAndAccountsConfigurationBrandingFontGroupInput - - """ - The font size. - """ - size: CheckoutAndAccountsConfigurationBrandingFontSizeInput -} - -""" -Possible values for the typography kerning. -""" -enum CheckoutAndAccountsConfigurationBrandingTypographyKerning @componentName(name: "checkouts") { - """ - Base or default kerning. - """ - BASE - - """ - Extra loose kerning, leaving even more space in between characters. - """ - EXTRA_LOOSE - - """ - Loose kerning, leaving more space than the default in between characters. - """ - LOOSE -} - -""" -Possible values for the typography letter case. -""" -enum CheckoutAndAccountsConfigurationBrandingTypographyLetterCase @componentName(name: "checkouts") { - """ - 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. -""" -enum CheckoutAndAccountsConfigurationBrandingTypographySize @componentName(name: "checkouts") { - """ - The Base font size. Example: 14px. - """ - BASE - - """ - The Extra extra large font size. Example: 24px. - """ - EXTRA_EXTRA_LARGE - - """ - The Extra large font size. Example: 21px. - """ - EXTRA_LARGE - - """ - The Extra small font size. Example: 10px. - """ - EXTRA_SMALL - - """ - The Large font size. Example: 19px. - """ - LARGE - - """ - The Medium font size. Example: 16px. - """ - MEDIUM - - """ - The Small font size. Example: 12px. - """ - SMALL -} - -""" -The typography customizations. -""" -type CheckoutAndAccountsConfigurationBrandingTypographyStyle @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The font. - """ - font: CheckoutAndAccountsConfigurationBrandingTypographyFont - - """ - The kerning. - """ - kerning: CheckoutAndAccountsConfigurationBrandingTypographyKerning - - """ - The letter case. - """ - letterCase: CheckoutAndAccountsConfigurationBrandingTypographyLetterCase - - """ - The font size. - """ - size: CheckoutAndAccountsConfigurationBrandingTypographySize - - """ - The font weight. - """ - weight: CheckoutAndAccountsConfigurationBrandingTypographyWeight -} - -""" -The input fields for customizing the typography. -""" -input CheckoutAndAccountsConfigurationBrandingTypographyStyleInput @componentName(name: "checkouts") { - """ - The font. - """ - font: CheckoutAndAccountsConfigurationBrandingTypographyFont - - """ - The kerning. - """ - kerning: CheckoutAndAccountsConfigurationBrandingTypographyKerning - - """ - The letter case. - """ - letterCase: CheckoutAndAccountsConfigurationBrandingTypographyLetterCase - - """ - The font size. - """ - size: CheckoutAndAccountsConfigurationBrandingTypographySize - - """ - The font weight. - """ - weight: CheckoutAndAccountsConfigurationBrandingTypographyWeight -} - -""" -Possible values for the font weight. -""" -enum CheckoutAndAccountsConfigurationBrandingTypographyWeight @componentName(name: "checkouts") { - """ - The base weight. - """ - BASE - - """ - The bold weight. - """ - BOLD -} - -""" -Possible visibility states. -""" -enum CheckoutAndAccountsConfigurationBrandingVisibility @componentName(name: "checkouts") { - """ - The Hidden visibility setting. - """ - HIDDEN - - """ - The Visible visibility setting. - """ - VISIBLE -} - -""" -An auto-generated type for paginating through multiple CheckoutAndAccountsConfigurations. -""" -type CheckoutAndAccountsConfigurationConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [CheckoutAndAccountsConfigurationEdge!]! - - """ - A list of nodes that are contained in CheckoutAndAccountsConfigurationEdge. - 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: [CheckoutAndAccountsConfiguration!]! - - """ - 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 CheckoutAndAccountsConfiguration and a cursor during pagination. -""" -type CheckoutAndAccountsConfigurationEdge @componentName(name: "checkouts") { - """ - 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 CheckoutAndAccountsConfigurationEdge. - """ - node: CheckoutAndAccountsConfiguration! -} - -""" -The input fields for checkout and account configurations. -""" -input CheckoutAndAccountsConfigurationInput @componentName(name: "checkouts") { - """ - The branding settings of the configuration. - """ - branding: CheckoutAndAccountsConfigurationBrandingInput - - """ - The overrides to create/update in the configuration. - """ - overrides: [CheckoutAndAccountsConfigurationOverrideInput!] -} - -""" -Represents a checkout and accounts configuration interface. -""" -interface CheckoutAndAccountsConfigurationInterface @componentName(name: "checkouts") { - """ - The branding configuration. - """ - branding: CheckoutAndAccountsConfigurationBranding - - """ - The date and time when the configuration was created. - """ - createdAt: DateTime! - - """ - The date and time when the configuration was last edited. - """ - editedAt: DateTime! - - """ - The configuration name. - """ - name: String! - - """ - The date and time when the configuration was last updated. - """ - updatedAt: DateTime! -} - -""" -A checkout and account configuration override modifies a parent configuration for specific markets. -""" -type CheckoutAndAccountsConfigurationOverride implements CheckoutAndAccountsConfigurationInterface & Node @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The branding configuration. - """ - branding: CheckoutAndAccountsConfigurationBranding - - """ - The date and time when the configuration was created. - """ - createdAt: DateTime! - - """ - The date and time when the configuration was last edited. - """ - editedAt: DateTime! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The configuration name. - """ - name: String! - - """ - The date and time when the configuration was last updated. - """ - updatedAt: DateTime! -} - -""" -The input fields for checkout and account configuration overrides. -""" -input CheckoutAndAccountsConfigurationOverrideInput @componentName(name: "checkouts") { - """ - The branding settings of the configuration. - """ - branding: CheckoutAndAccountsConfigurationBrandingInput - - """ - The ID of the configuration override to update. - """ - id: ID @gidTypes(types: ["ConfigurationOverride"]) -} - -""" -Return type for `checkoutAndAccountsConfigurationUpdate` mutation. -""" -type CheckoutAndAccountsConfigurationUpdatePayload @componentName(name: "platform") { - """ - The updated configuration. - """ - configuration: CheckoutAndAccountsConfiguration - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [CheckoutAndAccountsConfigurationUserError!]! -} - -""" -An error that occurs during the execution of a mutation for managing checkout and accounts configurations. -""" -type CheckoutAndAccountsConfigurationUserError implements DisplayableError @requiredAccess(scope: "`read_checkout_and_accounts_configurations` access scope or `read_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") @componentName(name: "checkouts") { - """ - The error code. - """ - code: CheckoutAndAccountsConfigurationUserErrorCode - - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! - - """ - The reason for the error. - """ - reason: String! -} - -""" -Possible error codes that can be returned by `CheckoutAndAccountsConfigurationUserError`. -""" -enum CheckoutAndAccountsConfigurationUserErrorCode @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - Internal error. Looks like something went wrong on our end. - """ - INTERNAL_SERVER_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - One or more required fields are missing in the input. - """ - MISSING - - """ - One or more requested items couldn't be found. - """ - NOT_FOUND - - """ - The request could not be completed — please try again later. - """ - TRANSIENT -} - -""" -The set of valid sort keys for the CheckoutAndAccountsConfigurationsGraphQL query. -""" -enum CheckoutAndAccountsConfigurationsGraphQLSortKeys @componentName(name: "platform") { - """ - 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 -} - -""" -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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The Base background style. - """ - BASE - - """ - The Subdued background style. - """ - SUBDUED - - """ - The Transparent background style. - """ - TRANSPARENT -} - -""" -Possible values for the background style. -""" -enum CheckoutBrandingBackgroundStyle @componentName(name: "checkouts") { - """ - The None background style. - """ - NONE - - """ - The Solid background style. - """ - SOLID -} - -""" -Possible values for the border. -""" -enum CheckoutBrandingBorder @componentName(name: "checkouts") { - """ - The Block End border. - """ - BLOCK_END - - """ - The Full border. - """ - FULL - - """ - The None border. - """ - NONE -} - -""" -The container border style. -""" -enum CheckoutBrandingBorderStyle @componentName(name: "checkouts") { - """ - The Base border style. - """ - BASE - - """ - The Dashed border style. - """ - DASHED - - """ - The Dotted border style. - """ - DOTTED -} - -""" -The container border width. -""" -enum CheckoutBrandingBorderWidth @componentName(name: "checkouts") { - """ - The Base border width. - """ - BASE - - """ - The Large border width. - """ - LARGE - - """ - The Large 100 border width. - """ - LARGE_100 - - """ - The Large 200 border width. - """ - LARGE_200 -} - -""" -The buttons customizations. -""" -type CheckoutBrandingButton @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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: CheckoutBrandingColorRolesInput - - """ - The color of icons. - """ - icon: String - - """ - The color of text. - """ - text: String -} - -""" -The input fields used to update the buttons customizations. -""" -input CheckoutBrandingButtonInput @componentName(name: "checkouts") { - """ - 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 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - Whether the cart link is visible at checkout. - """ - visibility: CheckoutBrandingVisibility -} - -""" -Possible values for the cart link content type for the header. -""" -enum CheckoutBrandingCartLinkContentType @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The corner radius used for checkboxes. - """ - cornerRadius: CheckoutBrandingCornerRadius -} - -""" -The input fields used to update the checkboxes customizations. -""" -input CheckoutBrandingCheckboxInput @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The spacing between UI elements in the list. - """ - spacing: CheckoutBrandingSpacingKeyword -} - -""" -The input fields to use to update the choice list customizations. -""" -input CheckoutBrandingChoiceListInput @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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, such as **Pay now**, and secondary buttons, such as **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 -} - -""" -A set of colors to apply to different parts of the UI. -""" -type CheckoutBrandingColorGroup @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - A color used for visual accents such as spinners. - """ - accent: String - - """ - A color used for backgrounds. - """ - background: String - - """ - A color used for components that sit on backgrounds like text and form controls. - """ - foreground: String -} - -""" -The input fields used to update a color group. -""" -input CheckoutBrandingColorGroupInput @componentName(name: "checkouts") { - """ - A color used for visual accents such as spinners. - """ - accent: String - - """ - A color used for backgrounds. - """ - background: String - - """ - A color used for components that sit on backgrounds like text and form controls. - """ - foreground: String -} - -""" -The color palette. -""" -type CheckoutBrandingColorPalette @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - A color group used for loading screens. - """ - canvas: CheckoutBrandingColorGroup - - """ - A color group used for the main content area. - """ - color1: CheckoutBrandingColorGroup - - """ - A color group used for secondary content such as the order summary. - """ - color2: CheckoutBrandingColorGroup - - """ - A color group used for critical information such as errors. - """ - critical: CheckoutBrandingColorGroup - - """ - A color group used for interactive components such as links. - """ - interactive: CheckoutBrandingColorGroup - - """ - A color group used for primary action buttons. - """ - primary: CheckoutBrandingColorGroup -} - -""" -The input fields used to update the color palette. -""" -input CheckoutBrandingColorPaletteInput @componentName(name: "checkouts") { - """ - A color group used for loading screens. - """ - canvas: CheckoutBrandingColorGroupInput - - """ - A color group used for the main content area. - """ - color1: CheckoutBrandingColorGroupInput - - """ - A color group used for secondary content such as the order summary. - """ - color2: CheckoutBrandingColorGroupInput - - """ - A color group for critical information such as errors. - """ - critical: CheckoutBrandingColorGroupInput - - """ - A color group used for interactive components such as links. - """ - interactive: CheckoutBrandingColorGroupInput - - """ - A color group used for primary action buttons. - """ - primary: CheckoutBrandingColorGroupInput -} - -""" -A group of colors used together on a surface. -""" -type CheckoutBrandingColorRoles @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 -} - -""" -A base set of color customizations that's applied to an area of Checkout, from which every component -pulls its colors. -""" -type CheckoutBrandingColorScheme @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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_SCHEME5 color scheme selection. - """ - COLOR_SCHEME5 - - """ - The COLOR_SCHEME6 color scheme selection. - """ - COLOR_SCHEME6 - - """ - The TRANSPARENT color scheme selection. - """ - TRANSPARENT -} - -""" -The color schemes. -""" -type CheckoutBrandingColorSchemes @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 - - """ - An extra scheme available to customize more surfaces, components or specific states of the user interface. - """ - scheme5: CheckoutBrandingColorScheme - - """ - An extra scheme available to customize more surfaces, components or specific states of the user interface. - """ - scheme6: CheckoutBrandingColorScheme -} - -""" -The input fields for the color schemes. -""" -input CheckoutBrandingColorSchemesInput @componentName(name: "checkouts") { - """ - 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 - - """ - An extra scheme available to customize more surfaces, components or specific states of the user interface. - """ - scheme5: CheckoutBrandingColorSchemeInput - - """ - An extra scheme available to customize more surfaces, components or specific states of the user interface. - """ - scheme6: CheckoutBrandingColorSchemeInput -} - -""" -The possible colors. -""" -enum CheckoutBrandingColorSelection @componentName(name: "checkouts") { - """ - Color1 color selection. - """ - COLOR1 @deprecated(reason: "Modify the control colors for the scheme applied to the desired section instead. For example, to change the control background color when `main` is set to `scheme1`, set `design_system.colors.schemes.scheme1.control.background`.\n") - - """ - Color2 color selection. - """ - COLOR2 @deprecated(reason: "Modify the control colors for the scheme applied to the desired section instead. For example, to change the control background color when `main` is set to `scheme1`, set `design_system.colors.schemes.scheme1.control.background`.\n") - - """ - Transparent color selection. - """ - TRANSPARENT -} - -""" -The color settings for global colors and color schemes. -""" -type CheckoutBrandingColors @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The divider style. - """ - borderStyle: CheckoutBrandingBorderStyle - - """ - The divider width. - """ - borderWidth: CheckoutBrandingBorderWidth - - """ - The divider visibility. - """ - visibility: CheckoutBrandingVisibility -} - -""" -The content container customizations. -""" -type CheckoutBrandingContent @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The content container's divider style and visibility. - """ - divider: CheckoutBrandingContainerDivider -} - -""" -The input fields used to update the content container customizations. -""" -input CheckoutBrandingContentInput @componentName(name: "checkouts") { - """ - Divider style and visibility on the content container. - """ - divider: CheckoutBrandingContainerDividerInput -} - -""" -The form controls customizations. -""" -type CheckoutBrandingControl @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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: CheckoutBrandingColorRolesInput - - """ - The color of text. - """ - text: String -} - -""" -The input fields used to update the form controls customizations. -""" -input CheckoutBrandingControlInput @componentName(name: "checkouts") { - """ - 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 -} - -""" -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 @componentName(name: "checkouts") { - """ - 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 - - """ - The 0px corner radius (square corners). - """ - NONE - - """ - The corner radius with a pixel value defined by designSystem.cornerRadius.small. - """ - SMALL -} - -""" -Define the pixel size of corner radius options. -""" -type CheckoutBrandingCornerRadiusVariables @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 - - """ - The value in pixels for small corner radii. It should be greater than zero. Example: 3. - """ - small: Int -} - -""" -A custom font. -""" -type CheckoutBrandingCustomFont implements CheckoutBrandingFont @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - A globally-unique ID for a font file uploaded via the Files api. - Allowed font types are .woff and .woff2. - """ - genericFileId: ID! @gidTypes(types: ["GenericFile"]) - - """ - The font weight. Its value should be between 100 and 900. - """ - weight: Int! -} - -""" -The customizations that apply to specific components or areas of the user interface. -""" -type CheckoutBrandingCustomizations @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 checkboxes customizations. - """ - checkbox: CheckoutBrandingCheckboxInput - - """ - The choice list customizations. - """ - choiceList: CheckoutBrandingChoiceListInput - - """ - The content container customizations. - """ - content: CheckoutBrandingContentInput - - """ - The form controls customizations. - """ - control: CheckoutBrandingControlInput - - """ - 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 express checkout customizations. - """ - expressCheckout: CheckoutBrandingExpressCheckoutInput - - """ - The favicon image (must be of PNG format). - """ - favicon: CheckoutBrandingImageInput - - """ - The footer customizations. - """ - footer: CheckoutBrandingFooterInput - - """ - 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 main area customizations. - """ - main: CheckoutBrandingMainInput - - """ - The merchandise thumbnails customizations. - """ - merchandiseThumbnail: CheckoutBrandingMerchandiseThumbnailInput - - """ - The order summary customizations. - """ - orderSummary: CheckoutBrandingOrderSummaryInput - - """ - The primary buttons customizations. - """ - primaryButton: CheckoutBrandingButtonInput - - """ - The secondary buttons customizations. - """ - secondaryButton: CheckoutBrandingButtonInput - - """ - The selects customizations. - """ - select: CheckoutBrandingSelectInput - - """ - The text fields customizations. - """ - textField: CheckoutBrandingTextFieldInput -} - -""" -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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The color palette. - """ - colorPalette: CheckoutBrandingColorPalette @deprecated(reason: "Use `colors` instead.") - - """ - 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 @componentName(name: "checkouts") { - """ - The color palette. - """ - colorPalette: CheckoutBrandingColorPaletteInput @deprecated(reason: "This field has been replaced by `colors`.") - - """ - The color settings for global colors and color schemes. - """ - colors: CheckoutBrandingColorsInput - - """ - The corner radius variables. - """ - cornerRadius: CheckoutBrandingCornerRadiusVariablesInput - - """ - The typography. - """ - typography: CheckoutBrandingTypographyInput -} - -""" -The customizations for the page, content, main, and order summary dividers. -""" -type CheckoutBrandingDividerStyle @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The border style for the divider. - """ - borderStyle: CheckoutBrandingBorderStyle - - """ - The border width for the divider. - """ - borderWidth: CheckoutBrandingBorderWidth -} - -""" -The Express Checkout customizations. -""" -type CheckoutBrandingExpressCheckout @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The Express Checkout buttons customizations. - """ - button: CheckoutBrandingExpressCheckoutButton -} - -""" -The Express Checkout button customizations. -""" -type CheckoutBrandingExpressCheckoutButton @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The corner radius used for the Express Checkout buttons. - """ - cornerRadius: CheckoutBrandingCornerRadius -} - -""" -The input fields to use to update the express checkout customizations. -""" -input CheckoutBrandingExpressCheckoutButtonInput @componentName(name: "checkouts") { - """ - The corner radius used for Express Checkout buttons. - """ - cornerRadius: CheckoutBrandingCornerRadius -} - -""" -The input fields to use to update the Express Checkout customizations. -""" -input CheckoutBrandingExpressCheckoutInput @componentName(name: "checkouts") { - """ - The Express Checkout buttons customizations. - """ - button: CheckoutBrandingExpressCheckoutButtonInput -} - -""" -A font. -""" -interface CheckoutBrandingFont @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - A custom font group. - """ - customFontGroup: CheckoutBrandingCustomFontGroupInput - - """ - A Shopify font group. - """ - shopifyFontGroup: CheckoutBrandingShopifyFontGroupInput -} - -""" -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 @componentName(name: "checkouts") { - """ - 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 a short swap period. - """ - FALLBACK - - """ - Gives the font face an extremely small block period and no swap period. - """ - OPTIONAL - - """ - Gives the font face an extremely small block period and an infinite swap period. - """ - SWAP -} - -""" -The font size. -""" -type CheckoutBrandingFontSize @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The footer alignment. - """ - alignment: CheckoutBrandingFooterAlignment - - """ - The background style of the footer container. - """ - background: CheckoutBrandingBackground - - """ - 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 @componentName(name: "checkouts") { - """ - The checkout footer alignment Center value. - """ - CENTER - - """ - The checkout footer alignment End value. - """ - END - - """ - The checkout footer alignment Start value. - """ - START -} - -""" -The footer content customizations. -""" -type CheckoutBrandingFooterContent @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The visibility settings for footer content. - """ - visibility: CheckoutBrandingVisibility -} - -""" -The input fields for footer content customizations. -""" -input CheckoutBrandingFooterContentInput @componentName(name: "checkouts") { - """ - The visibility settings for footer content. - """ - visibility: CheckoutBrandingVisibility -} - -""" -The input fields when mutating the checkout footer settings. -""" -input CheckoutBrandingFooterInput @componentName(name: "checkouts") { - """ - The footer alignment settings. You can set the footer native content alignment to the left, center, or right. - """ - alignment: CheckoutBrandingFooterAlignment - - """ - The background style of the footer container. - """ - background: CheckoutBrandingBackground - - """ - The selected color scheme of the footer container. - """ - colorScheme: CheckoutBrandingColorSchemeSelection - - """ - The input field for setting the footer content customizations. - """ - content: CheckoutBrandingFooterContentInput - - """ - The divided setting. - """ - divided: Boolean - - """ - The padding of the footer container. - """ - padding: CheckoutBrandingSpacingKeyword - - """ - The input field for setting the footer position customizations. - """ - position: CheckoutBrandingFooterPosition -} - -""" -Possible values for the footer position. -""" -enum CheckoutBrandingFooterPosition @componentName(name: "checkouts") { - """ - The End footer position. - """ - END - - """ - The Inline footer position. - """ - INLINE -} - -""" -The global customizations. -""" -type CheckoutBrandingGlobal @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - Set the global corner radius override to 0px (square corners). - """ - NONE -} - -""" -The input fields used to update the global customizations. -""" -input CheckoutBrandingGlobalInput @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The header alignment. - """ - alignment: CheckoutBrandingHeaderAlignment - - """ - The background style of the header container. - """ - background: CheckoutBrandingBackground - - """ - 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 @componentName(name: "checkouts") { - """ - Center alignment. - """ - CENTER - - """ - End alignment. - """ - END - - """ - Start alignment. - """ - START -} - -""" -The header cart link customizations. -""" -type CheckoutBrandingHeaderCartLink @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The header alignment. - """ - alignment: CheckoutBrandingHeaderAlignment - - """ - The background style of the header container. - """ - background: CheckoutBrandingBackground - - """ - The background image of the header (must not be of SVG format). - """ - banner: CheckoutBrandingImageInput - - """ - 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 divided setting. - """ - divided: Boolean - - """ - The store logo. - """ - logo: CheckoutBrandingLogoInput - - """ - The padding of the header container. - """ - padding: CheckoutBrandingSpacingKeyword - - """ - The header position. - """ - position: CheckoutBrandingHeaderPosition -} - -""" -The possible header positions. -""" -enum CheckoutBrandingHeaderPosition @componentName(name: "checkouts") { - """ - Inline position. - """ - INLINE - - """ - Secondary inline position. - """ - INLINE_SECONDARY - - """ - Start position. - """ - START -} - -""" -The heading level customizations. -""" -type CheckoutBrandingHeadingLevel @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The typography customizations used for headings. - """ - typography: CheckoutBrandingTypographyStyle -} - -""" -The input fields for heading level customizations. -""" -input CheckoutBrandingHeadingLevelInput @componentName(name: "checkouts") { - """ - The typography customizations used for headings. - """ - typography: CheckoutBrandingTypographyStyleInput -} - -""" -A checkout branding image. -""" -type CheckoutBrandingImage @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The image details. - """ - image: Image -} - -""" -The input fields used to update a checkout branding image uploaded via the Files API. -""" -input CheckoutBrandingImageInput @componentName(name: "checkouts") { - """ - A globally-unique ID. - """ - mediaImageId: ID @gidTypes(types: ["MediaImage"]) -} - -""" -The input fields used to upsert the checkout branding settings. -""" -input CheckoutBrandingInput @componentName(name: "checkouts") { - """ - The customizations that apply to specific components or areas of the user interface. - """ - customizations: CheckoutBrandingCustomizationsInput - - """ - 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 -} - -""" -Possible values for the label position. -""" -enum CheckoutBrandingLabelPosition @componentName(name: "checkouts") { - """ - The Inside label position. - """ - INSIDE - - """ - The Outside label position. - """ - OUTSIDE -} - -""" -The store logo customizations. -""" -type CheckoutBrandingLogo @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The background image of the main container (must not be of SVG format). - """ - backgroundImage: CheckoutBrandingImageInput - - """ - The selected color scheme for the main container of the checkout. - """ - colorScheme: CheckoutBrandingColorSchemeSelection - - """ - Divider style and visibility on the main container. - """ - divider: CheckoutBrandingContainerDividerInput - - """ - The settings for the main sections. - """ - section: CheckoutBrandingMainSectionInput -} - -""" -The main sections customizations. -""" -type CheckoutBrandingMainSection @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 for 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 merchandise thumbnails customizations. -""" -type CheckoutBrandingMerchandiseThumbnail @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The background used for merchandise thumbnail badges. - """ - background: CheckoutBrandingMerchandiseThumbnailBadgeBackground -} - -""" -The merchandise thumbnail badge background. -""" -enum CheckoutBrandingMerchandiseThumbnailBadgeBackground @componentName(name: "checkouts") { - """ - The Accent background. - """ - ACCENT - - """ - The Base background. - """ - BASE -} - -""" -The input fields used to update the merchandise thumbnail badges customizations. -""" -input CheckoutBrandingMerchandiseThumbnailBadgeInput @componentName(name: "checkouts") { - """ - The background used for merchandise thumbnail badges. - """ - background: CheckoutBrandingMerchandiseThumbnailBadgeBackground -} - -""" -The input fields used to update the merchandise thumbnails customizations. -""" -input CheckoutBrandingMerchandiseThumbnailInput @componentName(name: "checkouts") { - """ - The settings for the merchandise thumbnail badge. - """ - badge: CheckoutBrandingMerchandiseThumbnailBadgeInput - - """ - 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 -} - -""" -Possible values for object fit. -""" -enum CheckoutBrandingObjectFit @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The background image of the order summary container (must not be of SVG format). - """ - backgroundImage: CheckoutBrandingImageInput - - """ - The selected color scheme for the order summary container of the checkout. - """ - colorScheme: CheckoutBrandingColorSchemeSelection - - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 for 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 selects customizations. -""" -type CheckoutBrandingSelect @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The border used for selects. - """ - border: CheckoutBrandingBorder - - """ - The typography customizations used for selects. - """ - typography: CheckoutBrandingTypographyStyleInput -} - -""" -The container shadow. -""" -enum CheckoutBrandingShadow @componentName(name: "checkouts") { - """ - The Base shadow. - """ - BASE - - """ - The Large 100 shadow. - """ - LARGE_100 - - """ - The Large 200 shadow. - """ - LARGE_200 - - """ - The Small 100 shadow. - """ - SMALL_100 - - """ - The Small 200 shadow. - """ - SMALL_200 -} - -""" -A Shopify font. -""" -type CheckoutBrandingShopifyFont implements CheckoutBrandingFont @componentName(name: "checkouts") { - """ - The font sources. - """ - sources: String - - """ - The font weight. - """ - weight: Int -} - -""" -The input fields used to update a Shopify font group. -""" -input CheckoutBrandingShopifyFontGroupInput @componentName(name: "checkouts") { - """ - The base font weight. - """ - baseWeight: Int - - """ - The bold font weight. - """ - boldWeight: Int - - """ - The font loading strategy. - """ - loadingStrategy: CheckoutBrandingFontLoadingStrategy - - """ - 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! -} - -""" -Possible values for the simple border. -""" -enum CheckoutBrandingSimpleBorder @componentName(name: "checkouts") { - """ - The Full simple border. - """ - FULL - - """ - The None simple border. - """ - NONE -} - -""" -Possible values for the spacing. -""" -enum CheckoutBrandingSpacing @componentName(name: "checkouts") { - """ - The Base spacing. - """ - BASE - - """ - The Extra Loose spacing. - """ - EXTRA_LOOSE - - """ - The Extra Tight spacing. - """ - EXTRA_TIGHT - - """ - The Loose spacing. - """ - LOOSE - - """ - The None spacing. - """ - NONE - - """ - The Tight spacing. - """ - TIGHT -} - -""" -The spacing between UI elements. -""" -enum CheckoutBrandingSpacingKeyword @componentName(name: "checkouts") { - """ - The Base spacing. - """ - BASE - - """ - 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 None spacing. - """ - NONE - - """ - 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 text fields customizations. -""" -type CheckoutBrandingTextField @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 - - """ - The font size. - """ - size: CheckoutBrandingFontSizeInput -} - -""" -Possible values for the typography kerning. -""" -enum CheckoutBrandingTypographyKerning @componentName(name: "checkouts") { - """ - Base or default kerning. - """ - BASE - - """ - Extra loose kerning, leaving even more space in between characters. - """ - EXTRA_LOOSE - - """ - Loose kerning, leaving more space than the default in between characters. - """ - LOOSE -} - -""" -Possible values for the typography letter case. -""" -enum CheckoutBrandingTypographyLetterCase @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The base font size. Example: 14px. - """ - BASE - - """ - The extra extra large font size. Example: 24px. - """ - EXTRA_EXTRA_LARGE - - """ - The extra large font size. Example: 21px. - """ - EXTRA_LARGE - - """ - The extra small font size. Example: 10px. - """ - EXTRA_SMALL - - """ - The large font size. Example: 19px. - """ - LARGE - - """ - The medium font size. Example: 16px. - """ - MEDIUM - - """ - The small font size. Example: 12px. - """ - SMALL -} - -""" -The typography customizations. -""" -type CheckoutBrandingTypographyStyle @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan.") @componentName(name: "checkouts") { - """ - The kerning. - """ - kerning: CheckoutBrandingTypographyKerning - - """ - The letter case. - """ - letterCase: CheckoutBrandingTypographyLetterCase -} - -""" -The input fields used to update the global typography customizations. -""" -input CheckoutBrandingTypographyStyleGlobalInput @componentName(name: "checkouts") { - """ - The kerning. - """ - kerning: CheckoutBrandingTypographyKerning - - """ - The letter case. - """ - letterCase: CheckoutBrandingTypographyLetterCase -} - -""" -The input fields used to update the typography customizations. -""" -input CheckoutBrandingTypographyStyleInput @componentName(name: "checkouts") { - """ - The font. - """ - font: CheckoutBrandingTypographyFont - - """ - The kerning. - """ - kerning: CheckoutBrandingTypographyKerning - - """ - The letter case. - """ - letterCase: CheckoutBrandingTypographyLetterCase - - """ - The font size. - """ - size: CheckoutBrandingTypographySize - - """ - The font weight. - """ - weight: CheckoutBrandingTypographyWeight -} - -""" -Possible values for the font weight. -""" -enum CheckoutBrandingTypographyWeight @componentName(name: "checkouts") { - """ - The base weight. - """ - BASE - - """ - The bold weight. - """ - BOLD -} - -""" -Return type for `checkoutBrandingUpsert` mutation. -""" -type CheckoutBrandingUpsertPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR -} - -""" -Possible visibility states. -""" -enum CheckoutBrandingVisibility @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "access to the checkout and accounts editor.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The ID of the child product. - """ - childProductId: ID! @gidTypes(types: ["Product"]) - - """ - The parent option values. - """ - selectedParentOptionValues: [SelectedVariantOptionInput!]! -} - -""" -An error produced by a running job. -""" -type CliHydrogenStorefrontJobError @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { - """ - The error code. - """ - code: String! - - """ - A translated error message. - """ - message: String -} - -""" -The set of valid sort keys for the CodeDiscount query. -""" -enum CodeDiscountSortKeys @componentName(name: "platform") { - """ - 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. - -There are two types of collections: - -- **[Custom (manual) collections](https://help.shopify.com/manual/products/collections/manual-shopify-collection)**: -You specify the products to include in a collection. -- **[Smart (automated) collections](https://help.shopify.com/manual/products/collections/automated-collections)**: -You define rules, and products matching those rules are automatically included -in the collection. - -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 smart collections](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). -""" -type Collection implements HasEvents & HasMetafieldDefinitions & HasMetafields & HasPublishedTranslations & Node & Publishable @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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! @gidTypes(types: ["Product"]) - ): Boolean! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The image associated with the collection. - """ - image( - """ - Crops the image according to the specified region. - """ - crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") - - """ - Image height in pixels between 1 and 2048. - """ - maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") - - """ - Image width in pixels between 1 and 2048. - """ - maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - The products that are included in the collection. - """ - products( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 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.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - The channels where the collection is published. - """ - publications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Whether or not to return only the collection publications that are published. - """ - onlyPublished: Boolean = true - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CollectionPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - Whether the resource is published to a specific channel. - """ - publishedOnChannel( - """ - The ID of the channel to check. - """ - channelId: ID! @gidTypes(types: ["Channel"]) - ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - 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! @gidTypes(types: ["Publication"]) - ): Boolean! - - """ - The list of resources that are published to a - [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). - """ - resourcePublications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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). - """ - resourcePublicationsV2( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationV2Connection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - For a smart (automated) collection, 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 @gidTypes(types: ["Market"]) - ): [Translation!]! - - """ - The list of channels that the resource is not published to. - """ - unpublishedChannels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) - that the resource isn't published to. - """ - unpublishedPublications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The ID of the collection to be deleted. - """ - id: ID! @gidTypes(types: ["Collection"]) -} - -""" -Return type for `collectionDelete` mutation. -""" -type CollectionDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The ID of the collection to be duplicated. - """ - collectionId: ID! @gidTypes(types: ["Collection"]) - - """ - 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 - - """ - The new title of the collection. - """ - newTitle: String! -} - -""" -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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Products are being duplicated from this collection. - """ - SOURCE - - """ - Products are being duplicated onto this collection. - """ - TARGET -} - -""" -Return type for `collectionDuplicate` mutation. -""" -type CollectionDuplicatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 ID of the collection. - """ - id: ID -} - -""" -The input fields required to create a collection. -""" -input CollectionInput @componentName(name: "merchandising") { - """ - 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 @gidTypes(types: ["Collection"]) - - """ - The image associated with the collection. - """ - image: ImageInput - - """ - The metafields to associate with the collection. - """ - metafields: [MetafieldInput!] - - """ - Initial list of collection products. Only valid with `collectionCreate` and without rules. - """ - products: [ID!] @gidTypes(types: ["Product"]) - - """ - Initial list of collection publications. Only valid with `collectionCreate`. - """ - publications: [CollectionPublicationInput!] @deprecated(reason: "Use PublishablePublish instead.") - - """ - 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 - - """ - The rules used to assign products to the collection. - """ - ruleSet: CollectionRuleSetInput - - """ - SEO information for the collection. - """ - seo: SEOInput - - """ - The order in which the collection's products are sorted. - """ - sortOrder: CollectionSortOrder - - """ - The theme template used when viewing the collection in a store. - """ - templateSuffix: String - - """ - The title of the collection. Required for creating a new collection. - """ - title: String -} - -""" -Represents operations involving a collection. -""" -type CollectionOperations @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - channelHandle: String @deprecated(reason: "Use publicationId instead.") - - """ - The ID of the channel. - """ - channelId: ID @deprecated(reason: "Use publicationId instead.") @gidTypes(types: ["Channel"]) - - """ - The ID of the publication. - """ - publicationId: ID @gidTypes(types: ["Publication"]) -} - -""" -The input fields for specifying a collection to publish and the sales channels to publish it to. -""" -input CollectionPublishInput @componentName(name: "merchandising") { - """ - The channels where the collection will be published. - """ - collectionPublications: [CollectionPublicationInput!]! - - """ - The collection to create or update publications for. - """ - id: ID! @gidTypes(types: ["Collection"]) -} - -""" -Return type for `collectionPublish` mutation. -""" -type CollectionPublishPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - The collection was not found. Please check the collection ID and try again. - """ - COLLECTION_NOT_FOUND - - """ - The move is invalid. - """ - INVALID_MOVE - - """ - The collection is not manually sorted. Can't reorder products unless collection is manually sorted. - """ - MANUALLY_SORTED_COLLECTION - - """ - Products are currently being reordered. Please try again later. - """ - TOO_MANY_ATTEMPTS_TO_REORDER_PRODUCTS -} - -""" -Represents at rule that's used to assign products to a collection. -""" -type CollectionRule @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The taxonomy category used as condition. - """ - value: TaxonomyCategory! -} - -""" -Specifies the attribute of a product being used to populate the smart collection. -""" -enum CollectionRuleColumn @componentName(name: "merchandising") { - """ - 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 - - """ - This rule type is designed to dynamically include products in a smart 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 smart 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 - - """ - This category includes metafield definitions that have the `useAsCollectionCondition` flag set to true. - """ - PRODUCT_METAFIELD_DEFINITION - - """ - The [`product_taxonomy_node_id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.productCategory) attribute. - """ - PRODUCT_TAXONOMY_NODE_ID - - """ - 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 [`variant_compare_at_price`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.compareAtPrice) attribute. - """ - VARIANT_COMPARE_AT_PRICE - - """ - The [`variant_inventory`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.inventoryQuantity) attribute. - """ - VARIANT_INVENTORY - - """ - This category includes metafield definitions that have the `useAsCollectionCondition` flag set to true. - """ - VARIANT_METAFIELD_DEFINITION - - """ - The [`variant_price`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.price) attribute. - """ - VARIANT_PRICE - - """ - The [`variant_title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.title) attribute. - """ - VARIANT_TITLE - - """ - The [`variant_weight`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-ProductVariant.fields.inventoryItem.measurement.weight) attribute. - """ - VARIANT_WEIGHT - - """ - The [`vendor`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-Product.fields.vendor) attribute. - """ - VENDOR -} - -""" -Specifies object for the condition of the rule. -""" -union CollectionRuleConditionObject @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = CollectionRuleCategoryCondition | CollectionRuleMetafieldCondition | CollectionRuleProductCategoryCondition | CollectionRuleTextCondition - -""" -Defines the available columns and relationships that can be used when creating -rules for smart 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 smart 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 smart collection rules -and what types of comparisons are allowed for each field. - -Learn more about [smart collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection). -""" -type CollectionRuleConditions @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = CollectionRuleMetafieldCondition - -""" -The input fields for a rule to associate with a collection. -""" -input CollectionRuleInput @componentName(name: "merchandising") { - """ - 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 object ID that points to additional attributes for the collection rule. - This is only required when using metafield definition rules. - """ - conditionObjectId: ID - - """ - The type of operator that the rule is based on. For example, `equals`, `contains`, or `not_equals`. - """ - relation: CollectionRuleRelation! -} - -""" -Identifies a metafield definition used as a rule for the smart collection. -""" -type CollectionRuleMetafieldCondition @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The metafield condition display name associated to the rule. - """ - metafieldConditionDisplayName: String - - """ - The metafield definition associated with the condition. - """ - metafieldDefinition: MetafieldDefinition! -} - -""" -Specifies the condition for a Product Category field. -""" -type CollectionRuleProductCategoryCondition @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The value of the condition. - """ - value: ProductTaxonomyNode! -} - -""" -Specifies the relationship between the `column` and the `condition`. -""" -enum CollectionRuleRelation @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The value of the condition. - """ - value: String! -} - -""" -The set of valid sort keys for the Collection query. -""" -enum CollectionSortKeys @componentName(name: "platform") { - """ - 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 `sort_order` value. - """ - SORT_ORDER - - """ - 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 @componentName(name: "merchandising") { - """ - 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 most relevant products. - """ - MOST_RELEVANT - - """ - 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 @componentName(name: "merchandising") { - """ - The channels where the collection is published. - """ - collectionPublications: [CollectionPublicationInput!]! - - """ - The collection to create or update publications for. - """ - id: ID! @gidTypes(types: ["Collection"]) -} - -""" -Return type for `collectionUnpublish` mutation. -""" -type CollectionUnpublishPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "reporting") { - """ - Represents an array of values. - """ - ARRAY - - """ - Represents a boolean value. - """ - BOOLEAN - - """ - Represents a hex color value. - """ - COLOR - - """ - Represents a duration in days. - """ - DAY_DURATION - - """ - Represents a day of week value. - """ - DAY_OF_WEEK - - """ - Represents a day-level timestamp value. - """ - DAY_TIMESTAMP - - """ - Represents a decimal value. - """ - DECIMAL - - """ - Represents a floating point value. - """ - FLOAT - - """ - Represents a duration in hours. - """ - HOUR_DURATION - - """ - Represents an hour of day value. - """ - HOUR_OF_DAY - - """ - Represents a hour-level timestamp value. - """ - HOUR_TIMESTAMP - - """ - Represents an identity value. - """ - IDENTITY - - """ - Represents an integer value. - """ - INTEGER - - """ - Represents a duration in milliseconds. - """ - MILLISECOND_DURATION - - """ - Represents a duration in minutes. - """ - MINUTE_DURATION - - """ - Represents a minute-level timestamp value. - """ - MINUTE_TIMESTAMP - - """ - Represents a monetary value. - """ - MONEY - - """ - Represents a month of year value. - """ - MONTH_OF_YEAR - - """ - Represents a month-level timestamp value. - """ - MONTH_TIMESTAMP - - """ - Represents a percentage value. - """ - PERCENT - - """ - Represents a quarter-level timestamp value. - """ - QUARTER_TIMESTAMP - - """ - Represents a rating value. - """ - RATING - - """ - Represents a duration in seconds. - """ - SECOND_DURATION - - """ - Represents a second-level timestamp value. - """ - SECOND_TIMESTAMP - - """ - Represents a string value. - """ - STRING - - """ - Represents a string identity value. - """ - STRING_IDENTITY - - """ - Represents a timestamp value in seconds. - """ - TIMESTAMP - - """ - Represents an unspecified data type. - """ - UNSPECIFIED - - """ - Represents a week of year value. - """ - WEEK_OF_YEAR - - """ - Represents a week-level timestamp value. - """ - WEEK_TIMESTAMP - - """ - Represents a year-level timestamp value. - """ - YEAR_TIMESTAMP -} - -""" -A combined listing of products. -""" -type CombinedListing @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - A list of child products in the combined listing. - """ - combinedListingChildren( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CombinedListingChildConnection! - - """ - The parent product. - """ - parentProduct: Product! -} - -""" -A child of a combined listing. -""" -type CombinedListingChild @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The parent variant. - """ - parentVariant: ProductVariant! - - """ - The child product. - """ - product: Product! -} - -""" -An auto-generated type for paginating through multiple CombinedListingChildren. -""" -type CombinedListingChildConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Unable to add duplicated products. - """ - CANNOT_HAVE_DUPLICATED_PRODUCTS - - """ - Unable to add a product that is a parent. - """ - CANNOT_HAVE_PARENT_AS_CHILD - - """ - Unable to add products with repeated options. - """ - CANNOT_HAVE_REPEATED_OPTIONS - - """ - Option values cannot be repeated. - """ - CANNOT_HAVE_REPEATED_OPTION_VALUES - - """ - 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 - - """ - The same metafield cannot be linked to multiple options. - """ - LINKED_METAFIELDS_CANNOT_BE_REPEATED - - """ - 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 - - """ - 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 - - """ - All child products must include the same options. - """ - OPTIONS_MUST_BE_EQUAL_TO_THE_OTHER_COMPONENTS - - """ - 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 - - """ - 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 products that can be added to an individual combined listing. - """ - TOO_MANY_PRODUCTS - - """ - You have reached the maximum number of variants across all products for an individual combined listing. - """ - TOO_MANY_VARIANTS - - """ - An unexpected error occurred. - """ - UNEXPECTED_ERROR -} - -""" -The role of the combined listing. -""" -enum CombinedListingsRole @componentName(name: "merchandising") { - """ - The product is the child of a combined listing. - """ - CHILD - - """ - The product is the parent of a combined listing. - """ - PARENT -} - -""" -A comment on an article. -""" -type Comment implements HasEvents & Node @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") @protectedObject(subject: "customer") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") @protectedObject(subject: "customer") { - """ - The author's email. - """ - email: String! @protectedField(subject: "customer", content: "email") - - """ - The author’s name. - """ - name: String! @protectedField(subject: "customer", content: "name") -} - -""" -An auto-generated type for paginating through multiple Comments. -""" -type CommentConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - 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 @componentName(name: "timeline") @protectedObject(subject: "customer") { - """ - 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 @componentName(name: "timeline") { - """ - 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( - """ - Crops the image according to the specified region. - """ - crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") - - """ - Image height in pixels between 1 and 2048. - """ - maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") - - """ - Image width in pixels between 1 and 2048. - """ - maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 @componentName(name: "timeline") = Customer | DraftOrder | InventoryTransfer | Order | Product | ProductVariant - -""" -The subject line of a comment event. -""" -interface CommentEventSubject @componentName(name: "timeline") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -Possible comment policies for a blog. -""" -enum CommentPolicy @componentName(name: "online_store") { - """ - 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 @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -Return type for `commentSpam` mutation. -""" -type CommentSpamPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -The status of a comment. -""" -enum CommentStatus @componentName(name: "online_store") { - """ - The comment is pending approval. - """ - PENDING - - """ - The comment is published. - """ - PUBLISHED - - """ - The comment has been removed. - """ - REMOVED - - """ - The comment is marked as spam. - """ - SPAM - - """ - The comment is unapproved. - """ - UNAPPROVED -} - -""" -Return type for `companiesDelete` mutation. -""" -type CompaniesDeletePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | company_id | id | - | company_location_id | id | - | created_at | time | - | email | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | location_name | string | - | name | string | - | role_name | string | - | status | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CompanyContactSortKeys = ID - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | customer_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | source | string | - | status | string | - | tag | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): DraftOrderConnection! - - """ - The paginated list of events associated with the host subject. - """ - events( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | company_id | id | - | created_at | time | - | external_id | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | ids | string | - | 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"` | - | name | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CompanyLocationSortKeys = ID - ): 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - The name of the company. - """ - name: String! - - """ - A note about the company. - """ - note: String - - """ - The list of the company's orders. - """ - orders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) - (`ChannelInformation.channelDefinition.handle`) field. | | | - - `channel:web`
- `channel:web,pos` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | 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"` | - | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) - field. | | | - `name:1001-A` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) - of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). - | - `has_issues`
- `no_issues`
- `not_validated` | | - - `shipping_address_validation_result_summary:no_issues` | - | 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` | - | 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` | - | 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` | - | status | string | Filter by the order's status to manage workflows or - analyze the order lifecycle. | - `open`
- `closed`
- - `cancelled`
- `not_closed` | | - `status:open` | - | 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` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { - """ - 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! @protectedField(subject: "customer", content: "name") - - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - The formatted version of the address. - """ - formattedAddress( - """ - Whether to include the company name in the formatted address. - """ - withCompanyName: Boolean = true - - """ - Whether to include the recipient's name in the formatted address. - """ - withName: Boolean = false - ): [String!]! @protectedField(subject: "customer", content: "address") - - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - 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 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 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 identity of the recipient e.g. 'Receiving Department'. - """ - recipient: String - - """ - The zip or postal code of the address. - """ - zip: 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 valid values for the address type of a company. -""" -enum CompanyAddressType @componentName(name: "business_customers") { - """ - The address is a billing address. - """ - BILLING - - """ - The address is a shipping address. - """ - SHIPPING -} - -""" -Return type for `companyAssignCustomerAsContact` mutation. -""" -type CompanyAssignCustomerAsContactPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | customer_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | source | string | - | status | string | - | tag | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | company_contact_id | id | - | company_contact_role_id | id | - | company_id | id | - | company_location_id | id | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | location_name | string | - | role_name | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CompanyContactRoleAssignmentSortKeys = ID - ): 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - 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 @componentName(name: "business_customers") { - """ - The unique email address of the company contact. - """ - email: String - - """ - The company contact's first name. - """ - firstName: String - - """ - The company contact's last name. - """ - lastName: String - - """ - The contact's locale. - """ - locale: String - - """ - The phone number of the company contact. - """ - phone: String - - """ - The title of the company contact. - """ - title: String -} - -""" -Return type for `companyContactRemoveFromCompany` mutation. -""" -type CompanyContactRemoveFromCompanyPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") @protectedObject(subject: "customer") { - """ - A globally-unique ID. - """ - id: ID! - - """ - The name of a role. For example, `admin` or `buyer`. - """ - name: String! @protectedField(subject: "customer", content: "name") - - """ - A note for the role. - """ - note: String -} - -""" -The input fields for the role and location to assign to a company contact. -""" -input CompanyContactRoleAssign @componentName(name: "business_customers") { - """ - The role ID. - """ - companyContactRoleId: ID! @gidTypes(types: ["CompanyContactRole"]) - - """ - The location. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) -} - -""" -The CompanyContactRoleAssignment describes the company and location associated to a company contact's role. -""" -type CompanyContactRoleAssignment implements Node @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") @privatelyDocumented { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - 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 @componentName(name: "platform") { - """ - The created company. - """ - company: Company - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [BusinessCustomerUserError!]! -} - -""" -Return type for `companyDelete` mutation. -""" -type CompanyDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - 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 @componentName(name: "business_customers") { - """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at - which the company became the customer. - """ - customerSince: DateTime - - """ - A unique externally-supplied ID for the company. - """ - externalId: String - - """ - The name of the company. - """ - name: String - - """ - A note about the company. - """ - note: String -} - -""" -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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | customer_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | source | string | - | status | string | - | tag | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): DraftOrderConnection! - - """ - The paginated list of events associated with the host subject. - """ - events( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): EventConnection! - - """ - A unique externally-supplied ID for the company location. - """ - externalId: String - - """ - Whether the company location has a price list with the specified ID. - """ - hasPriceList( - """ - The price list ID to check. - """ - priceListId: ID! @gidTypes(types: ["PriceList"]) - ): Boolean! - - """ - 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! @gidTypes(types: ["Catalog"]) - ): 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 price lists for the company location. - """ - priceLists( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): PriceListConnection! - - """ - The list of roles assigned to the company location. - """ - roleAssignments( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | company_contact_id | id | - | company_contact_role_id | id | - | company_id | id | - | company_location_id | id | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | location_name | string | - | role_name | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CompanyContactRoleAssignmentSortKeys = ID - ): CompanyContactRoleAssignmentConnection! - - """ - The address used as shipping address for the location. - """ - shippingAddress: CompanyAddress - - """ - The list of staff members assigned to the company location. - """ - staffMemberAssignments( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | company_location_id | id | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | staff_member_id | id | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CompanyLocationStaffMemberAssignmentSortKeys = ID - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | currency_code | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The company locations associated with the catalog. - """ - companyLocations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | company_id | id | - | created_at | time | - | external_id | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | ids | string | - | 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"` | - | name | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CompanyLocationSortKeys = ID - ): 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - 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 @componentName(name: "business_customers") { - """ - The input fields to create or update the billing address for a company location. - """ - billingAddress: 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 configuration for the buyer's checkout at the company location. - """ - buyerExperienceConfiguration: BuyerExperienceConfigurationInput - - """ - A unique externally-supplied ID for the company location. - """ - externalId: String - - """ - The preferred locale of the company location. - """ - locale: String - - """ - The name of the company location. - """ - name: String - - """ - A note about the company location. - """ - note: String - - """ - The phone number of the company location. - """ - phone: String - - """ - The input fields to create or update the shipping address for a company location. - """ - shippingAddress: CompanyAddressInput - - """ - Whether the location is exempt from taxes. - """ - taxExempt: Boolean - - """ - The list of tax exemptions to apply to the company location. - """ - taxExemptions: [TaxExemption!] - - """ - The tax registration ID of the company location. - """ - taxRegistrationId: String -} - -""" -Return type for `companyLocationRemoveStaffMembers` mutation. -""" -type CompanyLocationRemoveStaffMembersPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - The company contact ID.. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - - """ - The role ID. - """ - companyContactRoleId: ID! @gidTypes(types: ["CompanyContactRole"]) -} - -""" -The set of valid sort keys for the CompanyLocation query. -""" -enum CompanyLocationSortKeys @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "business_customers") { - """ - The configuration for the buyer's checkout at the company location. - """ - buyerExperienceConfiguration: BuyerExperienceConfigurationInput - - """ - A unique externally-supplied ID for the company location. - """ - externalId: String - - """ - The preferred locale of the company location. - """ - locale: String - - """ - The name of the company location. - """ - name: String - - """ - A note about the company location. - """ - note: String - - """ - The phone number of the company location. - """ - phone: String -} - -""" -Return type for `companyLocationUpdate` mutation. -""" -type CompanyLocationUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @componentName(name: "business_customers") { - """ - The application level for the condition. - """ - applicationLevel: MarketConditionApplicationType - - """ - The company locations that comprise the market. - """ - companyLocations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CompanyLocationConnection! -} - -""" -Return type for `companyLocationsDelete` mutation. -""" -type CompanyLocationsDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "privacy") { - """ - 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 @componentName(name: "privacy") { - """ - 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 @componentName(name: "platform") { - """ - Country code is required. - """ - COUNTRY_CODE_REQUIRED - - """ - Region code must match the country code. - """ - REGION_CODE_MUST_MATCH_COUNTRY_CODE - - """ - Region code is required for countries with existing regional policies. - """ - REGION_CODE_REQUIRED - - """ - 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 @componentName(name: "privacy") { - """ - 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 `ISO 3166` region code for which the policy applies. - """ - regionCode: String -} - -""" -A country or region code. -""" -type ConsentPolicyRegion @componentName(name: "privacy") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The CompanyLocation ID used to fetch company location specific prices. - """ - companyLocationId: ID @gidTypes(types: ["CompanyLocation"]) - - """ - The country code used to fetch country-specific prices. - """ - country: CountryCode - - """ - The Location ID used to fetch location specific prices. - """ - locationId: ID @gidTypes(types: ["Location"]) -} - -""" -The context data that determines the publication status of a product. -""" -input ContextualPublicationContext @componentName(name: "merchandising") { - """ - The company location ID used to fetch company-specific publication. - """ - companyLocationId: ID @gidTypes(types: ["CompanyLocation"]) - - """ - The country code used to fetch country-specific publication. - """ - country: CountryCode - - """ - The Location ID used to fetch the publication status of a product. - """ - locationId: ID @gidTypes(types: ["Location"]) -} - -""" -A shop's banner settings. -""" -type CookieBanner implements HasPublishedTranslations @requiredAccess(scope: "`read_privacy_settings` access scope.") @componentName(name: "privacy") { - """ - 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 @gidTypes(types: ["Market"]) - ): [Translation!]! -} - -""" -A numeric count with precision information indicating whether the count is exact or an estimate. -""" -type Count @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The count is at least the value. A limit was imposed and reached. - """ - AT_LEAST - - """ - The count is exactly the value. A write may not be reflected instantaneously. - """ - EXACT -} - -""" -The list of all the countries from the combined shipping zones for the shop. -""" -type CountriesInShippingZones @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Ascension Island. - """ - AC - - """ - Andorra. - """ - AD - - """ - United Arab Emirates. - """ - AE - - """ - Afghanistan. - """ - AF - - """ - Antigua & Barbuda. - """ - AG - - """ - Anguilla. - """ - AI - - """ - Albania. - """ - AL - - """ - Armenia. - """ - AM - - """ - Netherlands Antilles. - """ - AN - - """ - Angola. - """ - AO - - """ - Argentina. - """ - AR - - """ - Austria. - """ - AT - - """ - Australia. - """ - AU - - """ - Aruba. - """ - AW - - """ - Åland Islands. - """ - AX - - """ - Azerbaijan. - """ - AZ - - """ - Bosnia & Herzegovina. - """ - BA - - """ - Barbados. - """ - BB - - """ - Bangladesh. - """ - BD - - """ - Belgium. - """ - BE - - """ - Burkina Faso. - """ - BF - - """ - Bulgaria. - """ - BG - - """ - Bahrain. - """ - BH - - """ - Burundi. - """ - BI - - """ - Benin. - """ - BJ - - """ - St. Barthélemy. - """ - BL - - """ - Bermuda. - """ - BM - - """ - Brunei. - """ - BN - - """ - Bolivia. - """ - BO - - """ - Caribbean Netherlands. - """ - BQ - - """ - Brazil. - """ - BR - - """ - Bahamas. - """ - BS - - """ - Bhutan. - """ - BT - - """ - Bouvet Island. - """ - BV - - """ - Botswana. - """ - BW - - """ - Belarus. - """ - BY - - """ - Belize. - """ - BZ - - """ - Canada. - """ - CA - - """ - Cocos (Keeling) Islands. - """ - CC - - """ - Congo - Kinshasa. - """ - CD - - """ - Central African Republic. - """ - CF - - """ - Congo - Brazzaville. - """ - CG - - """ - Switzerland. - """ - CH - - """ - Côte d’Ivoire. - """ - CI - - """ - Cook Islands. - """ - CK - - """ - Chile. - """ - CL - - """ - Cameroon. - """ - CM - - """ - China. - """ - CN - - """ - Colombia. - """ - CO - - """ - Costa Rica. - """ - CR - - """ - Cuba. - """ - CU - - """ - Cape Verde. - """ - CV - - """ - Curaçao. - """ - CW - - """ - Christmas Island. - """ - CX - - """ - Cyprus. - """ - CY - - """ - Czechia. - """ - CZ - - """ - Germany. - """ - DE - - """ - Djibouti. - """ - DJ - - """ - Denmark. - """ - DK - - """ - Dominica. - """ - DM - - """ - Dominican Republic. - """ - DO - - """ - Algeria. - """ - DZ - - """ - Ecuador. - """ - EC - - """ - Estonia. - """ - EE - - """ - Egypt. - """ - EG - - """ - Western Sahara. - """ - EH - - """ - Eritrea. - """ - ER - - """ - Spain. - """ - ES - - """ - Ethiopia. - """ - ET - - """ - Finland. - """ - FI - - """ - Fiji. - """ - FJ - - """ - Falkland Islands. - """ - FK - - """ - Faroe Islands. - """ - FO - - """ - France. - """ - FR - - """ - Gabon. - """ - GA - - """ - United Kingdom. - """ - GB - - """ - Grenada. - """ - GD - - """ - Georgia. - """ - GE - - """ - French Guiana. - """ - GF - - """ - Guernsey. - """ - GG - - """ - Ghana. - """ - GH - - """ - Gibraltar. - """ - GI - - """ - Greenland. - """ - GL - - """ - Gambia. - """ - GM - - """ - Guinea. - """ - GN - - """ - Guadeloupe. - """ - GP - - """ - Equatorial Guinea. - """ - GQ - - """ - Greece. - """ - GR - - """ - South Georgia & South Sandwich Islands. - """ - GS - - """ - Guatemala. - """ - GT - - """ - Guinea-Bissau. - """ - GW - - """ - Guyana. - """ - GY - - """ - Hong Kong SAR. - """ - HK - - """ - Heard & McDonald Islands. - """ - HM - - """ - Honduras. - """ - HN - - """ - Croatia. - """ - HR - - """ - Haiti. - """ - HT - - """ - Hungary. - """ - HU - - """ - Indonesia. - """ - ID - - """ - Ireland. - """ - IE - - """ - Israel. - """ - IL - - """ - Isle of Man. - """ - IM - - """ - India. - """ - IN - - """ - British Indian Ocean Territory. - """ - IO - - """ - Iraq. - """ - IQ - - """ - Iran. - """ - IR - - """ - Iceland. - """ - IS - - """ - Italy. - """ - IT - - """ - Jersey. - """ - JE - - """ - Jamaica. - """ - JM - - """ - Jordan. - """ - JO - - """ - Japan. - """ - JP - - """ - Kenya. - """ - KE - - """ - Kyrgyzstan. - """ - KG - - """ - Cambodia. - """ - KH - - """ - Kiribati. - """ - KI - - """ - Comoros. - """ - KM - - """ - St. Kitts & Nevis. - """ - KN - - """ - North Korea. - """ - KP - - """ - South Korea. - """ - KR - - """ - Kuwait. - """ - KW - - """ - Cayman Islands. - """ - KY - - """ - Kazakhstan. - """ - KZ - - """ - Laos. - """ - LA - - """ - Lebanon. - """ - LB - - """ - St. Lucia. - """ - LC - - """ - Liechtenstein. - """ - LI - - """ - Sri Lanka. - """ - LK - - """ - Liberia. - """ - LR - - """ - Lesotho. - """ - LS - - """ - Lithuania. - """ - LT - - """ - Luxembourg. - """ - LU - - """ - Latvia. - """ - LV - - """ - Libya. - """ - LY - - """ - Morocco. - """ - MA - - """ - Monaco. - """ - MC - - """ - Moldova. - """ - MD - - """ - Montenegro. - """ - ME - - """ - St. Martin. - """ - MF - - """ - Madagascar. - """ - MG - - """ - North Macedonia. - """ - MK - - """ - Mali. - """ - ML - - """ - Myanmar (Burma). - """ - MM - - """ - Mongolia. - """ - MN - - """ - Macao SAR. - """ - MO - - """ - Martinique. - """ - MQ - - """ - Mauritania. - """ - MR - - """ - Montserrat. - """ - MS - - """ - Malta. - """ - MT - - """ - Mauritius. - """ - MU - - """ - Maldives. - """ - MV - - """ - Malawi. - """ - MW - - """ - Mexico. - """ - MX - - """ - Malaysia. - """ - MY - - """ - Mozambique. - """ - MZ - - """ - Namibia. - """ - NA - - """ - New Caledonia. - """ - NC - - """ - Niger. - """ - NE - - """ - Norfolk Island. - """ - NF - - """ - Nigeria. - """ - NG - - """ - Nicaragua. - """ - NI - - """ - Netherlands. - """ - NL - - """ - Norway. - """ - NO - - """ - Nepal. - """ - NP - - """ - Nauru. - """ - NR - - """ - Niue. - """ - NU - - """ - New Zealand. - """ - NZ - - """ - Oman. - """ - OM - - """ - Panama. - """ - PA - - """ - Peru. - """ - PE - - """ - French Polynesia. - """ - PF - - """ - Papua New Guinea. - """ - PG - - """ - Philippines. - """ - PH - - """ - Pakistan. - """ - PK - - """ - Poland. - """ - PL - - """ - St. Pierre & Miquelon. - """ - PM - - """ - Pitcairn Islands. - """ - PN - - """ - Palestinian Territories. - """ - PS - - """ - Portugal. - """ - PT - - """ - Paraguay. - """ - PY - - """ - Qatar. - """ - QA - - """ - Réunion. - """ - RE - - """ - Romania. - """ - RO - - """ - Serbia. - """ - RS - - """ - Russia. - """ - RU - - """ - Rwanda. - """ - RW - - """ - Saudi Arabia. - """ - SA - - """ - Solomon Islands. - """ - SB - - """ - Seychelles. - """ - SC - - """ - Sudan. - """ - SD - - """ - Sweden. - """ - SE - - """ - Singapore. - """ - SG - - """ - St. Helena. - """ - SH - - """ - Slovenia. - """ - SI - - """ - Svalbard & Jan Mayen. - """ - SJ - - """ - Slovakia. - """ - SK - - """ - Sierra Leone. - """ - SL - - """ - San Marino. - """ - SM - - """ - Senegal. - """ - SN - - """ - Somalia. - """ - SO - - """ - Suriname. - """ - SR - - """ - South Sudan. - """ - SS - - """ - São Tomé & Príncipe. - """ - ST - - """ - El Salvador. - """ - SV - - """ - Sint Maarten. - """ - SX - - """ - Syria. - """ - SY - - """ - Eswatini. - """ - SZ - - """ - Tristan da Cunha. - """ - TA - - """ - Turks & Caicos Islands. - """ - TC - - """ - Chad. - """ - TD - - """ - French Southern Territories. - """ - TF - - """ - Togo. - """ - TG - - """ - Thailand. - """ - TH - - """ - Tajikistan. - """ - TJ - - """ - Tokelau. - """ - TK - - """ - Timor-Leste. - """ - TL - - """ - Turkmenistan. - """ - TM - - """ - Tunisia. - """ - TN - - """ - Tonga. - """ - TO - - """ - Türkiye. - """ - TR - - """ - Trinidad & Tobago. - """ - TT - - """ - Tuvalu. - """ - TV - - """ - Taiwan. - """ - TW - - """ - Tanzania. - """ - TZ - - """ - Ukraine. - """ - UA - - """ - Uganda. - """ - UG - - """ - U.S. Outlying Islands. - """ - UM - - """ - United States. - """ - US - - """ - Uruguay. - """ - UY - - """ - Uzbekistan. - """ - UZ - - """ - Vatican City. - """ - VA - - """ - St. Vincent & Grenadines. - """ - VC - - """ - Venezuela. - """ - VE - - """ - British Virgin Islands. - """ - VG - - """ - Vietnam. - """ - VN - - """ - Vanuatu. - """ - VU - - """ - Wallis & Futuna. - """ - WF - - """ - Samoa. - """ - WS - - """ - Kosovo. - """ - XK - - """ - Yemen. - """ - YE - - """ - Mayotte. - """ - YT - - """ - South Africa. - """ - ZA - - """ - Zambia. - """ - ZM - - """ - Zimbabwe. - """ - ZW - - """ - Unknown Region. - """ - ZZ -} - -""" -The country-specific harmonized system code and ISO country code for an inventory item. -""" -type CountryHarmonizedSystemCode @requiredAccess(scope: "`read_inventory` access scope or `read_products` access scope.") @componentName(name: "inventory") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "inventory") { - """ - 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 @componentName(name: "inventory") { - """ - 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 - - """ - Country specific harmonized system code. - """ - harmonizedSystemCode: String! -} - -""" -The input fields required to create a media object. -""" -input CreateMediaInput @componentName(name: "merchandising") { - """ - The alt text associated with the media. - """ - alt: String - - """ - The media content type. - """ - mediaContentType: MediaContentType - - """ - The original source of the media object. This might be an external URL or a staged upload URL. - """ - originalSource: String -} - -""" -The part of the image that should remain after cropping. -""" -enum CropRegion @componentName(name: "platform") { - """ - Keep the bottom of the image. - """ - BOTTOM - - """ - Keep the center of the image. - """ - CENTER - - """ - Keep the left of the image. - """ - LEFT - - """ - Crop the exact region of the image specified by the crop_left, crop_top, crop_width and crop_height parameters. - """ - REGION - - """ - Keep the right of the image. - """ - RIGHT - - """ - Keep the top of the image. - """ - TOP -} - -""" -The input fields for defining an arbitrary cropping region. -""" -input CropRegionInput @componentName(name: "platform") { - """ - Height of the region of the image to extract when using the region crop mode. - """ - height: Int! - - """ - Left position of the region of the image to extract when using the region crop mode. - """ - left: Int! - - """ - Top position of the region of the image to extract when using the region crop mode. - """ - top: Int! - - """ - Width of the region of the image to extract when using the region crop mode. - """ - width: Int! -} - -""" -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 @componentName(name: "platform") { - """ - United Arab Emirates Dirham (AED). - """ - AED - - """ - Afghan Afghani (AFN). - """ - AFN - - """ - Albanian Lek (ALL). - """ - ALL - - """ - Armenian Dram (AMD). - """ - AMD - - """ - Netherlands Antillean Guilder. - """ - ANG - - """ - Angolan Kwanza (AOA). - """ - AOA - - """ - Argentine Pesos (ARS). - """ - ARS - - """ - Australian Dollars (AUD). - """ - AUD - - """ - Aruban Florin (AWG). - """ - AWG - - """ - Azerbaijani Manat (AZN). - """ - AZN - - """ - Bosnia and Herzegovina Convertible Mark (BAM). - """ - BAM - - """ - Barbadian Dollar (BBD). - """ - BBD - - """ - Bangladesh Taka (BDT). - """ - BDT - - """ - Bulgarian Lev (BGN). - """ - BGN - - """ - Bahraini Dinar (BHD). - """ - BHD - - """ - Burundian Franc (BIF). - """ - BIF - - """ - Bermudian Dollar (BMD). - """ - BMD - - """ - Brunei Dollar (BND). - """ - BND - - """ - Bolivian Boliviano (BOB). - """ - BOB - - """ - Brazilian Real (BRL). - """ - BRL - - """ - Bahamian Dollar (BSD). - """ - BSD - - """ - Bhutanese Ngultrum (BTN). - """ - BTN - - """ - Botswana Pula (BWP). - """ - BWP - - """ - Belarusian Ruble (BYN). - """ - BYN - - """ - Belarusian Ruble (BYR). - """ - BYR @deprecated(reason: "Use `BYN` instead.") - - """ - Belize Dollar (BZD). - """ - BZD - - """ - Canadian Dollars (CAD). - """ - CAD - - """ - Congolese franc (CDF). - """ - CDF - - """ - Swiss Francs (CHF). - """ - CHF - - """ - Chilean Peso (CLP). - """ - CLP - - """ - Chinese Yuan Renminbi (CNY). - """ - CNY - - """ - Colombian Peso (COP). - """ - COP - - """ - Costa Rican Colones (CRC). - """ - CRC - - """ - Cape Verdean escudo (CVE). - """ - CVE - - """ - Czech Koruny (CZK). - """ - CZK - - """ - Djiboutian Franc (DJF). - """ - DJF - - """ - Danish Kroner (DKK). - """ - DKK - - """ - Dominican Peso (DOP). - """ - DOP - - """ - Algerian Dinar (DZD). - """ - DZD - - """ - Egyptian Pound (EGP). - """ - EGP - - """ - Eritrean Nakfa (ERN). - """ - ERN - - """ - Ethiopian Birr (ETB). - """ - ETB - - """ - Euro (EUR). - """ - EUR - - """ - Fijian Dollars (FJD). - """ - FJD - - """ - Falkland Islands Pounds (FKP). - """ - FKP - - """ - United Kingdom Pounds (GBP). - """ - GBP - - """ - Georgian Lari (GEL). - """ - GEL - - """ - Ghanaian Cedi (GHS). - """ - GHS - - """ - Gibraltar Pounds (GIP). - """ - GIP - - """ - Gambian Dalasi (GMD). - """ - GMD - - """ - Guinean Franc (GNF). - """ - GNF - - """ - Guatemalan Quetzal (GTQ). - """ - GTQ - - """ - Guyanese Dollar (GYD). - """ - GYD - - """ - Hong Kong Dollars (HKD). - """ - HKD - - """ - Honduran Lempira (HNL). - """ - HNL - - """ - Croatian Kuna (HRK). - """ - HRK - - """ - Haitian Gourde (HTG). - """ - HTG - - """ - Hungarian Forint (HUF). - """ - HUF - - """ - Indonesian Rupiah (IDR). - """ - IDR - - """ - Israeli New Shekel (NIS). - """ - ILS - - """ - Indian Rupees (INR). - """ - INR - - """ - Iraqi Dinar (IQD). - """ - IQD - - """ - Iranian Rial (IRR). - """ - IRR - - """ - Icelandic Kronur (ISK). - """ - ISK - - """ - Jersey Pound. - """ - JEP - - """ - Jamaican Dollars (JMD). - """ - JMD - - """ - Jordanian Dinar (JOD). - """ - JOD - - """ - Japanese Yen (JPY). - """ - JPY - - """ - Kenyan Shilling (KES). - """ - KES - - """ - Kyrgyzstani Som (KGS). - """ - KGS - - """ - Cambodian Riel. - """ - KHR - - """ - Kiribati Dollar (KID). - """ - KID - - """ - Comorian Franc (KMF). - """ - KMF - - """ - South Korean Won (KRW). - """ - KRW - - """ - Kuwaiti Dinar (KWD). - """ - KWD - - """ - Cayman Dollars (KYD). - """ - KYD - - """ - Kazakhstani Tenge (KZT). - """ - KZT - - """ - Laotian Kip (LAK). - """ - LAK - - """ - Lebanese Pounds (LBP). - """ - LBP - - """ - Sri Lankan Rupees (LKR). - """ - LKR - - """ - Liberian Dollar (LRD). - """ - LRD - - """ - Lesotho Loti (LSL). - """ - LSL - - """ - Lithuanian Litai (LTL). - """ - LTL - - """ - Latvian Lati (LVL). - """ - LVL - - """ - Libyan Dinar (LYD). - """ - LYD - - """ - Moroccan Dirham. - """ - MAD - - """ - Moldovan Leu (MDL). - """ - MDL - - """ - Malagasy Ariary (MGA). - """ - MGA - - """ - Macedonia Denar (MKD). - """ - MKD - - """ - Burmese Kyat (MMK). - """ - MMK - - """ - Mongolian Tugrik. - """ - MNT - - """ - Macanese Pataca (MOP). - """ - MOP - - """ - Mauritanian Ouguiya (MRU). - """ - MRU - - """ - Mauritian Rupee (MUR). - """ - MUR - - """ - Maldivian Rufiyaa (MVR). - """ - MVR - - """ - Malawian Kwacha (MWK). - """ - MWK - - """ - Mexican Pesos (MXN). - """ - MXN - - """ - Malaysian Ringgits (MYR). - """ - MYR - - """ - Mozambican Metical. - """ - MZN - - """ - Namibian Dollar. - """ - NAD - - """ - Nigerian Naira (NGN). - """ - NGN - - """ - Nicaraguan Córdoba (NIO). - """ - NIO - - """ - Norwegian Kroner (NOK). - """ - NOK - - """ - Nepalese Rupee (NPR). - """ - NPR - - """ - New Zealand Dollars (NZD). - """ - NZD - - """ - Omani Rial (OMR). - """ - OMR - - """ - Panamian Balboa (PAB). - """ - PAB - - """ - Peruvian Nuevo Sol (PEN). - """ - PEN - - """ - Papua New Guinean Kina (PGK). - """ - PGK - - """ - Philippine Peso (PHP). - """ - PHP - - """ - Pakistani Rupee (PKR). - """ - PKR - - """ - Polish Zlotych (PLN). - """ - PLN - - """ - Paraguayan Guarani (PYG). - """ - PYG - - """ - Qatari Rial (QAR). - """ - QAR - - """ - Romanian Lei (RON). - """ - RON - - """ - Serbian dinar (RSD). - """ - RSD - - """ - Russian Rubles (RUB). - """ - RUB - - """ - Rwandan Franc (RWF). - """ - RWF - - """ - Saudi Riyal (SAR). - """ - SAR - - """ - Solomon Islands Dollar (SBD). - """ - SBD - - """ - Seychellois Rupee (SCR). - """ - SCR - - """ - Sudanese Pound (SDG). - """ - SDG - - """ - Swedish Kronor (SEK). - """ - SEK - - """ - Singapore Dollars (SGD). - """ - SGD - - """ - Saint Helena Pounds (SHP). - """ - SHP - - """ - Sierra Leonean Leone (SLL). - """ - SLL - - """ - Somali Shilling (SOS). - """ - SOS - - """ - Surinamese Dollar (SRD). - """ - SRD - - """ - South Sudanese Pound (SSP). - """ - SSP - - """ - Sao Tome And Principe Dobra (STD). - """ - STD @deprecated(reason: "Use `STN` instead.") - - """ - Sao Tome And Principe Dobra (STN). - """ - STN - - """ - Syrian Pound (SYP). - """ - SYP - - """ - Swazi Lilangeni (SZL). - """ - SZL - - """ - Thai baht (THB). - """ - THB - - """ - Tajikistani Somoni (TJS). - """ - TJS - - """ - Turkmenistani Manat (TMT). - """ - TMT - - """ - Tunisian Dinar (TND). - """ - TND - - """ - Tongan Pa'anga (TOP). - """ - TOP - - """ - Turkish Lira (TRY). - """ - TRY - - """ - Trinidad and Tobago Dollars (TTD). - """ - TTD - - """ - Taiwan Dollars (TWD). - """ - TWD - - """ - Tanzanian Shilling (TZS). - """ - TZS - - """ - Ukrainian Hryvnia (UAH). - """ - UAH - - """ - Ugandan Shilling (UGX). - """ - UGX - - """ - United States Dollars (USD). - """ - USD - - """ - United States Dollars Coin (USDC). - """ - USDC - - """ - Uruguayan Pesos (UYU). - """ - UYU - - """ - Uzbekistan som (UZS). - """ - UZS - - """ - Venezuelan Bolivares (VED). - """ - VED - - """ - Venezuelan Bolivares (VEF). - """ - VEF @deprecated(reason: "Use `VES` instead.") - - """ - Venezuelan Bolivares Soberanos (VES). - """ - VES - - """ - Vietnamese đồng (VND). - """ - VND - - """ - Vanuatu Vatu (VUV). - """ - VUV - - """ - Samoan Tala (WST). - """ - WST - - """ - Central African CFA Franc (XAF). - """ - XAF - - """ - East Caribbean Dollar (XCD). - """ - XCD - - """ - West African CFA franc (XOF). - """ - XOF - - """ - CFP Franc (XPF). - """ - XPF - - """ - Unrecognized currency. - """ - XXX - - """ - Yemeni Rial (YER). - """ - YER - - """ - South African Rand (ZAR). - """ - ZAR - - """ - Zambian Kwacha (ZMW). - """ - ZMW -} - -""" -Represents a currency exchange adjustment applied to an order transaction. -""" -type CurrencyExchangeAdjustment implements Node @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "payment_processing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "payment_processing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "payment_processing") { - """ - 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 @componentName(name: "delivery") { - """ - The default package is the one used to calculate shipping costs on checkout. - """ - default: Boolean = false - - """ - Outside dimensions of the empty shipping package. - """ - dimensions: ObjectDimensionsInput - - """ - Descriptive name for the package. - """ - name: String - - """ - Type of package. - """ - type: ShippingPackageType - - """ - Weight of the empty shipping package. - """ - weight: WeightInput -} - -""" -Possible custom storefront environment types. -""" -enum CustomStorefrontEnvironmentType @componentName(name: "channels") { - """ - The environment is used by a specific non-production branch. - """ - CUSTOM - - """ - The environment has no associated branch. - """ - PREVIEW - - """ - The environment is used by your production branch. - """ - PRODUCTION -} - -""" -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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @protectedField(subject: "customer", content: "name") - - """ - The customer's email address. - """ - email: String @deprecated(reason: "Use `defaultEmailAddress.emailAddress` instead.") @protectedField(subject: "customer", content: "email") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): EventConnection! - - """ - The customer's first name. - """ - firstName: String @protectedField(subject: "customer", content: "name") - - """ - 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 identity provider subject identifiers associated with this customer. - """ - identityProviderSubjects: [IdentityProviderSubject!]! - - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) - (`ChannelInformation.channelDefinition.handle`) field. | | | - - `channel:web`
- `channel:web,pos` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | 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"` | - | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) - field. | | | - `name:1001-A` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) - of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). - | - `has_issues`
- `no_issues`
- `not_validated` | | - - `shipping_address_validation_result_summary:no_issues` | - | 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` | - | 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` | - | 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` | - | status | string | Filter by the order's status to manage workflows or - analyze the order lifecycle. | - `open`
- `closed`
- - `cancelled`
- `not_closed` | | - `status:open` | - | 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` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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! - - """ - A list of the customer's payment methods. - """ - paymentMethods( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Whether to show the customer's revoked payment method. - """ - showRevoked: Boolean = false - - """ - When true, shows unrevoked payment methods and revoked payment methods that - are connected to future payments. Overrides the `showRevoked` argument. - """ - showWithPreauthorizedPayments: Boolean = false - ): CustomerPaymentMethodConnection! - - """ - The customer's phone number. - """ - phone: String @deprecated(reason: "Use `defaultPhoneNumber.phoneNumber` instead.") @protectedField(subject: "customer", content: "phone") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | currency_code | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): StoreCreditAccountConnection! - - """ - A list of the customer's subscription contracts. - """ - subscriptionContracts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 customer's tax settings. - """ - taxSettings: TaxSettings! - - """ - The URL to unsubscribe the customer from the mailing list. - """ - unsubscribeUrl: URL! @deprecated(reason: "Use `defaultEmailAddress.marketingUnsubscribeUrl` instead.") @requiredAccess(scope: "`write_customers` access scope. Also: User needs create_and_edit_customers permission.") - - """ - 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { - """ - 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { - """ - 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 @componentName(name: "online_store") { - """ - An orders page type. - """ - NATIVE_ORDERS - - """ - A profile page type. - """ - NATIVE_PROFILE - - """ - A settings page type. - """ - NATIVE_SETTINGS - - """ - 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - 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 @componentName(name: "customers") { - """ - 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 @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - The updated customer. - """ - customer: Customer - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `customerAddressCreate` mutation. -""" -type CustomerAddressCreatePayload @componentName(name: "platform") { - """ - The created address. - """ - address: MailingAddress - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `customerAddressDelete` mutation. -""" -type CustomerAddressDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The updated address. - """ - address: MailingAddress - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -The data sharing preferences set by the merchant. -""" -type CustomerBehaviorTrackingPreference @componentName(name: "merchant_marketing") @privatelyDocumented { - """ - The data sharing level set by the merchant. - """ - dataSharingLevel: CustomerDataSharingLevel! -} - -""" -Possible error codes that can be returned by `CustomerCancelDataErasureUserError`. -""" -enum CustomerCancelDataErasureErrorCode @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customer_data_erasure` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - The customer consent was collected outside of Shopify. - """ - OTHER - - """ - The customer consent was collected by Shopify. - """ - SHOPIFY -} - -""" -Return type for `customerCreate` mutation. -""" -type CustomerCreatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - 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! @protectedField(subject: "customer", content: "name") - - """ - 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - The first line of the address. Typically the street address or PO Box number. - """ - address1: String @protectedField(subject: "customer", content: "address") - - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - The last name in the billing address. - """ - lastName: String @protectedField(subject: "customer", content: "name") - - """ - 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 @protectedField(subject: "customer", content: "address") -} - -""" -The data sharing level set by the merchant. -""" -enum CustomerDataSharingLevel @componentName(name: "merchant_marketing") @privatelyDocumented { - """ - The conservative level. - """ - CONSERVATIVE - - """ - The disabled level. - """ - DISABLED - - """ - The enhanced level. - """ - ENHANCED - - """ - The maximum level. - """ - MAXIMUM -} - -""" -The input fields to delete a customer. -""" -input CustomerDeleteInput @componentName(name: "customers") { - """ - The ID of the customer to delete. - """ - id: ID! @gidTypes(types: ["Customer"]) -} - -""" -Return type for `customerDelete` mutation. -""" -type CustomerDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - The customer's default email address. - """ - emailAddress: String! @protectedField(subject: "customer", content: "email") - - """ - 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! @requiredAccess(scope: "`write_customers` access scope. Also: User needs create_and_edit_customers permission.") - - """ - 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! @requiredAccess(scope: "`write_customers` access scope. Also: User needs create_and_edit_customers permission.") - - """ - 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 @componentName(name: "customers") { - """ - 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 @componentName(name: "customers") { - """ - 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 - - """ - The customer has not specified whether they want to opt in or out of having their open emails tracked. - """ - UNKNOWN -} - -""" -Information that describes when a customer consented to - receiving marketing material by email. -""" -input CustomerEmailMarketingConsentInput @componentName(name: "customers") { - """ - The latest date and time when the customer consented or objected to - receiving marketing material by email. - """ - consentUpdatedAt: DateTime - - """ - 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! - - """ - Identifies the location where the customer consented to receiving marketing material by email. - """ - sourceLocationId: ID @gidTypes(types: ["Location"]) -} - -""" -The record of when a customer consented to receive marketing material by email. -""" -type CustomerEmailMarketingConsentState @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "customers") { - """ - 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! @gidTypes(types: ["Customer"]) - - """ - The marketing consent information when the customer consented to receiving marketing material by email. - """ - emailMarketingConsent: CustomerEmailMarketingConsentInput! -} - -""" -Return type for `customerEmailMarketingConsentUpdate` mutation. -""" -type CustomerEmailMarketingConsentUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - Missing a required argument. - """ - MISSING_ARGUMENT -} - -""" -The possible email marketing states for a customer. -""" -enum CustomerEmailMarketingState @componentName(name: "customers") { - """ - This value is internally-set and read-only. - """ - INVALID - - """ - 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's personal data is erased. This value is internally-set and read-only. - """ - REDACTED - - """ - The customer is subscribed to email marketing. - """ - SUBSCRIBED - - """ - The customer isn't currently subscribed to email marketing but was previously subscribed. - """ - UNSUBSCRIBED -} - -""" -Return type for `customerGenerateAccountActivationUrl` mutation. -""" -type CustomerGenerateAccountActivationUrlPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - 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 ID of the customer. - """ - id: ID - - """ - The phone number of the customer. - """ - phoneNumber: String -} - -""" -The input fields and values to use when creating or updating a customer. -""" -input CustomerInput @componentName(name: "customers") { - """ - 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 - - """ - 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 customer's first name. - """ - firstName: String - - """ - The ID of the customer to update. - """ - id: ID @gidTypes(types: ["Customer"]) - - """ - The customer's last name. - """ - lastName: String - - """ - The customer's locale. - """ - locale: String - - """ - Additional metafields to associate to the customer. - """ - metafields: [MetafieldInput!] - - """ - A unique identifier for the customer that's used with Multipass login. - """ - multipassIdentifier: String - - """ - A note about the customer. - """ - note: String - - """ - The unique phone number for the customer. - """ - phone: String - - """ - 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 - - """ - 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!] -} - -""" -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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "merchant_marketing") @protectedObject(subject: "customer") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "merchant_marketing") @protectedObject(subject: "customer") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CustomerMomentConnection - - """ - 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 @componentName(name: "customers") { - """ - After providing their information, the customer receives a confirmation and is required to - perform a intermediate step before receiving marketing information. - """ - CONFIRMED_OPT_IN - - """ - After providing their information, the customer receives marketing information without any - intermediate steps. - """ - SINGLE_OPT_IN - - """ - The customer receives marketing information but how they were opted in is unknown. - """ - UNKNOWN -} - -""" -The error blocking a customer merge. -""" -type CustomerMergeError @requiredAccess(scope: "The user must have `read_customer_merge` permissions.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - 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 @componentName(name: "platform") { - """ - The customer cannot be merged because it has associated gift cards. - """ - CUSTOMER_HAS_GIFT_CARDS - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The customer cannot be merged. - """ - INVALID_CUSTOMER - - """ - The customer ID is invalid. - """ - INVALID_CUSTOMER_ID - - """ - 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 @componentName(name: "customers") { - """ - The customer is a company contact. - """ - COMPANY_CONTACT - - """ - The customer has payment methods. - """ - CUSTOMER_PAYMENT_METHODS - - """ - The customer does not exist. - """ - DELETED_AT - - """ - The customer has gift cards. - """ - GIFT_CARDS - - """ - The customer has a merge in progress. - """ - MERGE_IN_PROGRESS - - """ - The customer has a multipass identifier. - """ - MULTIPASS_IDENTIFIER - - """ - The override fields are invalid. - """ - OVERRIDE_FIELDS - - """ - The customer has a pending data request. - """ - PENDING_DATA_REQUEST - - """ - The customer has a pending or completed redaction. - """ - REDACTED_AT - - """ - The customer has store credit. - """ - STORE_CREDIT - - """ - The customer has a subscription history. - """ - SUBSCRIPTIONS -} - -""" -The input fields to override default customer merge rules. -""" -input CustomerMergeOverrideFields @componentName(name: "customers") { - """ - The ID of the customer whose default address will be kept. - """ - customerIdOfDefaultAddressToKeep: ID @gidTypes(types: ["Customer"]) - - """ - The ID of the customer whose email will be kept. - """ - customerIdOfEmailToKeep: ID @gidTypes(types: ["Customer"]) - - """ - The ID of the customer whose first name will be kept. - """ - customerIdOfFirstNameToKeep: ID @gidTypes(types: ["Customer"]) - - """ - The ID of the customer whose last name will be kept. - """ - customerIdOfLastNameToKeep: ID @gidTypes(types: ["Customer"]) - - """ - The ID of the customer whose phone number will be kept. - """ - customerIdOfPhoneNumberToKeep: ID @gidTypes(types: ["Customer"]) - - """ - The note to keep. - """ - note: String - - """ - The tags to keep. - """ - tags: [String!] -} - -""" -Return type for `customerMerge` mutation. -""" -type CustomerMergePayload @componentName(name: "platform") { - """ - The asynchronous job for merging the customers. - """ - job: Job - - """ - The ID of the customer resulting from the merge. - """ - resultingCustomerId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [CustomerMergeUserError!]! -} - -""" -A preview of the results of a customer merge request. -""" -type CustomerMergePreview @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - 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 resulting customer ID if the two customers are merged. - """ - resultingCustomerId: ID -} - -""" -The fields that can be used to override the default fields. -""" -type CustomerMergePreviewAlternateFields @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - The default address of a customer. - """ - defaultAddress: MailingAddress - - """ - The email state of a customer. - """ - email: CustomerEmailAddress @protectedField(subject: "customer", content: "email") - - """ - The first name of a customer. - """ - firstName: String @protectedField(subject: "customer", content: "name") - - """ - The last name of a customer. - """ - lastName: String @protectedField(subject: "customer", content: "name") - - """ - The phone number state of a customer. - """ - phoneNumber: CustomerPhoneNumber @protectedField(subject: "customer", content: "phone") -} - -""" -The blocking fields of a customer merge preview. These fields will block customer merge unless edited. -""" -type CustomerMergePreviewBlockingFields @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - 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 @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - The merged addresses resulting from a customer merge. - """ - addresses( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @protectedField(subject: "customer", content: "name") - - """ - The total number of merged draft orders. - """ - draftOrderCount: UnsignedInt64! - - """ - The merged draft orders resulting from a customer merge. - """ - draftOrders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @protectedField(subject: "customer", content: "email") - - """ - The first name resulting from a customer merge. - """ - firstName: String @protectedField(subject: "customer", content: "name") - - """ - The total number of merged gift cards. - """ - giftCardCount: UnsignedInt64! - - """ - The merged gift cards resulting from a customer merge. - """ - giftCards( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @requiredAccess(scope: "The user must have `read_customer_merge` permissions.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - 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 resulting from the merge. - """ - resultingCustomerId: ID! - - """ - The status of the customer merge request. - """ - status: CustomerMergeRequestStatus! -} - -""" -The status of the customer merge request. -""" -enum CustomerMergeRequestStatus @componentName(name: "customers") { - """ - The customer merge request has been completed. - """ - COMPLETED - - """ - The customer merge request has failed. - """ - FAILED - - """ - The customer merge request is currently in progress. - """ - IN_PROGRESS - - """ - The customer merge request has been requested. - """ - REQUESTED -} - -""" -An error that occurs while merging two customers. -""" -type CustomerMergeUserError implements DisplayableError @requiredAccess(scope: "`read_customer_merge` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "The user must have `read_customer_merge` permissions.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "merchant_marketing") { - """ - The date and time when the customer's session occurred. - """ - occurredAt: DateTime! -} - -""" -An auto-generated type for paginating through multiple CustomerMoments. -""" -type CustomerMomentConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") = BankAccount | CustomerCreditCard | CustomerPaypalBillingAgreement | CustomerShopPayAgreement - -""" -The billing address of a payment instrument. -""" -type CustomerPaymentInstrumentBillingAddress @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - The first line of the address. Typically the street address or PO Box number. - """ - address1: String @protectedField(subject: "customer", content: "address") - - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - 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 @protectedField(subject: "customer", content: "address") -} - -""" -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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionContractConnection! -} - -""" -An auto-generated type for paginating through multiple CustomerPaymentMethods. -""" -type CustomerPaymentMethodConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") @privatelyDocumented { - """ - 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 @componentName(name: "platform") @privatelyDocumented { - """ - 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 @componentName(name: "platform") @privatelyDocumented { - """ - Customer doesn't exist. - """ - CUSTOMER_DOES_NOT_EXIST - - """ - Invalid encrypted duplication data. - """ - INVALID_ENCRYPTED_DUPLICATION_DATA - - """ - Too many requests. - """ - TOO_MANY_REQUESTS -} - -""" -Return type for `customerPaymentMethodCreditCardCreate` mutation. -""" -type CustomerPaymentMethodCreditCardCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "payments") { - """ - 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 @componentName(name: "platform") @privatelyDocumented { - """ - 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 @componentName(name: "platform") @privatelyDocumented { - """ - 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 @componentName(name: "platform") @privatelyDocumented { - """ - Customer doesn't exist. - """ - CUSTOMER_DOES_NOT_EXIST - - """ - Invalid payment instrument. - """ - INVALID_INSTRUMENT - - """ - Must be targeted to another shop in the same organization. - """ - INVALID_ORGANIZATION_SHOP - - """ - Payment method doesn't exist. - """ - PAYMENT_METHOD_DOES_NOT_EXIST - - """ - Target shop cannot be the same as the source. - """ - SAME_SHOP - - """ - Too many requests. - """ - TOO_MANY_REQUESTS -} - -""" -Return type for `customerPaymentMethodGetUpdateUrl` mutation. -""" -type CustomerPaymentMethodGetUpdateUrlPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Customer doesn't exist. - """ - CUSTOMER_DOES_NOT_EXIST - - """ - Invalid payment instrument. - """ - INVALID_INSTRUMENT - - """ - Payment method doesn't exist. - """ - PAYMENT_METHOD_DOES_NOT_EXIST - - """ - Too many requests. - """ - TOO_MANY_REQUESTS -} - -""" -Return type for `customerPaymentMethodPaypalBillingAgreementCreate` mutation. -""" -type CustomerPaymentMethodPaypalBillingAgreementCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "payments") { - """ - The input fields for a remote Adyen customer payment method. - """ - adyenPaymentMethod: RemoteAdyenPaymentMethodInput - - """ - The input fields for a remote authorize net customer profile. - """ - authorizeNetCustomerPaymentProfile: RemoteAuthorizeNetCustomerPaymentProfileInput - - """ - The input fields for a remote Braintree customer profile. - """ - braintreePaymentMethod: RemoteBraintreePaymentMethodInput - - """ - The input fields for a remote PayPal customer payment method. - """ - paypalPaymentMethod: RemotePaypalPaymentMethodInput - - """ - Input containing the fields for a remote stripe credit card. - """ - stripePaymentMethod: RemoteStripePaymentMethodInput -} - -""" -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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") { - """ - 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 @componentName(name: "platform") { - """ - Adyen is not enabled for subscriptions. - """ - ADYEN_NOT_ENABLED_FOR_SUBSCRIPTIONS - - """ - Authorize.net is not enabled for subscriptions. - """ - AUTHORIZE_NET_NOT_ENABLED_FOR_SUBSCRIPTIONS - - """ - The input value is blank. - """ - BLANK - - """ - Braintree is not enabled for subscriptions. - """ - BRAINTREE_NOT_ENABLED_FOR_SUBSCRIPTIONS - - """ - Exactly one remote reference is required. - """ - EXACTLY_ONE_REMOTE_REFERENCE_REQUIRED - - """ - The input value is invalid. - """ - INVALID - - """ - The input value needs to be blank. - """ - PRESENT - - """ - The input value is already taken. - """ - TAKEN -} - -""" -The revocation reason types for a customer payment method. -""" -enum CustomerPaymentMethodRevocationReason @componentName(name: "payments") { - """ - 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 - - """ - Failed to contact Braintree API. - """ - BRAINTREE_API_AUTHENTICATION_ERROR - - """ - The Braintree payment gateway is not enabled. - """ - BRAINTREE_GATEWAY_NOT_ENABLED - - """ - The Braintree payment method type should be a credit card or Apple Pay card. - """ - BRAINTREE_PAYMENT_METHOD_NOT_CARD - - """ - Braintree returned no payment methods. Make sure the correct Braintree account is linked. - """ - BRAINTREE_RETURNED_NO_PAYMENT_METHOD - - """ - The customer redacted their payment method. - """ - CUSTOMER_REDACTED - - """ - CVV attempts limit exceeded. - """ - CVV_ATTEMPTS_LIMIT_EXCEEDED - - """ - The billing address failed to retrieve. - """ - FAILED_TO_RETRIEVE_BILLING_ADDRESS - - """ - The credit card failed to update. - """ - FAILED_TO_UPDATE_CREDIT_CARD - - """ - The payment method was manually revoked. - """ - MANUALLY_REVOKED - - """ - The payment method was replaced with an existing payment method. The - associated contracts have been migrated to the other payment method. - """ - MERGED - - """ - Verification of payment method failed. - """ - PAYMENT_METHOD_VERIFICATION_FAILED - - """ - 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 - - """ - The Stripe payment method type should be card. - """ - STRIPE_PAYMENT_METHOD_NOT_CARD - - """ - Stripe did not return any payment methods. Make sure that the correct Stripe account is linked. - """ - STRIPE_RETURNED_NO_PAYMENT_METHOD - - """ - Verification of the payment method failed due to 3DS not being supported. - """ - THREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTED - - """ - Too many consecutive failed attempts. - """ - TOO_MANY_CONSECUTIVE_FAILURES -} - -""" -Return type for `customerPaymentMethodRevoke` mutation. -""" -type CustomerPaymentMethodRevokePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - 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 @protectedField(subject: "customer", content: "email") -} - -""" -A phone number. -""" -type CustomerPhoneNumber @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - The source from which the SMS marketing information for the customer was collected. - """ - marketingCollectedFrom: CustomerConsentCollectedFrom - - """ - 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 SMS marketing material. - """ - marketingState: CustomerSmsMarketingState! - - """ - 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 - - """ - A customer's phone number. - """ - phoneNumber: String! @protectedField(subject: "customer", content: "phone") - - """ - The location where the customer consented to receive marketing material by SMS. - """ - sourceLocation: Location -} - -""" -The valid tiers for the predicted spend of a customer with a shop. -""" -enum CustomerPredictedSpendTier @componentName(name: "customers") { - """ - 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 zero, or in the lowest spending range for the shop in the following year. - """ - LOW - - """ - The customer's spending is predicted to be in the normal spending range for the shop in the following year. - """ - MEDIUM -} - -""" -The possible product subscription states for a customer, as defined by the customer's subscription contracts. -""" -enum CustomerProductSubscriberStatus @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - The updated customer. - """ - customer: Customer - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `customerReplaceTaxExemptions` mutation. -""" -type CustomerReplaceTaxExemptionsPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Customer does not exist. - """ - DOES_NOT_EXIST - - """ - Failed to request customer data erasure. - """ - FAILED_TO_REQUEST -} - -""" -Return type for `customerRequestDataErasure` mutation. -""" -type CustomerRequestDataErasurePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customer_data_erasure` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "customers") { - """ - Customers with recent purchases, some orders, and moderate spend. - """ - ACTIVE - - """ - Customers without recent purchases, fewer orders, and with lower spend. - """ - ALMOST_LOST - - """ - Customers without recent purchases, but with a strong history of orders and spend. - """ - AT_RISK - - """ - Customers with very recent purchases, many orders, and the most spend. - """ - CHAMPIONS - - """ - Customers without recent orders, with infrequent orders, and with low spend. - """ - DORMANT - - """ - Customers with recent purchases, many orders, and the most spend. - """ - LOYAL - - """ - Customers with recent purchases, some orders, and moderate spend. - """ - NEEDS_ATTENTION - - """ - Customers with very recent purchases, few orders, and low spend. - """ - NEW - - """ - Customers without recent purchases, but with a very strong history of orders and spend. - """ - PREVIOUSLY_LOYAL - - """ - Customers with recent purchases, few orders, and low spend. - """ - PROMISING - - """ - Customers with no orders yet. - """ - PROSPECTS -} - -""" -The set of valid sort keys for the CustomerSavedSearch query. -""" -enum CustomerSavedSearchSortKeys @componentName(name: "platform") { - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `name` value. - """ - NAME -} - -""" -The member of a segment. -""" -type CustomerSegmentMember implements HasMetafields @requiredAccess(scope: "`read_customers` access scope. Also: The user must not have restricted access.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - 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! @protectedField(subject: "customer", content: "name") - - """ - The member's first name. - """ - firstName: String @protectedField(subject: "customer", content: "name") - - """ - The member’s ID. - """ - id: ID! - - """ - The member's last name. - """ - lastName: String @protectedField(subject: "customer", content: "name") - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 @componentName(name: "customers") { - """ - 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 @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope. Also: The user must not have restricted access.") @componentName(name: "customers") { - """ - 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! - - """ - The status of the customer segment members query. - """ - status: CustomerSegmentMembersQueryStatus! -} - -""" -Return type for `customerSegmentMembersQueryCreate` mutation. -""" -type CustomerSegmentMembersQueryCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - 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 - - """ - The ID of the segment. - """ - segmentId: ID @gidTypes(types: ["Segment"]) - - """ - Sort the list by a given key. - """ - sortKey: String -} - -""" -The status of a customer segment members query. -""" -enum CustomerSegmentMembersQueryStatus @componentName(name: "customers") { - """ - The query has completed. - """ - COMPLETED - - """ - The query has been deleted. - """ - DELETED - - """ - The query has failed. - """ - FAILED - - """ - The query has been initialized. - """ - INITIALIZED -} - -""" -Represents a customer segment members query custom error. -""" -type CustomerSegmentMembersQueryUserError implements DisplayableError @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -Return type for `customerSendAccountInviteEmail` mutation. -""" -type CustomerSendAccountInviteEmailPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -The input fields required to identify a customer. -""" -input CustomerSetIdentifiers @oneOf @componentName(name: "customers") { - """ - Custom ID of customer to upsert. - """ - customId: UniqueMetafieldValueInput - - """ - Email address of the customer to upsert. - """ - email: String - - """ - ID of customer to update. - """ - id: ID - - """ - Phone number of the customer to upsert. - """ - phone: String -} - -""" -The input fields and values to use when creating or updating a customer. -""" -input CustomerSetInput @componentName(name: "customers") { - """ - 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.") @gidTypes(types: ["Customer"]) - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - The id field is not allowed if identifier is provided. - """ - ID_NOT_ALLOWED - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - The identifier value does not match the value of the corresponding field in the input. - """ - INPUT_MISMATCH - - """ - The input value is invalid. - """ - INVALID - - """ - The input argument `metafields` (if present) must contain the `customId` value. - """ - METAFIELD_MISMATCH - - """ - The input field corresponding to the identifier is required. - """ - MISSING_FIELD_REQUIRED - - """ - Resource matching the identifier was not found. - """ - NOT_FOUND - - """ - 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 -} - -""" -Represents a Shop Pay card instrument for customer payment method. -""" -type CustomerShopPayAgreement @requiredAccess(scope: "`read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - 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! @protectedField(subject: "customer", content: "name") -} - -""" -An error that occurs during execution of an SMS marketing consent mutation. -""" -type CustomerSmsMarketingConsentError implements DisplayableError @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - Missing a required argument. - """ - MISSING_ARGUMENT -} - -""" -The marketing consent information when the customer consented to - receiving marketing material by SMS. -""" -input CustomerSmsMarketingConsentInput @componentName(name: "customers") { - """ - 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! - - """ - Identifies the location where the customer consented to receiving marketing material by SMS. - """ - sourceLocationId: ID @gidTypes(types: ["Location"]) -} - -""" -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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") @protectedObject(subject: "customer") { - """ - 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 @componentName(name: "customers") { - """ - 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! @gidTypes(types: ["Customer"]) - - """ - The marketing consent information when the customer consented to receiving marketing material by SMS. - """ - smsMarketingConsent: CustomerSmsMarketingConsentInput! -} - -""" -Return type for `customerSmsMarketingConsentUpdate` mutation. -""" -type CustomerSmsMarketingConsentUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - The customer hasn't subscribed to SMS marketing. - """ - NOT_SUBSCRIBED - - """ - The customer is in the process of subscribing to SMS marketing. - """ - PENDING - - """ - The customer's personal data is erased. This value is internally-set and read-only. - """ - REDACTED - - """ - The customer is subscribed to SMS marketing. - """ - SUBSCRIBED - - """ - The customer isn't currently subscribed to SMS marketing but was previously subscribed. - """ - UNSUBSCRIBED -} - -""" -The set of valid sort keys for the Customer query. -""" -enum CustomerSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "merchant_marketing") @protectedObject(subject: "customer") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @requiredAccess(scope: "`read_privacy_settings` access scope, `read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "privacy") { - """ - If the data sale opt out page is auto managed. - """ - autoManaged: Boolean! -} - -""" -Return type for `dataSaleOptOut` mutation. -""" -type DataSaleOptOutPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Friday. - """ - FRIDAY - - """ - Monday. - """ - MONDAY - - """ - Saturday. - """ - SATURDAY - - """ - Sunday. - """ - SUNDAY - - """ - Thursday. - """ - THURSDAY - - """ - Tuesday. - """ - TUESDAY - - """ - Wednesday. - """ - WEDNESDAY -} - -""" -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 @componentName(name: "apps") { - """ - 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! - - """ - The number of seconds until the delegate access token expires. - """ - expiresIn: Int -} - -""" -Return type for `delegateAccessTokenCreate` mutation. -""" -type DelegateAccessTokenCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The parent access token can't be a delegate token. - """ - DELEGATE_ACCESS_TOKEN - - """ - The access scope can't be empty. - """ - EMPTY_ACCESS_SCOPE - - """ - The delegate token can't expire after the parent token. - """ - EXPIRES_AFTER_PARENT - - """ - The expires_in value must be greater than 0. - """ - NEGATIVE_EXPIRES_IN - - """ - Persistence failed. - """ - PERSISTENCE_FAILED - - """ - The parent access token can't have a refresh token. - """ - REFRESH_TOKEN - - """ - Unknown scopes. - """ - UNKNOWN_SCOPES -} - -""" -Return type for `delegateAccessTokenDestroy` mutation. -""" -type DelegateAccessTokenDestroyPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Access denied. - """ - ACCESS_DENIED - - """ - Access token not found. - """ - ACCESS_TOKEN_NOT_FOUND - - """ - Cannot delete parent access token. - """ - CAN_ONLY_DELETE_DELEGATE_TOKENS - - """ - Persistence failed. - """ - PERSISTENCE_FAILED -} - -""" -The input fields for a delegate access token. -""" -input DelegateAccessTokenInput @componentName(name: "apps") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -The supported subject types of deletion events. -""" -enum DeletionEventSubjectType @componentName(name: "platform") { - COLLECTION - PRODUCT -} - -""" -A shipping service and a list of countries that the service is available for. -""" -type DeliveryAvailableService @requiredAccess(scope: "Any of `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "Any of `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - Whether the carrier service is active. - """ - active: Boolean! - - """ - The list of services offered for given destinations. - """ - availableServicesForCountries( - """ - The country codes of the destinations. - """ - countryCodes: [CountryCode!] - - """ - The locations of the possible origins. - """ - origins: [ID!] @gidTypes(types: ["Location"]) - - """ - 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( - """ - The country codes of the destinations. - """ - countryCodes: [CountryCode!] - ): 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 @requiredAccess(scope: "Any of `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "delivery") { - """ - Whether this carrier service is active. If `true`, then the service will be available to serve rates in checkout. - """ - active: Boolean! - - """ - The URL endpoint that Shopify needs to retrieve shipping rates. This must be a public URL. - """ - callbackUrl: URL! - - """ - The name of the shipping service as seen by merchants and their customers. - """ - name: String! - - """ - Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. - """ - supportsServiceDiscovery: Boolean! -} - -""" -An auto-generated type which holds one DeliveryCarrierService and a cursor during pagination. -""" -type DeliveryCarrierServiceEdge @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - Whether this carrier service is active. If `true`, then the service will be available to serve rates in checkout. - """ - active: Boolean - - """ - The URL endpoint that Shopify needs to retrieve shipping rates. This must be a public URL. - """ - callbackUrl: URL - - """ - The global ID of the carrier service to update. - """ - id: ID! @gidTypes(types: ["CarrierService"]) - - """ - The name of the shipping service as seen by merchants and their customers. - """ - name: String - - """ - Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples. - """ - supportsServiceDiscovery: Boolean -} - -""" -A condition that must pass for a delivery method definition to be applied to an order. -""" -type DeliveryCondition implements Node @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") = MoneyV2 | Weight - -""" -The field type that the condition will be applied to. -""" -enum DeliveryConditionField @componentName(name: "delivery") { - """ - The condition will check against the total price of the order. - """ - TOTAL_PRICE - - """ - The condition will check against the total weight of the order. - """ - TOTAL_WEIGHT -} - -""" -The operator to use to determine if the condition passes. -""" -enum DeliveryConditionOperator @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - The country code of the country in the ISO 3166-1 alpha-2 format. - """ - code: CountryCode - - """ - Associate all available provinces with this country. - """ - includeAllProvinces: Boolean - - """ - The regions associated with this country. - """ - provinces: [DeliveryProvinceInput!] - - """ - Whether the country is a part of the 'Rest of World' shipping zone. - """ - restOfWorld: Boolean -} - -""" -A delivery customization. -""" -type DeliveryCustomization implements HasMetafieldDefinitions & HasMetafields & Node @requiredAccess(scope: "`read_delivery_customizations` access scope.") @componentName(name: "delivery") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - The Shopify Function implementing the delivery customization. - """ - shopifyFunction: ShopifyFunction! - - """ - The title of the delivery customization. - """ - title: String! -} - -""" -Return type for `deliveryCustomizationActivation` mutation. -""" -type DeliveryCustomizationActivationPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "`read_delivery_customizations` access scope.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "platform") { - """ - Shop must be on a Shopify Plus plan to activate functions from a custom app. - """ - CUSTOM_APP_FUNCTION_NOT_ELIGIBLE - - """ - Shop must be on a Shopify Plus plan to activate delivery customizations from a custom app. - """ - DELIVERY_CUSTOMIZATION_FUNCTION_NOT_ELIGIBLE - - """ - Delivery customization not found. - """ - DELIVERY_CUSTOMIZATION_NOT_FOUND - - """ - Function does not implement the required interface for this delivery customization. - """ - FUNCTION_DOES_NOT_IMPLEMENT - - """ - Function ID cannot be changed. - """ - FUNCTION_ID_CANNOT_BE_CHANGED - - """ - Function not found. - """ - FUNCTION_NOT_FOUND - - """ - Function is pending deletion. - """ - FUNCTION_PENDING_DELETION - - """ - The input value is invalid. - """ - INVALID - - """ - Could not create or update metafields. - """ - INVALID_METAFIELDS - - """ - Maximum delivery customizations are already enabled. - """ - MAXIMUM_ACTIVE_DELIVERY_CUSTOMIZATIONS - - """ - 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 - - """ - Required input field must be present. - """ - REQUIRED_INPUT_FIELD - - """ - Unauthorized app scope. - """ - UNAUTHORIZED_APP_SCOPE -} - -""" -The input fields to create and update a delivery customization. -""" -input DeliveryCustomizationInput @componentName(name: "delivery") { - """ - The enabled status of the delivery customization. - """ - enabled: Boolean - - """ - Function handle scoped to your current app ID. Only finds functions within your app. - """ - functionHandle: String - - """ - The ID of the function providing the delivery customization. - """ - functionId: String @deprecated(reason: "Use `functionHandle` instead.") - - """ - Additional metafields to associate to the delivery customization. - """ - metafields: [MetafieldInput!] = [] - - """ - The title of the delivery customization. - """ - title: String -} - -""" -Return type for `deliveryCustomizationUpdate` mutation. -""" -type DeliveryCustomizationUpdatePayload @componentName(name: "platform") { - """ - Returns the updated delivery customization. - """ - deliveryCustomization: DeliveryCustomization - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [DeliveryCustomizationError!]! -} - -""" -Local pickup settings associated with a location. -""" -type DeliveryLocalPickupSettings @requiredAccess(scope: "Any of `locations` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - Custom pickup time. Unrecognized pickup time enum value. - """ - CUSTOM @deprecated(reason: "Custom pickup time is no longer supported.") - - """ - Usually ready in 5+ days. - """ - FIVE_OR_MORE_DAYS - - """ - Usually ready in 4 hours. - """ - FOUR_HOURS - - """ - Usually ready in 1 hour. - """ - ONE_HOUR - - """ - Usually ready in 24 hours. - """ - TWENTY_FOUR_HOURS - - """ - Usually ready in 2 hours. - """ - TWO_HOURS - - """ - Usually ready in 2-4 days. - """ - TWO_TO_FOUR_DAYS -} - -""" -A location group is a collection of locations. They share zones and delivery methods across delivery -profiles. -""" -type DeliveryLocationGroup implements Node @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - A globally-unique ID. - """ - id: ID! - - """ - A list of all locations that are part of this location group. - """ - locations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Whether to include the locations that are deactivated. - """ - includeInactive: Boolean = false - - """ - Whether to include the legacy locations of fulfillment services. - """ - includeLegacy: Boolean = false - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | active | string | - | address1 | string | - | address2 | string | - | city | string | - | country | string | - | created_at | time | - | geolocated | boolean | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | legacy | boolean | - | location_id | id | - | name | string | - | pickup_in_store | string | | - `enabled`
- `disabled` | - | province | string | - | zip | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): LocationConnection! - - """ - A count of all locations that are part of this location group. - """ - locationsCount: Int! -} - -""" -Links a location group with a zone and the associated method definitions. -""" -type DeliveryLocationGroupZone @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - The number of method definitions for the zone. - """ - methodDefinitionCounts: DeliveryMethodDefinitionCounts! - - """ - The method definitions associated to a zone and location group. - """ - methodDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - Return only eligible or ineligible method definitions. - """ - eligible: Boolean - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - Return only merchant or participant method definitions. - """ - type: DeliveryMethodDefinitionType - ): DeliveryMethodDefinitionConnection! - - """ - The zone associated to a location group. - """ - zone: DeliveryZone! -} - -""" -An auto-generated type for paginating through multiple DeliveryLocationGroupZones. -""" -type DeliveryLocationGroupZoneConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - A list of countries to associate with the zone. - """ - countries: [DeliveryCountryInput!] - - """ - A globally-unique ID of the zone. - """ - id: ID @gidTypes(types: ["Zone"]) - - """ - A list of method definitions to create. - """ - methodDefinitionsToCreate: [DeliveryMethodDefinitionInput!] - - """ - A list of method definitions to update. - """ - methodDefinitionsToUpdate: [DeliveryMethodDefinitionInput!] - - """ - The name of the zone. - """ - name: String -} - -""" -The input fields for a local pickup setting associated with a location. -""" -input DeliveryLocationLocalPickupEnableInput @componentName(name: "delivery") { - """ - The instructions for the local pickup. - """ - instructions: String - - """ - The ID of the location associated with the location setting. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - The time of the local pickup. - """ - pickupTime: DeliveryLocalPickupTime! -} - -""" -Represents an error that happened when changing local pickup settings for a location. -""" -type DeliveryLocationLocalPickupSettingsError implements DisplayableError @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "platform") { - """ - 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 HasMetafields & Node @requiredAccess(scope: "`read_orders` access scope, `read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "delivery") { - """ - 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 - - """ - This represents the pickup point for the delivery. It returns null when the - delivery method doesn't utilize a pickup point generated by a delivery option - generator, or when the used pickup point isn't generated by a delivery option - generator owned by the requesting app. - """ - deliveryOptionGeneratorPickupPoint: DeliveryOptionGeneratorPickupPoint - - """ - 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 - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 @componentName(name: "delivery") @protectedObject(subject: "customer") { - """ - The delivery instructions to follow when performing the delivery. - """ - instructions: String - - """ - The phone number to contact when performing the delivery. - """ - phone: String @protectedField(subject: "customer", content: "phone") -} - -""" -A method definition contains the delivery rate and the conditions that must be met for the method to be -applied. -""" -type DeliveryMethodDefinition implements Node @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - Whether this method definition is active. - """ - active: Boolean! - - """ - The currency used in this method definition. - """ - currencyCode: CurrencyCode - - """ - The description of the method definition. Only available on shipping rates that are custom. - """ - description: String - - """ - The conditions that must pass for free delivery to be applied to an order. - """ - freeConditions: [DeliveryRateRangeCondition!]! - - """ - 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 rate groups that make up this method definition. - """ - rateGroups( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DeliveryRateGroupConnection - - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - Whether to use this method definition during rate calculation. - """ - active: Boolean - - """ - A list of conditions to update on the method definition. - """ - conditionsToUpdate: [DeliveryUpdateConditionInput!] - - """ - The currency used for this method definition, as well as all rate definitions, - participants, and rate range conditions in this method definition. - """ - currencyCode: CurrencyCode - - """ - The description of the method definition. - """ - description: String - - """ - A list of at most one `TOTAL_CART_VALUE`-based rate range condition without a - `max` value. If a buyer's cart exceeds this amount, the delivery option will be free. - """ - freeConditions: [DeliveryRateRangeConditionInput!] - - """ - A globally-unique ID of the method definition. Use only when updating a method definition. - """ - id: ID @gidTypes(types: ["MethodDefinition"]) - - """ - The name of the method definition. - """ - name: String - - """ - A participant to apply to the method definition. - """ - participant: DeliveryParticipantInput - - """ - A list of price conditions on the method definition. - """ - priceConditionsToCreate: [DeliveryPriceConditionInput!] - - """ - A rate definition to apply to the method definition. - """ - rateDefinition: DeliveryRateDefinitionInput - - """ - A list of rate groups to create on the method definition. A method definition must have one and only one rate group. - """ - rateGroupsToCreate: [DeliveryRateGroupCreateInput!] - - """ - A list of rate groups to update on the method definition. A method definition must have one and only one rate group. - """ - rateGroupsToUpdate: [DeliveryRateGroupUpdateInput!] - - """ - A list of weight conditions on the method definition. - """ - weightConditionsToCreate: [DeliveryWeightConditionInput!] -} - -""" -The different types of method definitions to filter by. -""" -enum DeliveryMethodDefinitionType @componentName(name: "delivery") { - """ - A static merchant-defined rate. - """ - MERCHANT - - """ - A dynamic participant rate. - """ - PARTICIPANT -} - -""" -Possible method types that a delivery method can have. -""" -enum DeliveryMethodType @componentName(name: "delivery") { - """ - The order is delivered using a local delivery service. - """ - LOCAL - - """ - Non-physical items, no delivery needed. - """ - NONE - - """ - The order is delivered to a pickup point. - """ - PICKUP_POINT - - """ - The order is picked up by the customer. - """ - PICK_UP - - """ - In-store sale, no delivery needed. - """ - RETAIL - - """ - The order is shipped. - """ - SHIPPING -} - -""" -Represents a delivery option generator pickup point. -""" -type DeliveryOptionGeneratorPickupPoint @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "delivery") { - """ - The ID of the app that owns the function. - """ - appId: ID! - - """ - The external ID of the pickup point. - """ - externalId: String! - - """ - The ID of the pickup point delivery option generator function. - """ - functionId: String! -} - -""" -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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 creating a participant on a rate group. -""" -input DeliveryParticipantCreateInput @componentName(name: "delivery") { - """ - Whether to automatically display new shipping services to the customer when a service becomes available. - """ - adaptToNewServices: Boolean - - """ - The ID of the carrier service for this participant. - """ - carrierServiceId: ID! @gidTypes(types: ["CarrierService"]) - - """ - The fixed fee 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. - """ - services: [DeliveryParticipantServiceInput!] -} - -""" -The input fields for a participant. -""" -input DeliveryParticipantInput @componentName(name: "delivery") { - """ - Whether to automatically display new shipping services to the customer when a service becomes available. - """ - adaptToNewServices: Boolean - - """ - The ID of the carrier service for this participant. - """ - carrierServiceId: ID @gidTypes(types: ["CarrierService"]) - - """ - The fixed feed that's defined by the merchant for this participant. - """ - fixedFee: MoneyInput - - """ - The ID of the participant. - """ - id: ID @gidTypes(types: ["Participant"]) - - """ - The list of shipping services offered by the participant. - """ - participantServices: [DeliveryParticipantServiceInput!] - - """ - The merchant-defined percentage-of-rate fee for this participant. - """ - percentageOfRateFee: Float -} - -""" -A mail service provided by the participant. -""" -type DeliveryParticipantService @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - Whether the service is active. - """ - active: Boolean! - - """ - The name of the service. - """ - name: String! -} - -""" -The input fields for updating a participant. -""" -input DeliveryParticipantUpdateInput @componentName(name: "delivery") { - """ - Whether new services should be included for the participant. - """ - adaptToNewServices: Boolean - - """ - A globally-unique ID of the carrier service. - """ - carrierServiceId: ID @gidTypes(types: ["CarrierService"]) - - """ - The fixed fee to charge for the participant. - """ - fixedFee: MoneyInput - - """ - A globally-unique ID of the participant. - """ - id: ID! @gidTypes(types: ["Participant"]) - - """ - The percentage of rate fee to charge for the participant. - """ - percentageOfRateFee: Float - - """ - The list of shipping services offered by the participant. - """ - services: [DeliveryParticipantServiceInput!] -} - -""" -The input fields for a price-based condition of a delivery method definition. -""" -input DeliveryPriceConditionInput @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - 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! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DeliveryProfileItemConnection! - - """ - The location groups and associated zones using this profile. - """ - profileLocationGroups( - """ - Filter the location groups of the profile by location group ID. - """ - locationGroupId: ID @gidTypes(types: ["LocationGroup"]) - ): [DeliveryProfileLocationGroup!]! - - """ - Selling plan groups associated with the specified delivery profile. - """ - sellingPlanGroups( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - The list of condition IDs to delete. - """ - conditionsToDelete: [ID!] @gidTypes(types: ["Condition"]) - - """ - 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 deleted from the delivery profile. - """ - locationGroupsToDelete: [ID!] @gidTypes(types: ["LocationGroup"]) - - """ - 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 method definition IDs to delete. - """ - methodDefinitionsToDelete: [ID!] @gidTypes(types: ["MethodDefinition"]) - - """ - The name of the delivery profile. - """ - name: String - - """ - The list of location groups associated with the delivery profile. - """ - profileLocationGroups: [DeliveryProfileLocationGroupInput!] - - """ - The list of selling plan groups to be associated with the delivery profile. - """ - sellingPlanGroupsToAssociate: [ID!] @gidTypes(types: ["SellingPlanGroup"]) - - """ - The list of selling plan groups to be dissociated with the delivery profile. - """ - sellingPlanGroupsToDissociate: [ID!] @gidTypes(types: ["SellingPlanGroup"]) - - """ - The list of product variant IDs to be associated with the delivery profile. - """ - variantsToAssociate: [ID!] @gidTypes(types: ["ProductVariant"]) - - """ - 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!] @gidTypes(types: ["ProductVariant"]) - - """ - The list of zone IDs to delete. - """ - zonesToDelete: [ID!] @gidTypes(types: ["Zone"]) -} - -""" -A product and the subset of associated variants that are part of this delivery profile. -""" -type DeliveryProfileItem implements Node @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - A globally-unique ID. - """ - id: ID! - - """ - A product associated with this profile. - """ - product: Product! - - """ - The product variants associated with this delivery profile. - """ - variants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductVariantConnection! -} - -""" -An auto-generated type for paginating through multiple DeliveryProfileItems. -""" -type DeliveryProfileItemConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "delivery") { - """ - The globally-unique ID of the delivery profile location group. - """ - id: ID @gidTypes(types: ["LocationGroup"]) - - """ - The list of location IDs to be moved to this location group. - """ - locations: [ID!] @gidTypes(types: ["Location"]) - - """ - 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!] @gidTypes(types: ["Location"]) - - """ - 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!] @gidTypes(types: ["Location"]) - - """ - 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 @componentName(name: "platform") { - """ - The delivery profile deletion job triggered by the mutation. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -The set of valid sort keys for the DeliveryProfile query. -""" -enum DeliveryProfileSortKeys @componentName(name: "platform") { - """ - 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 `deliveryProfileUpdate` mutation. -""" -type DeliveryProfileUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_delivery_promises` access scope.") @componentName(name: "delivery") { - """ - The branded promise handle of the promise participant. - """ - brandedPromiseHandle: String! - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "`read_delivery_promises` access scope.") @componentName(name: "delivery") = ProductVariant - -""" -The type of object that the participant is attached to. -""" -enum DeliveryPromiseParticipantOwnerType @componentName(name: "delivery") { - """ - A product variant. - """ - PRODUCTVARIANT -} - -""" -Return type for `deliveryPromiseParticipantsUpdate` mutation. -""" -type DeliveryPromiseParticipantsUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_delivery_promises` access scope.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The time zone is invalid. - """ - INVALID_TIME_ZONE - - """ - The location doesn't belong to the app. - """ - MUST_BELONG_TO_APP - - """ - 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 delivery promise settings. -""" -type DeliveryPromiseSetting @requiredAccess(scope: "`read_shipping` access scope or `read_shop_promise_program` access scope.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - 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 @componentName(name: "delivery") { - """ - The code of the region. - """ - code: String! -} - -""" -The rate class of a rate definition. -""" -type DeliveryRateClass @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - A globally-unique ID. - """ - id: ID! - - """ - The maximum transit time in seconds. - """ - maxTransitTime: Int! - - """ - The minimum transit time in seconds. - """ - minTransitTime: Int! - - """ - Name of the rate class. - """ - name: String! -} - -""" -The merchant-defined rate of the [DeliveryMethodDefinition](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryMethodDefinition). -""" -type DeliveryRateDefinition implements Node @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - The conditions that must pass for this rate definition to be applied to an order. - """ - conditions: [DeliveryRateRangeCondition!]! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The maximum transit time of the rate in seconds. - """ - maxTransitTime: Int - - """ - The minimum transit time of the rate in seconds. - """ - minTransitTime: Int - - """ - The price of this rate. - """ - price: MoneyV2! - - """ - The class of the rate. The corresponding delivery method definition must have the same name. - """ - rateClass: DeliveryRateClass -} - -""" -The input fields for creating a rate definition on a rate group. -""" -input DeliveryRateDefinitionCreateInput @componentName(name: "delivery") { - """ - The rate range conditions for the rate definition. - """ - conditions: [DeliveryRateRangeConditionInput!] - - """ - The maximum transit time of the rate in seconds. - """ - maxTransitTime: Int - - """ - The minimum transit time of the rate in seconds. - """ - minTransitTime: Int - - """ - The price of the rate definition. The currency must match the currency of the - method definition this rate definition is in. - """ - price: MoneyInput! -} - -""" -The input fields for a rate definition. -""" -input DeliveryRateDefinitionInput @componentName(name: "delivery") { - """ - A globally-unique ID of the rate definition. - """ - id: ID @gidTypes(types: ["RateDefinition"]) - - """ - The price of the rate definition. - """ - price: MoneyInput! -} - -""" -The input fields for updating a rate definition. -""" -input DeliveryRateDefinitionUpdateInput @componentName(name: "delivery") { - """ - The rate range conditions for the rate definition. - """ - conditions: [DeliveryRateRangeConditionInput!] - - """ - A globally-unique ID of the rate definition. - """ - id: ID! @gidTypes(types: ["RateDefinition"]) - - """ - The maximum delivery time in days. - """ - maxTransitTime: Int - - """ - The minimum delivery time in days. - """ - minTransitTime: Int - - """ - The price of the rate definition. The currency must match the currency of the - method definition this rate definition is in. - """ - price: MoneyInput -} - -""" -A group of rates that make up a method definition. -""" -type DeliveryRateGroup @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - Globally unique identifier for this delivery rate group. - """ - id: ID! - - """ - The rate providers that make up this rate group. - """ - rateProviders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DeliveryRateProviderConnection -} - -""" -An auto-generated type for paginating through multiple DeliveryRateGroups. -""" -type DeliveryRateGroupConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [DeliveryRateGroupEdge!]! - - """ - A list of nodes that are contained in DeliveryRateGroupEdge. 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: [DeliveryRateGroup!]! - - """ - 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 rate group on a method definition. A rate group can -contain either one participant, one rate definition (with or without a rate -range condition), or many rate definitions (so long as they all have a rate -range condition, and those rate range conditions all have the same subject and unit). -""" -input DeliveryRateGroupCreateInput @componentName(name: "delivery") { - """ - A list of at most one participant to create in the rate group. - """ - participantsToCreate: [DeliveryParticipantCreateInput!] - - """ - A list of rate definitions to create in the rate group. If more than one is - created, they must all have a single rate range condition with the same - subject and unit. - """ - rateDefinitionsToCreate: [DeliveryRateDefinitionCreateInput!] -} - -""" -An auto-generated type which holds one DeliveryRateGroup and a cursor during pagination. -""" -type DeliveryRateGroupEdge @componentName(name: "delivery") { - """ - 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 DeliveryRateGroupEdge. - """ - node: DeliveryRateGroup! -} - -""" -The input fields to update a rate group. A rate group can contain either one -participant, one rate definition (with or without a rate range condition), or -many rate definitions (so long as they all have a rate range condition, and -those rate range conditions all have the same subject and unit). -To migrate from a rate group with rate definition(s) to a rate group with a -participant (or vice versa), the original rate definitions (or participant) must -be deleted via `rateDefinitionsToDelete` (or `participantsToDelete`) in the same mutation. -""" -input DeliveryRateGroupUpdateInput @componentName(name: "delivery") { - """ - A globally-unique ID of the rate group to update. - """ - id: ID! @gidTypes(types: ["RateGroup"]) - - """ - A list of at most one participant to create in the rate group. - """ - participantsToCreate: [DeliveryParticipantCreateInput!] - - """ - A list of participants to delete from the rate group. - """ - participantsToDelete: [ID!] @gidTypes(types: ["Participant"]) - - """ - A list of at most one participant to update in the rate group. - """ - participantsToUpdate: [DeliveryParticipantUpdateInput!] - - """ - A list of rate definitions to create in the rate group. If this results in - more than one rate definition in the rate group, they must all have a single - rate range condition with the same subject and unit. - """ - rateDefinitionsToCreate: [DeliveryRateDefinitionCreateInput!] - - """ - A list of rate definitions to delete from the rate group. - """ - rateDefinitionsToDelete: [ID!] @gidTypes(types: ["RateDefinition"]) - - """ - A list of rate definitions to update in the rate group. If this results in - more than one rate definition in the rate group, they must all have a single - rate range condition with the same subject and unit. - """ - rateDefinitionsToUpdate: [DeliveryRateDefinitionUpdateInput!] -} - -""" -A rate provided by a merchant-defined rate or a participant. -""" -union DeliveryRateProvider @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") = DeliveryParticipant | DeliveryRateDefinition - -""" -An auto-generated type for paginating through multiple DeliveryRateProviders. -""" -type DeliveryRateProviderConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [DeliveryRateProviderEdge!]! - - """ - A list of nodes that are contained in DeliveryRateProviderEdge. 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: [DeliveryRateProvider!]! - - """ - 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 DeliveryRateProvider and a cursor during pagination. -""" -type DeliveryRateProviderEdge @componentName(name: "delivery") { - """ - 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 DeliveryRateProviderEdge. - """ - node: DeliveryRateProvider! -} - -""" -The rate range condition for a conditionable object. -""" -type DeliveryRateRangeCondition @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - The maximum value for the condition range. - """ - max: DeliveryRateRangeConditionCriteria - - """ - The minimum value for the condition range. - """ - min: DeliveryRateRangeConditionCriteria! - - """ - The subject of the rate range condition. - """ - subject: DeliveryRateRangeConditionSubject! -} - -""" -The value (weight or price) that the condition field is compared to. -""" -union DeliveryRateRangeConditionCriteria @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") = MoneyV2 | Weight - -""" -The input fields for creating a rate range condition. -""" -input DeliveryRateRangeConditionInput @componentName(name: "delivery") { - """ - The maximum value for the condition range. - """ - max: Float - - """ - The minimum value for the condition range. - """ - min: Float! - - """ - The subject of the rate range condition. - """ - subject: DeliveryRateRangeConditionSubject! - - """ - The unit associated with the min and max values that will be used in - comparison. If the subject is `TOTAL_CART_VALUE`, the unit must match the - currency code of the method definition this rate range condition is in. If the - subject is `WEIGHT`, the unit must be a valid weight unit. - """ - unit: String! -} - -""" -The subject of the rate range condition. -""" -enum DeliveryRateRangeConditionSubject @componentName(name: "delivery") { - """ - The condition will check against the package weight of the order. - """ - PACKAGE_WEIGHT - - """ - The condition will check against the total cart value of the order. - """ - TOTAL_CART_VALUE -} - -""" -Return type for `deliverySettingUpdate` mutation. -""" -type DeliverySettingUpdatePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `deliveryShippingOriginAssign` mutation. -""" -type DeliveryShippingOriginAssignPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "delivery") { - """ - 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 - - """ - A globally-unique ID of the condition. - """ - id: ID! @gidTypes(types: ["Condition"]) - - """ - The operator to use for comparison. - """ - operator: DeliveryConditionOperator -} - -""" -The input fields for a weight-based condition of a delivery method definition. -""" -input DeliveryWeightConditionInput @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @componentName(name: "checkouts") = DepositPercentage - -""" -The input fields configuring the deposit for a B2B buyer. -""" -input DepositInput @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The percentage value of the deposit. - """ - percentage: Float! -} - -""" -Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. -""" -enum DigitalWallet @componentName(name: "payment_processing") { - """ - Amazon Pay. - """ - AMAZON_PAY - - """ - Android Pay. - """ - ANDROID_PAY - - """ - Apple Pay. - """ - APPLE_PAY - - """ - Facebook Pay. - """ - FACEBOOK_PAY - - """ - Google Pay. - """ - GOOGLE_PAY - - """ - Shopify Pay. - """ - SHOPIFY_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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - The discount is applied at the line level. - Line level discounts are factored into the discountedUnitPriceSet on line items. - """ - LINE - - """ - The discount is applied at the order level. - Order level discounts are not factored into the discountedUnitPriceSet on line items. - """ - ORDER -} - -""" -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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountAutomaticApp | DiscountAutomaticBasic | DiscountAutomaticBxgy | DiscountAutomaticFreeShipping - -""" -Return type for `discountAutomaticActivate` mutation. -""" -type DiscountAutomaticActivatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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! - - """ - A list of searchable keywords that are associated with the discount. - For example, a merchant might apply the `loyalty` tag to discounts - that are associated with their loyalty program. - """ - tags: [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! -} - -""" -Return type for `discountAutomaticAppCreate` mutation. -""" -type DiscountAutomaticAppCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - Whether the discount applies on one-time purchases. - """ - appliesOnOneTimePurchase: Boolean = true - - """ - 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 - - """ - 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), - and the product discount tags that determine which product discounts can apply - together on the same cart line. - """ - combinesWith: DiscountCombinesWithInput - - """ - 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 - - """ - Determines which discount effects the discount can apply. - """ - 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 handle of the function providing the discount. - """ - functionHandle: String - - """ - The ID of the function providing the discount. - """ - functionId: String @deprecated(reason: "Use `functionHandle` instead.") - - """ - 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!] = [] - - """ - 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 - - """ - The date and time when the discount becomes active and is available to customers. - """ - startsAt: DateTime - - """ - A list of searchable keywords that are associated with the discount. - - Use these tags on product discounts to determine which other product discounts can - apply to the same cart line when you configure - `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. - - For example, you can apply a `loyalty` tag to discounts - that are associated with a loyalty program. - - Updating `tags` overwrites any existing tags that were previously added to the discount. - To add new tags without overwriting existing tags, use the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - mutation. - """ - tags: [String!] - - """ - The discount's name that displays to merchants in the Shopify admin and to customers. - """ - title: String -} - -""" -Return type for `discountAutomaticAppUpdate` mutation. -""" -type DiscountAutomaticAppUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 - - """ - 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! - - """ - 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! - - """ - A list of searchable keywords that are associated with the discount. - For example, a merchant might apply the `loyalty` tag to discounts - that are associated with their loyalty program. - """ - tags: [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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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), - and the product discount tags that determine which product discounts can apply - together on the same cart line. - """ - combinesWith: DiscountCombinesWithInput - - """ - 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 - - """ - Information about the qualifying items and their discount. - """ - customerGets: DiscountCustomerGetsInput - - """ - 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: DiscountMinimumRequirementInput - - """ - 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 - - """ - A list of searchable keywords that are associated with the discount. - - Use these tags on product discounts to determine which other product discounts can - apply to the same cart line when you configure - `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. - - For example, you can apply a `loyalty` tag to discounts - that are associated with a loyalty program. - - Updating `tags` overwrites any existing tags that were previously added to the discount. - To add new tags without overwriting existing tags, use the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - mutation. - """ - tags: [String!] - - """ - The discount's name that displays to merchants in the Shopify admin and to customers. - """ - title: String -} - -""" -Return type for `discountAutomaticBasicUpdate` mutation. -""" -type DiscountAutomaticBasicUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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! - - """ - A list of searchable keywords that are associated with the discount. - For example, a merchant might apply the `loyalty` tag to discounts - that are associated with their loyalty program. - """ - tags: [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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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), - and the product discount tags that determine which product discounts can apply - together on the same cart line. - """ - combinesWith: DiscountCombinesWithInput - - """ - 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 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 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 date and time when the discount becomes active and is available to customers. - """ - startsAt: DateTime - - """ - A list of searchable keywords that are associated with the discount. - - Use these tags on product discounts to determine which other product discounts can - apply to the same cart line when you configure - `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. - - For example, you can apply a `loyalty` tag to discounts - that are associated with a loyalty program. - - Updating `tags` overwrites any existing tags that were previously added to the discount. - To add new tags without overwriting existing tags, use the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - mutation. - """ - tags: [String!] - - """ - The discount's name that displays to merchants in the Shopify admin and to customers. - """ - title: String - - """ - The maximum number of times that the discount can be applied to an order. - """ - usesPerOrderLimit: UnsignedInt64 -} - -""" -Return type for `discountAutomaticBxgyUpdate` mutation. -""" -type DiscountAutomaticBxgyUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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! - - """ - A list of searchable keywords that are associated with the discount. - For example, a merchant might apply the `loyalty` tag to discounts - that are associated with their loyalty program. - """ - tags: [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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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 - [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 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 - - """ - A list of destinations where the discount will apply. - """ - destination: DiscountShippingDestinationSelectionInput - - """ - 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 maximum shipping price that qualifies for the discount. - """ - maximumShippingPrice: Decimal - - """ - The minimum subtotal or quantity of items that are required for the discount to be applied. - """ - minimumRequirement: DiscountMinimumRequirementInput - - """ - 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 - - """ - A list of searchable keywords that are associated with the discount. - - Use these tags on product discounts to determine which other product discounts can - apply to the same cart line when you configure - `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. - - For example, you can apply a `loyalty` tag to discounts - that are associated with a loyalty program. - - Updating `tags` overwrites any existing tags that were previously added to the discount. - To add new tags without overwriting existing tags, use the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - mutation. - """ - tags: [String!] - - """ - The discount's name that displays to merchants in the Shopify admin and to customers. - """ - title: String -} - -""" -Return type for `discountAutomaticFreeShippingUpdate` mutation. -""" -type DiscountAutomaticFreeShippingUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! -} - -""" -An auto-generated type for paginating through multiple DiscountAutomaticNodes. -""" -type DiscountAutomaticNodeConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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! -} - -""" -Return type for `discountBulkTagsAdd` mutation. -""" -type DiscountBulkTagsAddPayload @componentName(name: "platform") { - """ - The asynchronous job that adds the tags. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [DiscountUserError!]! -} - -""" -Return type for `discountBulkTagsRemove` mutation. -""" -type DiscountBulkTagsRemovePayload @componentName(name: "platform") { - """ - The asynchronous job that removes the tags. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [DiscountUserError!]! -} - -""" -All buyers are eligible for the discount. -""" -enum DiscountBuyerSelection @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - 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 - [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) - class. - """ - PRODUCT - - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping - -""" -Return type for `discountCodeActivate` mutation. -""" -type DiscountCodeActivatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | times_used | integer | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): 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! - - """ - A list of searchable keywords that are associated with the discount. - For example, a merchant might apply the `loyalty` tag to discounts - that are associated with their loyalty program. - """ - tags: [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 `discountCodeAppCreate` mutation. -""" -type DiscountCodeAppCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - Whether the discount applies on regular one-time-purchase items. - """ - appliesOnOneTimePurchase: Boolean = true - - """ - Whether the discount applies to subscriptions items. - """ - appliesOnSubscription: Boolean = true - - """ - Whether a customer can only use the discount once. - """ - appliesOncePerCustomer: Boolean - - """ - The code that customers use to apply the discount. - """ - code: String - - """ - 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), - and the product discount tags that determine which product discounts can apply - together on the same cart line. - """ - combinesWith: DiscountCombinesWithInput - - """ - 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 customers that can use the discount. - """ - customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") - - """ - Determines which discount effects the discount can apply. - """ - 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 handle of the function providing the discount. - """ - functionHandle: String - - """ - The ID of the function providing the discount. - """ - functionId: String @deprecated(reason: "Use `functionHandle` instead.") - - """ - 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!] = [] - - """ - 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 - - """ - The date and time when the discount becomes active and is available to customers. - """ - startsAt: DateTime - - """ - A list of searchable keywords that are associated with the discount. - - Use these tags on product discounts to determine which other product discounts can - apply to the same cart line when you configure - `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. - - For example, you can apply a `loyalty` tag to discounts - that are associated with a loyalty program. - - Updating `tags` overwrites any existing tags that were previously added to the discount. - To add new tags without overwriting existing tags, use the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - mutation. - """ - tags: [String!] - - """ - The discount's name that displays to merchants in the Shopify admin and to customers. - """ - title: String - - """ - The maximum number of times the discount can be redeemed. - For unlimited usage, specify `null`. - """ - usageLimit: Int -} - -""" -Return type for `discountCodeAppUpdate` mutation. -""" -type DiscountCodeAppUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | times_used | integer | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): 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! - - """ - A list of searchable keywords that are associated with the discount. - For example, a merchant might apply the `loyalty` tag to discounts - that are associated with their loyalty program. - """ - tags: [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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - Whether a customer can only use the discount once. - """ - appliesOncePerCustomer: Boolean - - """ - The code that customers use to apply the discount. - """ - code: String - - """ - 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), - and the product discount tags that determine which product discounts can apply - together on the same cart line. - """ - combinesWith: DiscountCombinesWithInput - - """ - 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 in the order that qualify for the discount, their quantities, and the total value of the discount. - """ - customerGets: DiscountCustomerGetsInput - - """ - The customers that can use the discount. - """ - customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") - - """ - 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: DiscountMinimumRequirementInput - - """ - 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 - - """ - A list of searchable keywords that are associated with the discount. - - Use these tags on product discounts to determine which other product discounts can - apply to the same cart line when you configure - `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. - - For example, you can apply a `loyalty` tag to discounts - that are associated with a loyalty program. - - Updating `tags` overwrites any existing tags that were previously added to the discount. - To add new tags without overwriting existing tags, use the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - mutation. - """ - tags: [String!] - - """ - The discount's name that displays to merchants in the Shopify admin and to customers. - """ - title: String - - """ - The maximum number of times the discount can be redeemed. - For unlimited usage, specify `null`. - """ - usageLimit: Int -} - -""" -Return type for `discountCodeBasicUpdate` mutation. -""" -type DiscountCodeBasicUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | times_used | integer | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): 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!]! - - """ - An abbreviated version of the discount - [`summary`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeBxgy#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! - - """ - A list of searchable keywords that are associated with the discount. - For example, a merchant might apply the `loyalty` tag to discounts - that are associated with their loyalty program. - """ - tags: [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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - Whether a customer can only use the discount once. - """ - appliesOncePerCustomer: Boolean - - """ - The code that customers use to apply the discount. - """ - code: String - - """ - 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), - and the product discount tags that determine which product discounts can apply - together on the same cart line. - """ - combinesWith: DiscountCombinesWithInput - - """ - 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 customers that can use the discount. - """ - customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") - - """ - 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 date and time when the discount becomes active and is available to customers. - """ - startsAt: DateTime - - """ - A list of searchable keywords that are associated with the discount. - - Use these tags on product discounts to determine which other product discounts can - apply to the same cart line when you configure - `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. - - For example, you can apply a `loyalty` tag to discounts - that are associated with a loyalty program. - - Updating `tags` overwrites any existing tags that were previously added to the discount. - To add new tags without overwriting existing tags, use the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - mutation. - """ - tags: [String!] - - """ - The discount's name that displays to merchants in the Shopify admin and to customers. - """ - title: String - - """ - 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 `discountCodeBxgyUpdate` mutation. -""" -type DiscountCodeBxgyUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | times_used | integer | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): 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! - - """ - A list of searchable keywords that are associated with the discount. - For example, a merchant might apply the `loyalty` tag to discounts - that are associated with their loyalty program. - """ - tags: [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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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 code that customers use to apply the discount. - """ - code: String - - """ - 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 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 customers that can use the discount. - """ - customerSelection: DiscountCustomerSelectionInput @deprecated(reason: "Use `context` instead.") - - """ - 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 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 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 minimum subtotal or quantity of items that are required for the discount to be applied. - """ - minimumRequirement: DiscountMinimumRequirementInput - - """ - 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 - - """ - The date and time when the discount becomes active and is available to customers. - """ - startsAt: DateTime - - """ - A list of searchable keywords that are associated with the discount. - - Use these tags on product discounts to determine which other product discounts can - apply to the same cart line when you configure - `productDiscountsWithTagsOnSameCartLine` in `combinesWith`. - - For example, you can apply a `loyalty` tag to discounts - that are associated with a loyalty program. - - Updating `tags` overwrites any existing tags that were previously added to the discount. - To add new tags without overwriting existing tags, use the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - mutation. - """ - tags: [String!] - - """ - The discount's name that displays to merchants in the Shopify admin and to customers. - """ - title: String - - """ - The maximum number of times the discount can be redeemed. - For unlimited usage, specify `null`. - """ - usageLimit: Int -} - -""" -Return type for `discountCodeFreeShippingUpdate` mutation. -""" -type DiscountCodeFreeShippingUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - The underlying code discount object. - """ - codeDiscount: DiscountCode! - - """ - The paginated list of events associated with the host subject. - """ - events( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! -} - -""" -An auto-generated type for paginating through multiple DiscountCodeNodes. -""" -type DiscountCodeNodeConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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! -} - -""" -The input fields for publishing a discount code. -""" -input DiscountCodePublishInput @componentName(name: "pricing") @privatelyDocumented { - """ - The discount code string. - """ - code: String! - - """ - The reason or context of publishing the discount code. - """ - reason: String! -} - -""" -Return type for `discountCodePublish` mutation. -""" -type DiscountCodePublishPayload @componentName(name: "platform") @privatelyDocumented { - """ - The code discount node associated with the published discount code. - """ - codeDiscountNode: DiscountCodeNode - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [DiscountCodePublishUserError!]! -} - -""" -An error that occurs during the execution of `DiscountCodePublish`. -""" -type DiscountCodePublishUserError implements DisplayableError @componentName(name: "platform") @privatelyDocumented { - """ - The error code. - """ - code: DiscountCodePublishUserErrorCode - - """ - 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 `DiscountCodePublishUserError`. -""" -enum DiscountCodePublishUserErrorCode @componentName(name: "platform") @privatelyDocumented { - """ - Discount code not found. - """ - DISCOUNT_CODE_NOT_FOUND - - """ - Invalid channel. - """ - INVALID_CHANNEL - - """ - Invalid discount. - """ - INVALID_DISCOUNT -} - -""" -Return type for `discountCodeRedeemCodeBulkDelete` mutation. -""" -type DiscountCodeRedeemCodeBulkDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CollectionConnection! -} - -""" -The input fields for collections attached to a discount. -""" -input DiscountCollectionsInput @componentName(name: "pricing") { - """ - Specifies list of collection ids to add. - """ - add: [ID!] @gidTypes(types: ["Collection"]) - - """ - Specifies list of collection ids to remove. - """ - remove: [ID!] @gidTypes(types: ["Collection"]) -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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! - - """ - Controls which product discounts can apply together on the same cart line. By - default, only one product discount applies per line. Available only on a Shopify - Plus plan and requires the `productDiscounts` field to be set to `true`. - - For discounts to apply together, they must match tags in both directions. Each - discount has two tag sets: the tags that identify the discount, and the tags that - it agrees to apply with. Use the `tags` field on the discount input to set the - discount's own tags. This field returns the tags that this discount agrees to - apply with. Two discounts apply together only if each one allows at least one tag - that the other is tagged with. Any number of product discounts can apply to the - same line if this two-way match holds for every pair in the group. - - Example: Discount A is tagged with `LOYALTY` and allows `SEASONAL`, and Discount B - is tagged with `SEASONAL` and allows `LOYALTY`. They apply together. To add a - third discount, it must meet the same mutual-match rule with both A and B. - """ - productDiscountsWithTagsOnSameCartLine: [String!] - - """ - 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 @componentName(name: "pricing") { - """ - 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 - [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) - class. - """ - productDiscounts: Boolean = false - - """ - Controls which product discounts can apply together on the same cart line. By - default, only one product discount applies per line. Available only on a Shopify - Plus plan and requires the `productDiscounts` field to be set to `true`. - - For discounts to apply together, they must match tags in both directions. Each - discount has two tag sets: the tags that identify the discount, and the tags that - it agrees to apply with. Use the `tags` field on the discount input to set the - discount's own tags. Use this field to set the tags that the discount can apply - with. Two discounts apply together only if each one allows at least one tag that - the other is tagged with. Any number of product discounts can apply to the same - line if this two-way match holds for every pair in the group. - - Example: Discount A is tagged with `LOYALTY` and allows `SEASONAL`, and Discount B - is tagged with `SEASONAL` and allows `LOYALTY`. They apply together. To add a - third discount, it must meet the same mutual-match rule with both A and B. - """ - productDiscountsWithTagsOnSameCartLine: ProductDiscountsWithTagsOnSameCartLineInput - - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountBuyerSelectionAll | DiscountCustomerSegments | DiscountCustomers | DiscountMarkets - -""" -The input fields for the buyers who can use this discount. -""" -input DiscountContextInput @oneOf @componentName(name: "pricing") { - """ - All buyers are eligible for this discount. - """ - all: DiscountBuyerSelection - - """ - The list of customer segment IDs to add or remove from the list of customer segments. - """ - customerSegments: DiscountCustomerSegmentsInput - - """ - The list of customer IDs to add or remove from the list of customers. - """ - customers: DiscountCustomersInput - - """ - The list of market IDs to add or remove from the list of markets. - """ - markets: DiscountMarketsInput -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - The country codes to add to the list of countries where the discount applies. - """ - add: [CountryCode!] - - """ - Whether the discount code is applicable to countries that haven't been defined in the shop's shipping zones. - """ - includeRestOfWorld: Boolean = false - - """ - The country codes to remove from the list of countries where the discount applies. - """ - remove: [CountryCode!] -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - 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 IDs of items that the customer buys. The items can be either collections or products. - """ - items: DiscountItemsInput - - """ - The quantity of prerequisite items. - """ - value: DiscountCustomerBuysValueInput -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountPurchaseAmount | DiscountQuantity - -""" -The input fields for prerequisite quantity or minimum purchase amount required for the discount. -""" -input DiscountCustomerBuysValueInput @componentName(name: "pricing") { - """ - The prerequisite minimum purchase amount required for the discount to be applicable. - """ - amount: Decimal - - """ - The quantity of prerequisite items. - """ - quantity: UnsignedInt64 -} - -""" -The items in the order that qualify for the discount, their quantities, and the total value of the discount. -""" -type DiscountCustomerGets @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - 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 IDs of the items that the customer gets. The items can be either collections or products. - """ - items: DiscountItemsInput - - """ - The quantity of items discounted and the discount value. - """ - value: DiscountCustomerGetsValueInput -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountAmount | DiscountOnQuantity | DiscountPercentage - -""" -The input fields for the quantity of items discounted and the discount value. -""" -input DiscountCustomerGetsValueInput @componentName(name: "pricing") { - """ - The value of the discount. - - Note: BXGY doesn't support discountAmount. - """ - discountAmount: DiscountAmountInput - - """ - 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 -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - A list of customer segments to add to the current list of customer segments. - """ - add: [ID!] @gidTypes(types: ["Segment"]) - - """ - A list of customer segments to remove from the current list of customer segments. - """ - remove: [ID!] @gidTypes(types: ["Segment"]) -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountCustomerAll | DiscountCustomerSegments | DiscountCustomerSelectionUnknown | DiscountCustomers - -""" -The input fields for the customers who can use this discount. -""" -input DiscountCustomerSelectionInput @componentName(name: "pricing") { - """ - Whether all customers can use this discount. - """ - all: Boolean - - """ - The list of customer segment IDs to add or remove from the list of customer segments. - """ - customerSegments: DiscountCustomerSegmentsInput - - """ - The list of customer IDs to add or remove from the list of customers. - """ - customers: DiscountCustomersInput -} - -""" -An unrecognized customer selection type. Use the `context` field on the parent discount type instead. -""" -type DiscountCustomerSelectionUnknown @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - The underlying customer selection type. - """ - customerSelectionType: String! -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - A list of customers to add to the current list of customers who can use the discount. - """ - add: [ID!] @gidTypes(types: ["Customer"]) - - """ - A list of customers to remove from the current list of customers who can use the discount. - """ - remove: [ID!] @gidTypes(types: ["Customer"]) -} - -""" -The type of discount that will be applied. Currently, only a percentage discount is supported. -""" -union DiscountEffect @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountAmount | DiscountPercentage - -""" -The input fields for how the discount will be applied. Currently, only percentage off is supported. -""" -input DiscountEffectInput @componentName(name: "pricing") { - """ - The value of the discount. - """ - amount: Decimal - - """ - The percentage value of the discount. Value must be between 0.00 - 1.00. - """ - percentage: Float -} - -""" -Possible error codes that can be returned by `DiscountUserError`. -""" -enum DiscountErrorCode @componentName(name: "platform") { - """ - The active period overlaps with other automatic discounts. At any given time, only 25 automatic discounts can be active. - """ - ACTIVE_PERIOD_OVERLAP - - """ - A discount cannot have both appliesOnOneTimePurchase and appliesOnSubscription set to false. - """ - APPLIES_ON_NOTHING - - """ - The input value is blank. - """ - BLANK - - """ - The attribute selection contains conflicting settings. - """ - CONFLICT - - """ - The input value is already present. - """ - DUPLICATE - - """ - The end date should be after the start date. - """ - END_DATE_BEFORE_START_DATE - - """ - The input value should be equal to the value allowed. - """ - EQUAL_TO - - """ - The value exceeded the maximum allowed value. - """ - EXCEEDED_MAX - - """ - 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 value is already present through another selection. - """ - IMPLICIT_DUPLICATE - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - 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 `productDiscounts` field can't be set to false when - `productDiscountsWithTagsOnSameCartLine` tags exist on the discount. - """ - INVALID_PRODUCT_DISCOUNTS_FALSE_WITH_EXISTING_TAGS_ON_SAME_CART_LINE - - """ - The `productDiscountsWithTagsOnSameCartLine` field is only valid for discounts with the PRODUCT discount class. - """ - INVALID_PRODUCT_DISCOUNTS_WITH_TAGS_ON_SAME_CART_LINE_FOR_DISCOUNT_CLASS - - """ - The `productDiscountsWithTagsOnSameCartLine` field can only be specified when `productDiscounts` is true. - """ - INVALID_PRODUCT_DISCOUNTS_WITH_TAGS_ON_SAME_CART_LINE_WITHOUT_PRODUCT_DISCOUNTS - - """ - The tag title exceeds the maximum length of 255 characters. - """ - INVALID_TAG_LENGTH - - """ - 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 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 - - """ - Specify a minimum subtotal or a quantity, but not both. - """ - MINIMUM_SUBTOTAL_AND_QUANTITY_RANGE_BOTH_PRESENT - - """ - Missing a required argument. - """ - MISSING_ARGUMENT - - """ - 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 - - """ - Recurring cycle limit must be 1 when discount does not apply to subscription items. - """ - MULTIPLE_RECURRING_CYCLE_LIMIT_FOR_NON_SUBSCRIPTION_ITEMS - - """ - The input value needs to be blank. - """ - PRESENT - - """ - The shop's plan does not allow setting `productDiscountsWithTagsOnSameCartLine`. - """ - PRODUCT_DISCOUNTS_WITH_TAGS_ON_SAME_CART_LINE_NOT_ENTITLED - - """ - Recurring cycle limit must be a valid integer greater than or equal to 0. - """ - RECURRING_CYCLE_LIMIT_NOT_A_VALID_INTEGER - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - Too many arguments provided. - """ - TOO_MANY_ARGUMENTS - - """ - The number of tags in `productDiscountsWithTagsOnSameCartLine` exceeds the maximum of 10. - """ - TOO_MANY_PRODUCT_DISCOUNTS_WITH_TAGS_ON_SAME_CART_LINE - - """ - The number of tags exceeds the maximum of 5. - """ - TOO_MANY_TAGS - - """ - The input value is too short. - """ - TOO_SHORT - - """ - The value is outside of the allowed range. - """ - VALUE_OUTSIDE_RANGE -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = 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 @componentName(name: "pricing") { - """ - Whether all items should be selected for the discount. Not supported for Buy X get Y discounts. - """ - all: Boolean - - """ - The collections that are attached to a discount. - """ - collections: DiscountCollectionsInput - - """ - 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 -} - -""" -Markets where the discount is available. -""" -type DiscountMarkets @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - The list of markets where the discount is available. - """ - markets( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MarketConnection! @requiredAccess(scope: "`read_markets` access scope is required.") - - """ - The number of markets where the discount is available. - """ - marketsCount: Int! -} - -""" -The input fields for the markets where the discount is available. -""" -input DiscountMarketsInput @componentName(name: "pricing") { - """ - The list of market IDs to add. - """ - add: [ID!] @gidTypes(types: ["Market"]) - - """ - The list of market IDs to remove. - """ - remove: [ID!] @gidTypes(types: ["Market"]) -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountMinimumQuantity | DiscountMinimumSubtotal - -""" -The input fields for the minimum quantity or subtotal required for a discount. -""" -input DiscountMinimumRequirementInput @componentName(name: "pricing") { - """ - The minimum required quantity. - """ - quantity: DiscountMinimumQuantityInput - - """ - The minimum required subtotal. - """ - subtotal: DiscountMinimumSubtotalInput -} - -""" -The minimum subtotal required for the discount to apply. -""" -type DiscountMinimumSubtotal @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! -} - -""" -An auto-generated type for paginating through multiple DiscountNodes. -""" -type DiscountNodeConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - The percentage value of the discount. - """ - effect: DiscountEffectInput - - """ - The quantity of items that are discounted. - """ - quantity: UnsignedInt64 -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "pricing") { - """ - The IDs of the product variants to add as prerequisites or as eligible items for a discount. - """ - productVariantsToAdd: [ID!] @gidTypes(types: ["ProductVariant"]) - - """ - The IDs of the product variants to remove as prerequisites or as eligible items for a discount. - """ - productVariantsToRemove: [ID!] @gidTypes(types: ["ProductVariant"]) - - """ - The IDs of the products to add as prerequisites or as eligible items for a discount. - """ - productsToAdd: [ID!] @gidTypes(types: ["Product"]) - - """ - The IDs of the products to remove as prerequisites or as eligible items for a discount. - """ - productsToRemove: [ID!] @gidTypes(types: ["Product"]) -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - The code that a customer can use at checkout to receive the associated discount. - """ - code: String! -} - -""" -Reports the status of discount for a Sales Channel or Storefront API. -This might include why a discount is not available in a Sales Channel -and how a merchant might fix this. -""" -type DiscountResourceFeedback @requiredAccess(scope: "`read_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") @componentName(name: "apps") { - """ - The ID of the discount associated with the feedback. - """ - discountId: ID! - - """ - The timestamp of the discount associated with the feedback. - """ - discountUpdatedAt: DateTime! - - """ - 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!]! - - """ - Conveys the state of the feedback and whether it requires merchant action or not. - """ - state: ResourceFeedbackState! -} - -""" -The input fields used to create a discount resource feedback. -""" -input DiscountResourceFeedbackInput @componentName(name: "apps") { - """ - The ID of the channel that the feedback is for. Used to scope feedback to a - specific sales channel when the app has multiple channels. - """ - channelId: ID @gidTypes(types: ["Channel"]) - - """ - The ID of the discount that the feedback was created on. - """ - discountId: ID! @gidTypes(types: ["DiscountNode"]) - - """ - The timestamp of the discount associated with the feedback. - """ - discountUpdatedAt: DateTime! - - """ - 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! - - """ - 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 discounts. - You can specify up to four messages. Each message is limited to 100 characters. - """ - messages: [String!] - - """ - Whether the merchant needs to take action on the discount. - """ - state: ResourceFeedbackState! -} - -""" -A shareable URL for a discount code. -""" -type DiscountShareableUrl @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - The URL lands on a collection page. - """ - COLLECTION - - """ - The URL lands on a home page. - """ - HOME - - """ - The URL lands on a product page. - """ - PRODUCT -} - -""" -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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") @componentName(name: "pricing") = DiscountCountries | DiscountCountryAll - -""" -The input fields for the destinations where the free shipping discount will be applied. -""" -input DiscountShippingDestinationSelectionInput @componentName(name: "pricing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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 set of valid sort keys for the DiscountTag query. -""" -enum DiscountTagSortKeys @componentName(name: "platform") { - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `title` value. - """ - TITLE -} - -""" -The type of line (line item or shipping line) on an order that the subscription discount is applicable towards. -""" -enum DiscountTargetType @componentName(name: "sales") { - """ - The discount applies onto line items. - """ - LINE_ITEM - - """ - The discount applies onto shipping lines. - """ - SHIPPING_LINE -} - -""" -The type of the subscription discount. -""" -enum DiscountType @componentName(name: "sales") { - """ - Automatic discount type. - """ - AUTOMATIC_DISCOUNT - - """ - Code discount type. - """ - CODE_DISCOUNT - - """ - Manual discount type. - """ - MANUAL -} - -""" -An error that occurs during the execution of a discount mutation. -""" -type DiscountUserError implements DisplayableError @componentName(name: "pricing") { - """ - 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! -} - -""" -Return type for `discountsAllocatorFunctionRegister` mutation. -""" -type DiscountsAllocatorFunctionRegisterPayload @componentName(name: "platform") { - """ - Boolean representing whether the discounts allocator function was registered. - """ - success: Boolean - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [DiscountsAllocatorFunctionUserError!]! -} - -""" -Return type for `discountsAllocatorFunctionUnregister` mutation. -""" -type DiscountsAllocatorFunctionUnregisterPayload @componentName(name: "platform") { - """ - Boolean representing whether the discounts allocator function was unregistered. - """ - success: Boolean - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [DiscountsAllocatorFunctionUserError!]! -} - -""" -An error that occurs during the execution of a discounts allocator function mutation. -""" -type DiscountsAllocatorFunctionUserError implements DisplayableError @componentName(name: "pricing") { - """ - The error code. - """ - code: DiscountsAllocatorFunctionUserErrorCode - - """ - 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 `DiscountsAllocatorFunctionUserError`. -""" -enum DiscountsAllocatorFunctionUserErrorCode @componentName(name: "platform") { - """ - The discounts allocator function cannot be found. - """ - FUNCTION_NOT_FOUND - - """ - The shop is not eligible for discounts allocator functions. - """ - INELIGIBLE_SHOP - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The function provided was not a discounts allocator function. - """ - INVALID_FUNCTION_TYPE -} - -""" -Represents an error in the input of a mutation. -""" -interface DisplayableError @componentName(name: "platform") { - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -Return type for `disputeEvidenceUpdate` mutation. -""" -type DisputeEvidenceUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - The input value is invalid. - """ - INVALID - - """ - Individual file size is too large. - """ - TOO_LARGE -} - -""" -The possible statuses of a dispute. -""" -enum DisputeStatus @componentName(name: "shopify_payments") { - ACCEPTED - - """ - Status previously used by Stripe to indicate that a dispute led to a refund. - """ - CHARGE_REFUNDED @deprecated(reason: "CHARGE_REFUNDED is no longer supported.") - LOST - NEEDS_RESPONSE - - """ - A dispute that was prevented from becoming a formal chargeback. - """ - PREVENTED - UNDER_REVIEW - WON -} - -""" -The possible types for a dispute. -""" -enum DisputeType @componentName(name: "shopify_payments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "domains") { - """ - 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! -} - -""" -An auto-generated type for paginating through multiple Domains. -""" -type DomainConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [DomainEdge!]! - - """ - A list of nodes that are contained in DomainEdge. 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: [Domain!]! - - """ - 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 Domain and a cursor during pagination. -""" -type DomainEdge @componentName(name: "domains") { - """ - 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 DomainEdge. - """ - node: Domain! -} - -""" -The country and language settings assigned to a domain. -""" -type DomainLocalization @componentName(name: "domains") { - """ - 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! -} - -""" -Return type for `domainVerificationTagInject` mutation. -""" -type DomainVerificationTagInjectPayload @componentName(name: "platform") { - """ - The operation performed on Meta tag. - """ - operation: String - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [DomainVerificationTagInjectUserError!]! -} - -""" -An error that occurs during the execution of `DomainVerificationTagInject`. -""" -type DomainVerificationTagInjectUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: DomainVerificationTagInjectUserErrorCode - - """ - 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 `DomainVerificationTagInjectUserError`. -""" -enum DomainVerificationTagInjectUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The verification code is invalid. - """ - INVALID_VERIFICATION_CODE -} - -""" -Return type for `domainVerificationTagRemove` mutation. -""" -type DomainVerificationTagRemovePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [DomainVerificationTagRemoveUserError!]! -} - -""" -An error that occurs during the execution of `DomainVerificationTagRemove`. -""" -type DomainVerificationTagRemoveUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: DomainVerificationTagRemoveUserErrorCode - - """ - 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 `DomainVerificationTagRemoveUserError`. -""" -enum DomainVerificationTagRemoveUserErrorCode @componentName(name: "platform") { - """ - Domain Verification Code doesn't exist. - """ - CODE_NOT_FOUND - - """ - The input value is invalid. - """ - INVALID -} - -""" -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 @requiredAccess(scope: "`read_draft_orders` access scope or `read_quick_sale` access scope.") @componentName(name: "draft_orders") @protectedObject(subject: "customer") { - """ - 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! - - """ - The amount due later. - When there are payment terms, this is the total price minus the deposit amount (if any). - When there are no payment terms, this is 0. - """ - amountDueLaterSet: MoneyBag! - - """ - The amount due now. - When there are payment terms this is the value of the deposit (0 by default). - When there are no payment terms, this is the total price. - """ - amountDueNowSet: MoneyBag! - - """ - 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! - - """ - Whether to bypass cart validations on this draft order. - """ - bypassCartValidations: 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! - - """ - The portion required to be paid at checkout. - """ - deposit: DepositConfiguration - - """ - All discount codes applied. - """ - discountCodes: [String!]! - - """ - The email address of the customer, which is used to send notifications. - """ - email: String @protectedField(subject: "customer", content: "email") - - """ - The list of events associated with the draft order. - """ - events( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The country codes of the extensions. - """ - countryCodes: [CountryCode!] - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The purpose of the extensions. - """ - purposes: [LocalizationExtensionPurpose!] - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The country codes of the extensions. - """ - countryCodes: [CountryCode!] - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The purpose of the extensions. - """ - purposes: [LocalizedFieldPurpose!] - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 @protectedField(subject: "customer", content: "phone") - - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - 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 @componentName(name: "draft_orders") { - """ - 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 @componentName(name: "draft_orders") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - 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 @componentName(name: "draft_orders") { - """ - 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 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!] - - """ - 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 selected country code that determines the pricing of the draft order. - """ - marketRegionCountryCode: CountryCode - - """ - The purchasing entity for the draft order. - """ - purchasingEntity: PurchasingEntityInput - - """ - The mailing address to where the order will be shipped. - """ - shippingAddress: MailingAddressInput -} - -""" -Return type for `draftOrderBulkAddTags` mutation. -""" -type DraftOrderBulkAddTagsPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The created draft order. - """ - draftOrder: DraftOrder - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `draftOrderCreateMerchantCheckout` mutation. -""" -type DraftOrderCreateMerchantCheckoutPayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `draftOrderCreate` mutation. -""" -type DraftOrderCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "draft_orders") { - """ - The ID of the draft order to delete. - """ - id: ID! @gidTypes(types: ["DraftOrder"]) -} - -""" -Return type for `draftOrderDelete` mutation. -""" -type DraftOrderDeletePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - 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 -} - -""" -Return type for `draftOrderDuplicate` mutation. -""" -type DraftOrderDuplicatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "draft_orders") { - """ - 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! -} - -""" -A generic warning for draft order operations when the specific warning type is unavailable. -""" -type DraftOrderGenericWarning implements DraftOrderWarning @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - The error code. - """ - errorCode: String! - - """ - The input field that the warning applies to. - """ - field: String! - - """ - The warning message. - """ - message: String! -} - -""" -The input fields used to create or update a draft order. -""" -input DraftOrderInput @componentName(name: "draft_orders") { - """ - 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 discount codes are allowed during checkout of this draft order. - """ - allowDiscountCodesInCheckout: Boolean - - """ - 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 mailing address associated with the payment method. - """ - billingAddress: MailingAddressInput - - """ - The extra information added to the draft order on behalf of the customer. - """ - customAttributes: [AttributeInput!] - - """ - 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.") @gidTypes(types: ["Customer"]) - - """ - The input fields configuring the deposit requirement. - """ - deposit: DepositInput - - """ - 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!] - - """ - 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 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 selected country code that determines the pricing of the draft order. - """ - marketRegionCountryCode: CountryCode @deprecated(reason: "This field is now incompatible with Markets.\n") - - """ - The list of metafields attached to the draft order. An existing metafield can not be used when creating a draft order. - """ - metafields: [MetafieldInput!] - - """ - The text of an optional note that a shop owner can attach to the draft order. - """ - note: String - - """ - The fields used to create payment terms. - """ - paymentTerms: PaymentTermsInput - - """ - The customer's phone number. - """ - phone: String - - """ - The purchase order number. - """ - poNumber: String - - """ - The payment currency of the customer for this draft order. - """ - presentmentCurrencyCode: CurrencyCode - - """ - The purchasing entity for the draft order. - """ - purchasingEntity: PurchasingEntityInput - - """ - The time after which inventory reservation will expire. - """ - reserveInventoryUntil: DateTime - - """ - The unique token identifying the draft order. - """ - sessionToken: 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 - - """ - The source of the checkout. - To use this field for sales attribution, you must register the channels that your app is managing. - You can register the channels that your app is managing by completing - [this Google Form](https://docs.google.com/forms/d/e/1FAIpQLScmVTZRQNjOJ7RD738mL1lGeFjqKVe_FM2tO9xsm21QEo5Ozg/viewform?usp=sf_link). - After you've submitted your request, you need to wait for your request to be processed by Shopify. - You can find a list of your channels in the Partner Dashboard, in your app's Marketplace extension. - You need to specify the handle as the `source_name` value in your request. - The handle is the channel that the order was placed from. - """ - sourceName: String - - """ - 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 - - """ - Fingerprint to guarantee bundles are handled correctly. - """ - transformerFingerprint: String - - """ - How to handle line items that don't correspond to merchandise in the shop. Defaults to "ERROR". - """ - unavailableMerchandiseStrategy: DraftOrderInputDraftOrderUnavailableMerchandiseStrategy = ERROR - - """ - 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 -} - -""" -Whether to treat unavailable merchandise as an error or a warning when creating, updating, or calculating a -draft order. -""" -enum DraftOrderInputDraftOrderUnavailableMerchandiseStrategy @componentName(name: "draft_orders") { - """ - Merchandise that cannot be added to the draft order should cause an error, and the draft will not be - calculated, created, or updated. - """ - ERROR - - """ - Merchandise that cannot be added to the draft order should add a warning to the draft, and the draft order - may still be calculated, created, or updated. - - If this results in an invalid draft with no line items, an error will still be generated, and the draft will - not be calculated, created, or updated. - """ - WARN -} - -""" -Return type for `draftOrderInvoicePreview` mutation. -""" -type DraftOrderInvoicePreviewPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope or `read_quick_sale` access scope.") @componentName(name: "draft_orders") @protectedObject(subject: "customer") { - """ - 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( - """ - Crops the image according to the specified region. - """ - crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") - - """ - Image height in pixels between 1 and 2048. - """ - maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") - - """ - Image width in pixels between 1 and 2048. - """ - maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 source of the line item's merchandise information. - """ - merchandiseSource: DraftOrderLineItemMerchandiseSourceType! - - """ - 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 ID of the variant associated with the line item. Will still be returned even if the variant has been - deleted since the draft was created or last updated. - """ - variantId: ID - - """ - 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 @componentName(name: "draft_orders") { - """ - 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 - - """ - The ID of the product variant corresponding to the component. - """ - variantId: ID @gidTypes(types: ["ProductVariant"]) -} - -""" -An auto-generated type for paginating through multiple DraftOrderLineItems. -""" -type DraftOrderLineItemConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "draft_orders") { - """ - 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 @componentName(name: "draft_orders") { - """ - The custom discount to be applied. - """ - appliedDiscount: DraftOrderAppliedDiscountInput - - """ - 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!] - - """ - A generic custom attribute using a key value pair. - """ - customAttributes: [AttributeInput!] - - """ - 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 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 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 - - """ - 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 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 ID of the product variant corresponding to the line item. - Must be null for custom line items, otherwise required. - """ - variantId: ID @gidTypes(types: ["ProductVariant"]) - - """ - The weight unit and value inputs for custom line items only. - This field is ignored when `variantId` is provided. - """ - weight: WeightInput -} - -""" -The possible sources for a line item's merchandise. -""" -enum DraftOrderLineItemMerchandiseSourceType @componentName(name: "draft_orders") { - """ - Indicates the line item represents custom merchandise. - """ - CUSTOM - - """ - Indicates the line item represents a ProductVariant that has been deleted since the draft order was created - or last updated. The line item must be updated to use a new variant or defined as custom before the draft - order can be completed. - """ - DELETED_PRODUCT_VARIANT - - """ - Indicates the line item represents a ProductVariant. - """ - PRODUCT_VARIANT -} - -""" -A warning indicating that the market region country code is not supported with Markets. -""" -type DraftOrderMarketRegionCountryCodeNotSupportedWarning implements DraftOrderWarning @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") = CalculatedDraftOrderLineItem | DraftOrderLineItem | ShippingLine - -""" -Return type for `draftOrderPrepareForBuyerCheckout` mutation. -""" -type DraftOrderPrepareForBuyerCheckoutPayload @componentName(name: "platform") { - """ - The prepared draft order. - """ - draftOrder: DraftOrder - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -A warning indicating that a price override was removed from a draft order line item. -""" -type DraftOrderPriceOverrideRemovedWarning implements DraftOrderWarning @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - The error code. - """ - errorCode: String! - - """ - The input field that the warning applies to. - """ - field: String! - - """ - The warning message. - """ - message: String! -} - -""" -A shipping rate is an additional cost added to the cost of the products that were ordered. -""" -type DraftOrderShippingRate @requiredAccess(scope: "Any of `draft_orders`, `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "draft_orders") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "draft_orders") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - Handle of draft order tag. - """ - handle: String! - - """ - ID of draft order tag. - """ - id: ID! - - """ - Title of draft order tag. - """ - title: String! -} - -""" -A warning indicating that a requested product variant could not be added to the draft order. -""" -type DraftOrderUnavailableMerchandiseWarning implements DraftOrderWarning @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - The error code. - """ - errorCode: String! - - """ - The input field that the warning applies to. - """ - field: String! - - """ - The warning message. - """ - message: String! -} - -""" -Return type for `draftOrderUpdate` mutation. -""" -type DraftOrderUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Specifies any bcc recipients for the email. - """ - bcc: [String!] - - """ - Specifies the email body. - """ - body: String - - """ - Specifies a custom message to include in the email. - """ - customMessage: String - - """ - Specifies the email sender. - """ - from: String - - """ - Specifies the email subject. - """ - subject: String - - """ - Specifies the email recipient. - """ - to: String -} - -""" -The email sender configuration for a shop. This allows Shopify to send emails -that are properly authenticated for a given domain. -""" -type EmailSenderConfiguration @requiredAccess(scope: "`read_email_sender_configuration` access scope.") @componentName(name: "shop_identity") { - """ - The list of DNS records that merchants need to configure for the current sender domain. - """ - senderDomainDnsRecords: [EmailSenderConfigurationDnsRecord!]! -} - -""" -Represents a DNS record that needs to be configured for Shopify to send emails from a domain. -""" -type EmailSenderConfigurationDnsRecord @requiredAccess(scope: "`read_email_sender_configuration` access scope.") @componentName(name: "shop_identity") { - """ - The hostname of the DNS record. - """ - name: String! - - """ - The type of the DNS record. - """ - type: String! - - """ - The value of the DNS record. - """ - value: String! -} - -""" -The shop's entitlements. -""" -type EntitlementsType @componentName(name: "billing") { - """ - The shop's B2B entitlements. - """ - b2b: B2BType! - - """ - Represents the markets for the shop. - """ - markets: MarketsType! -} - -""" -Catches validation problems when you're setting up environment variables for -your Hydrogen storefronts. When something goes wrong with your variable -configuration, these errors tell you exactly what needs fixing so you can get -your storefront running smoothly. - -For example, when setting an invalid environment variable name or value that -conflicts with system requirements, this error type captures the specific field -and validation message to guide resolution. - -Use `EnvironmentVariablesUserError` to: -- Handle environment variable validation failures -- Display specific error messages to developers -- Identify which fields need correction -- Provide clear feedback during storefront configuration - -Each error includes the problematic field name and a descriptive message -explaining the validation requirement that wasn't met. - -Learn more about [Hydrogen storefront configuration](https://shopify.dev/docs/custom-storefronts/hydrogen). -""" -type EnvironmentVariablesUserError implements DisplayableError @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") { - """ - The error code. - """ - code: EnvironmentVariablesUserErrorCode - - """ - 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 `EnvironmentVariablesUserError`. -""" -enum EnvironmentVariablesUserErrorCode @componentName(name: "platform") { - """ - A read-only environment variable can't be modified. - """ - CANT_MODIFY_READ_ONLY_ENVIRONMENT_VARIABLE - - """ - You can't reveal secret variables. - """ - CANT_REVEAL_SECRET_VARIABLES - - """ - You can't associate an environment to multiple environment variable values for the same key. - """ - DUPLICATE_ENVIRONMENT_VARIABLE_KEY_FOR_ENVIRONMENT - - """ - An environment variable with the same key already exists. - """ - DUPLICATE_ENVIRONMENT_VARIABLE_KEY_ON_CREATE - - """ - An environment variable with the provided key-value already exists. - """ - DUPLICATE_ENVIRONMENT_VARIABLE_KEY_VALUE - - """ - The environments provided weren't found. - """ - ENVIRONMENTS_NOT_FOUND - - """ - The environment provided wasn't found. - """ - ENVIRONMENT_NOT_FOUND - - """ - You've reached the maximum number of variables for one of your environments. - """ - MAXIMUM_ENVIRONMENT_VARIABLES_PER_ENVIRONMENT - - """ - Your storefront isn't connected to a GitHub repository. - """ - STOREFRONT_DISCONNECTED - - """ - The storefront was not found. - """ - STOREFRONT_NOT_FOUND - - """ - An environment variable is not assigned to any environment. - """ - UNASSIGNED_ENVIRONMENT_VARIABLE_VALUE - - """ - The input updates environment variables with different keys. - """ - USER_INPUT_MUST_UPDATE_VARIABLES_WITH_THE_SAME_KEY -} - -""" -An error that occurs during the execution of a server pixel mutation. -""" -type ErrorsServerPixelUserError implements DisplayableError @requiredAccess(scope: "`read_pixels` access scope. Also: The app must have the read_server_pixels access scope.") @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "platform") { - """ - A server pixel already exists for this app and shop. Only one server pixel can exist for any app and shop combination. - """ - ALREADY_EXISTS - - """ - Server Pixel must be configured with a valid AWS Event Bridge or GCP pub/sub endpoint address to be connected. - """ - NEEDS_CONFIGURATION_TO_CONNECT - - """ - A server pixel doesn't exist for this app and shop. - """ - NOT_FOUND - - """ - 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 -} - -""" -An error that occurs during the execution of a web pixel mutation. -""" -type ErrorsWebPixelUserError implements DisplayableError @requiredAccess(scope: "`read_pixels` access scope.") @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - The provided settings is not a valid JSON. - """ - INVALID_CONFIGURATION_JSON - - """ - The provided runtime context is invalid. - """ - INVALID_RUNTIME_CONTEXT - - """ - The provided settings does not match the expected settings definition on the app. - """ - INVALID_SETTINGS - - """ - The settings definition of the web pixel extension is in an invalid state on the app. - """ - INVALID_SETTINGS_DEFINITION - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND - - """ - No extension found. - """ - NO_EXTENSION - - """ - The input value is already taken. - """ - TAKEN - - """ - An error occurred and the web pixel couldnt be deleted. - """ - UNABLE_TO_DELETE @deprecated(reason: "`UNABLE_TO_DELETE` is deprecated. Use `UNEXPECTED_ERROR` instead.") - - """ - An unexpected error occurred. - """ - UNEXPECTED_ERROR -} - -""" -Events chronicle resource activities such as the creation of an article, the fulfillment of an order, or the -addition of a product. -""" -interface Event @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "apps") { - """ - The ARN of the EventBridge partner event source. - """ - arn: ARN - - """ - 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 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!] - - """ - 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!] - - """ - A human-readable name for the webhook subscription. - """ - name: String -} - -""" -Return type for `eventBridgeWebhookSubscriptionUpdate` mutation. -""" -type EventBridgeWebhookSubscriptionUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - A Article resource generated the event. - """ - ARTICLE - - """ - A Blog resource generated the event. - """ - BLOG - - """ - A Collection resource generated the event. - """ - COLLECTION - - """ - A Comment resource generated the event. - """ - COMMENT - - """ - A Company resource generated the event. - """ - COMPANY - - """ - A CompanyLocation resource generated the event. - """ - COMPANY_LOCATION - - """ - A Customer resource generated the event. - """ - CUSTOMER - - """ - 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 DraftOrder resource generated the event. - """ - DRAFT_ORDER - - """ - A InventoryTransfer resource generated the event. - """ - INVENTORY_TRANSFER - - """ - A Order resource generated the event. - """ - ORDER - - """ - A Page resource generated the event. - """ - PAGE - - """ - A PriceRule resource generated the event. - """ - PRICE_RULE - - """ - A Product resource generated the event. - """ - PRODUCT - - """ - A ProductVariant resource generated the event. - """ - PRODUCT_VARIANT - - """ - 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 @requiredAccess(scope: "`read_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - The discount to be applied to the exchange line item. - """ - appliedDiscount: ExchangeLineItemAppliedDiscountInput - - """ - The gift card codes associated with the physical gift cards. - """ - giftCardCodes: [String!] - - """ - The quantity of the item to be added. - """ - quantity: Int! - - """ - The ID of the product variant to be added to the order as part of an exchange. - """ - variantId: ID @gidTypes(types: ["ProductVariant"]) -} - -""" -The input fields for removing an exchange line item from a return. -""" -input ExchangeLineItemRemoveFromReturnInput @componentName(name: "returns") { - """ - The ID of the exchange line item to remove. - """ - exchangeLineItemId: ID! @gidTypes(types: ["ExchangeLineItem"]) - - """ - 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 @requiredAccess(scope: "`read_orders` access scope. Also: You must have permissions for `orders` and `better_exchanges`.") @componentName(name: "returns") @privatelyDocumented { - """ - 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 @requiredAccess(scope: "`read_orders` access scope. Also: You must have permissions for `orders` and `better_exchanges`.") @componentName(name: "returns") @privatelyDocumented { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope. Also: You must have permissions for `orders` and `better_exchanges`.") @componentName(name: "returns") @privatelyDocumented { - """ - 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 @requiredAccess(scope: "`read_orders` access scope. Also: You must have permissions for `orders` and `better_exchanges`.") @componentName(name: "returns") @privatelyDocumented { - """ - 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - 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! - - """ - Status resulting from the latest update operation. See fileErrors for details. - """ - updateStatus: FileStatus - - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope and (`read_orders` access scope or `read_marketplace_orders` access scope).") @componentName(name: "returns") { - """ - The unique ID for the Fee. - """ - id: ID! -} - -""" -A sale associated with a fee. -""" -type FeeSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - 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 - - """ - Status resulting from the latest update operation. See fileErrors for details. - """ - updateStatus: FileStatus - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - An externally hosted video. - """ - EXTERNAL_VIDEO - - """ - A Shopify-hosted generic file. - """ - FILE - - """ - A Shopify-hosted image. - """ - IMAGE - - """ - A Shopify-hosted 3D model. - """ - MODEL_3D - - """ - A Shopify-hosted video file. It's recommended to use this type for all video files. - """ - VIDEO -} - -""" -The input fields that are required to create a file object. -""" -input FileCreateInput @componentName(name: "merchandising") { - """ - The alt text description of the file for screen readers and accessibility. - """ - alt: String - - """ - The file content type. If omitted, then Shopify will attempt to determine the content type during file processing. - """ - contentType: FileContentType - - """ - How to handle if filename is already in use. - """ - duplicateResolutionMode: FileCreateInputDuplicateResolutionMode = APPEND_UUID - - """ - 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 - - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_files` access scope, `read_themes` access scope or `read_images` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - File could not be created because a file with the same name already exists. - """ - DUPLICATE_FILENAME_ERROR - - """ - 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 created because the external video has an invalid aspect ratio. - """ - EXTERNAL_VIDEO_INVALID_ASPECT_RATIO - - """ - 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 cumulative file storage limit would be exceeded. - """ - FILE_STORAGE_LIMIT_EXCEEDED - - """ - 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 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 could not be created because the image has an invalid aspect ratio. - """ - INVALID_IMAGE_ASPECT_RATIO - - """ - File could not be created because the image size is too large. - """ - INVALID_IMAGE_FILE_SIZE - - """ - File could not be created because the image's resolution exceeds the max limit. - """ - INVALID_IMAGE_RESOLUTION - - """ - File could not be processed because the signed URL was invalid. - """ - INVALID_SIGNED_URL - - """ - File timed out because it is currently being modified by another operation. - """ - MEDIA_TIMEOUT_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 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_PROCESSING_FAILURE - - """ - 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 - - """ - Model failed validation. - """ - MODEL3D_VALIDATION_ERROR - - """ - File could not be reverted to previous version. - """ - REVERT_MEDIA_VERSION_FAILURE - - """ - File error has occurred for an unknown reason. - """ - UNKNOWN - - """ - File could not be created because the image is an unsupported file type. - """ - UNSUPPORTED_IMAGE_FILE_TYPE - - """ - 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 maximum duration requirement. - """ - VIDEO_MAX_DURATION_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 maximum width requirement. - """ - VIDEO_MAX_WIDTH_ERROR - - """ - File could not be created because the metadata could not be read. - """ - VIDEO_METADATA_READ_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 minimum height requirement. - """ - VIDEO_MIN_HEIGHT_ERROR - - """ - File could not be created because it does not meet the minimum width requirement. - """ - VIDEO_MIN_WIDTH_ERROR - - """ - Video failed validation. - """ - VIDEO_VALIDATION_ERROR -} - -""" -The input fields required to create or update a file object. -""" -input FileSetInput @componentName(name: "merchandising") { - """ - The alt text description of the file for screen readers and accessibility. - """ - alt: String - - """ - The file content type. If omitted, then Shopify will attempt to determine the content type during file processing. - """ - contentType: FileContentType - - """ - How to handle if filename is already in use. - """ - duplicateResolutionMode: FileCreateInputDuplicateResolutionMode = APPEND_UUID - - """ - 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 ID of an existing file. - """ - id: ID @gidTypes(types: ["MediaImage", "Video", "ExternalVideo", "Model3d"]) - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - File processing has failed. - """ - FAILED - - """ - File is being processed. - """ - PROCESSING - - """ - File is ready to be displayed. - """ - READY - - """ - File has been uploaded but hasn't been processed. - """ - UPLOADED -} - -""" -The input fields that are required to update a file object. -""" -input FileUpdateInput @componentName(name: "merchandising") { - """ - The alt text description of the file for screen readers and accessibility. - """ - alt: String - - """ - The name of the file including its extension. - """ - filename: String - - """ - The ID of the file to be updated. - """ - id: ID @gidTypes(types: ["MediaImage", "Video", "ExternalVideo", "Model3d", "GenericFile", "Directory"]) - - """ - 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 IDs of the references to add to the file. Currently only accepts product IDs. - """ - referencesToAdd: [ID!] @gidTypes(types: ["Product"]) - - """ - The IDs of the references to remove from the file. Currently only accepts product IDs. - """ - referencesToRemove: [ID!] @gidTypes(types: ["Product"]) -} - -""" -Return type for `fileUpdate` mutation. -""" -type FileUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The alt value exceeds the maximum limit of 512 characters. - """ - ALT_VALUE_LIMIT_EXCEEDED - - """ - The search term must not be blank. - """ - BLANK_SEARCH - - """ - The provided filename already exists. - """ - FILENAME_ALREADY_EXISTS - - """ - File does not exist. - """ - FILE_DOES_NOT_EXIST - - """ - File has a pending operation. - """ - FILE_LOCKED - - """ - The input value is invalid. - """ - INVALID - - """ - Duplicate resolution mode is not supported for this file type. - """ - INVALID_DUPLICATE_MODE_FOR_TYPE - - """ - Invalid duplicate resolution mode provided. - """ - INVALID_DUPLICATE_RESOLUTION_MODE - - """ - File cannot be updated in a failed state. - """ - INVALID_FAILED_MEDIA_STATE - - """ - The provided filename is invalid. - """ - INVALID_FILENAME - - """ - Invalid filename extension. - """ - INVALID_FILENAME_EXTENSION - - """ - Invalid image source url value provided. - """ - INVALID_IMAGE_SOURCE_URL - - """ - Search query isn't supported. - """ - INVALID_QUERY - - """ - Media cannot be modified. It is currently being modified by another operation. - """ - MEDIA_CANNOT_BE_MODIFIED - - """ - Cannot create file with custom filename which does not match original source extension. - """ - MISMATCHED_FILENAME_AND_ORIGINAL_SOURCE - - """ - At least one argument is required. - """ - MISSING_ARGUMENTS - - """ - Duplicate resolution mode REPLACE cannot be used without specifying filename. - """ - MISSING_FILENAME_FOR_DUPLICATE_MODE_REPLACE - - """ - Exceeded the limit of non-image media per shop. - """ - NON_IMAGE_MEDIA_PER_SHOP_LIMIT_EXCEEDED - - """ - The file is not in the READY state. - """ - NON_READY_STATE - - """ - Exceeded the limit of media per product. - """ - PRODUCT_MEDIA_LIMIT_EXCEEDED - - """ - One or more associated products are suspended. - """ - PRODUCT_SUSPENDED - - """ - The target resource does not exist. - """ - REFERENCE_TARGET_DOES_NOT_EXIST - - """ - Specify one argument: search, IDs, or deleteAll. - """ - TOO_MANY_ARGUMENTS - - """ - Cannot add more than 10000 references to a file. - """ - TOO_MANY_FILE_REFERENCE - - """ - 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 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 for referencing. - """ - UNSUPPORTED_FILE_REFERENCE - - """ - Filename update is only supported on Image and GenericFile. - """ - UNSUPPORTED_MEDIA_TYPE_FOR_FILENAME_UPDATE -} - -""" -An error that happens during the execution of a Files API query or mutation. -""" -type FilesUserError implements DisplayableError @requiredAccess(scope: "`read_files` access scope, `read_themes` access scope or `read_images` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_financial_kyc_information` access scope or `read_users` access scope.") @componentName(name: "banking") { - """ - Current shop staff's access within the app. - """ - access: [BankingFinanceAppAccess!]! -} - -""" -Shopify Payments account information shared with embedded finance applications. -""" -type FinanceKycInformation @requiredAccess(scope: "`read_financial_kyc_information` access scope. Also: The user must have app permission for finance apps.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "`read_financial_kyc_information` access scope. Also: The user must have app permission for finance apps.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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! -} - -""" -Return type for `flowGenerateSignature` mutation. -""" -type FlowGenerateSignaturePayload @componentName(name: "platform") @privatelyDocumented { - """ - 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!]! -} - -""" -Possible schema value used to validate the payload. -""" -enum FlowGenerateSignaturePayloadSchema @componentName(name: "apps") @privatelyDocumented { - """ - For when an action is executed. Default value if none is provided. - """ - ACTION - - """ - For when Flow requests a step preview. - """ - PREVIEW - - """ - For when Flow requests validation. - """ - VALIDATION -} - -""" -Return type for `flowTriggerReceive` mutation. -""" -type FlowTriggerReceivePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope, `read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): FulfillmentLineItemConnection! - - """ - A paginated list of fulfillment orders for the fulfillment. - """ - fulfillmentOrders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_fulfillment_constraint_rules` access scope.") @componentName(name: "order_routing") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! -} - -""" -Return type for `fulfillmentConstraintRuleCreate` mutation. -""" -type FulfillmentConstraintRuleCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Shop must be on a Shopify Plus plan to activate functions from a custom app. - """ - CUSTOM_APP_FUNCTION_NOT_ELIGIBLE - - """ - 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 - - """ - No Shopify Function found for provided function_id. - """ - FUNCTION_NOT_FOUND - - """ - Function is pending deletion and cannot have new rules created against it. - """ - FUNCTION_PENDING_DELETION - - """ - Failed to create fulfillment constraint rule due to invalid input. - """ - INPUT_INVALID - - """ - Maximum number of fulfillment constraint rules reached. Limit is 10. - """ - MAXIMUM_FULFILLMENT_CONSTRAINT_RULES_REACHED - - """ - 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 -} - -""" -Return type for `fulfillmentConstraintRuleDelete` mutation. -""" -type FulfillmentConstraintRuleDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Could not find fulfillment constraint rule for provided id. - """ - NOT_FOUND - - """ - Unauthorized app scope. - """ - UNAUTHORIZED_APP_SCOPE -} - -""" -Return type for `fulfillmentConstraintRuleUpdate` mutation. -""" -type FulfillmentConstraintRuleUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Could not find fulfillment constraint rule for provided id. - """ - NOT_FOUND - - """ - Unauthorized app scope. - """ - UNAUTHORIZED_APP_SCOPE -} - -""" -Return type for `fulfillmentCreate` mutation. -""" -type FulfillmentCreatePayload @componentName(name: "platform") { - """ - The created fulfillment. - """ - fulfillment: Fulfillment - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `fulfillmentCreateV2` mutation. -""" -type FulfillmentCreateV2Payload @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - Displayed as **Attempted delivery**. - """ - ATTEMPTED_DELIVERY - - """ - Displayed as **Buyer action required**. - """ - BUYER_ACTION_REQUIRED - - """ - Displayed as **Canceled**. - """ - CANCELED - - """ - Displayed as **Picked up by carrier**. - """ - CARRIER_PICKED_UP - - """ - Displayed as **Confirmed**. - """ - CONFIRMED - - """ - Displayed as **Delayed**. - """ - DELAYED - - """ - Displayed as **Delivered**. - """ - DELIVERED - - """ - Displayed as **Failure**. - """ - FAILURE - - """ - Displayed as **Fulfilled**. - """ - FULFILLED - - """ - 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 **Picked up**. - """ - PICKED_UP - - """ - Displayed as **Ready for pickup**. - """ - READY_FOR_PICKUP - - """ - Displayed as **Ready for pickup**. - """ - READY_FOR_RECIPIENT_PICKUP - - """ - Displayed as **Returning to sender**. - """ - RETURNING_TO_SENDER - - """ - Displayed as **Submitted**. - """ - SUBMITTED -} - -""" -An auto-generated type which holds one Fulfillment and a cursor during pagination. -""" -type FulfillmentEdge @componentName(name: "fulfillments") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { - """ - The street address where this fulfillment event occurred. - """ - address1: String @protectedField(subject: "customer", content: "address") - - """ - The city where this fulfillment event occurred. - """ - city: String @protectedField(subject: "customer", content: "address") - - """ - 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 @protectedField(subject: "customer", content: "address") - - """ - The longitude where this fulfillment event occurred. - """ - longitude: Float @protectedField(subject: "customer", content: "address") - - """ - 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 @protectedField(subject: "customer", content: "address") -} - -""" -An auto-generated type for paginating through multiple FulfillmentEvents. -""" -type FulfillmentEventConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "fulfillments") { - """ - 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 ID for the fulfillment that's associated with this fulfillment event. - """ - fulfillmentId: ID! @gidTypes(types: ["Fulfillment"]) - - """ - The time at which this fulfillment event happened. - """ - happenedAt: DateTime - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - A delivery was attempted. - """ - ATTEMPTED_DELIVERY - - """ - The fulfillment requires action from the buyer before it can be delivered. - """ - BUYER_ACTION_REQUIRED - - """ - The fulfillment has been picked up by the carrier. - """ - CARRIER_PICKED_UP - - """ - The fulfillment is confirmed. This is the default value when no other information is available. - """ - CONFIRMED - - """ - The fulfillment is delayed. - """ - DELAYED - - """ - The fulfillment was successfully delivered. - """ - DELIVERED - - """ - The fulfillment request failed. - """ - FAILURE - - """ - The fulfillment is in transit. - """ - IN_TRANSIT - - """ - A purchased shipping label has been printed. - """ - LABEL_PRINTED - - """ - A shipping label has been purchased. - """ - LABEL_PURCHASED - - """ - The fulfillment is out for delivery. - """ - OUT_FOR_DELIVERY - - """ - The fulfillment was successfully picked up. - """ - PICKED_UP - - """ - The fulfillment is ready to be picked up. - """ - READY_FOR_PICKUP - - """ - The fulfillment is ready for the recipient to pick up. - """ - READY_FOR_RECIPIENT_PICKUP - - """ - The fulfillment is being returned to the sender. - """ - RETURNING_TO_SENDER -} - -""" -A fulfillment hold currently applied on a fulfillment order. -""" -type FulfillmentHold implements Node @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @requiredAccess(scope: "`read_apps` access scope.") - - """ - 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 - - """ - An optional warning message displayed when attempting to release the fulfillment hold. - """ - releaseWarning: String -} - -""" -The reason for a fulfillment hold. -""" -enum FulfillmentHoldReason @componentName(name: "fulfillments") { - """ - The fulfillment hold is applied because payment is pending. - """ - AWAITING_PAYMENT - - """ - The fulfillment hold is applied because of return items not yet received during an exchange. - """ - AWAITING_RETURN_ITEMS - - """ - 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 a post purchase upsell offer. - """ - ONLINE_STORE_POST_PURCHASE_CROSS_SELL - - """ - The fulfillment hold is applied for another reason. - """ - OTHER - - """ - The fulfillment hold is applied because of an unknown delivery date. - """ - UNKNOWN_DELIVERY_DATE -} - -""" -The input fields used to create a fulfillment from fulfillment orders. -""" -input FulfillmentInput @componentName(name: "fulfillments") { - """ - 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!]! - - """ - 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 - - """ - Address information about the location from which the order was fulfilled. - """ - originAddress: FulfillmentOriginAddressInput - - """ - The fulfillment's tracking information, including a tracking URL, a tracking number, - and the company associated with the fulfillment. - """ - trackingInfo: FulfillmentTrackingInput -} - -""" -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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): FulfillmentOrderConnection! - - """ - A list of fulfillments for the fulfillment order. - """ - fulfillments( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): FulfillmentOrderLineItemConnection! - - """ - A list of locations that the fulfillment order can potentially move to. - """ - locationsForMove( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter to a list of Fulfillment Order Line Items. - """ - lineItemIds: [ID!] = [] @gidTypes(types: ["FulfillmentOrderLineItem"]) - - """ - Specific Location ids to check for the movability for a fulfillment order. - """ - locationIds: [ID!] @gidTypes(types: ["Location"]) - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | active | string | - | address1 | string | - | address2 | string | - | city | string | - | country | string | - | created_at | time | - | geolocated | boolean | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | legacy | boolean | - | location_id | id | - | name | string | - | pickup_in_store | string | | - `enabled`
- `disabled` | - | province | string | - | zip | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The kind of request the merchant sent. - """ - kind: FulfillmentOrderMerchantRequestKind - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 total weight of all line items in the fulfillment order that aren't yet fulfilled. - """ - remainingLineItemsWeight: Weight - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - Cancels a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderCancel`. - """ - CANCEL_FULFILLMENT_ORDER - - """ - Creates a fulfillment for selected line items in the fulfillment order. The - corresponding mutation for this action is `fulfillmentCreateV2`. - """ - CREATE_FULFILLMENT - - """ - Opens an external URL to initiate the fulfillment process outside Shopify. - This action should be paired with - `FulfillmentOrderSupportedAction.externalUrl`. - """ - EXTERNAL - - """ - Applies a fulfillment hold on the fulfillment order. The corresponding mutation for this action is `fulfillmentOrderHold`. - """ - HOLD - - """ - Marks the fulfillment order as open. The corresponding mutation for this action is `fulfillmentOrderOpen`. - """ - MARK_AS_OPEN - - """ - Merges a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMerge`. - """ - MERGE - - """ - Moves a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMove`. - """ - MOVE - - """ - Releases the fulfillment hold on the fulfillment order. The corresponding - mutation for this action is `fulfillmentOrderReleaseHold`. - """ - RELEASE_HOLD - - """ - Report the progress of the fulfillment order, marking as in progress if it's not already in progress. - """ - REPORT_PROGRESS - - """ - Sends a cancellation request to the fulfillment service of a fulfillment - order. The corresponding mutation for this action is - `fulfillmentOrderSubmitCancellationRequest`. - """ - REQUEST_CANCELLATION - - """ - 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 - - """ - Splits a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderSplit`. - """ - SPLIT -} - -""" -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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "fulfillments") { - """ - Fulfillment orders for which the merchant has requested cancellation of - the previously accepted fulfillment request. - """ - CANCELLATION_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 has requested fulfillment. - """ - FULFILLMENT_REQUESTED - - """ - Fulfillment orders for which the merchant hasn't yet requested fulfillment. - """ - FULFILLMENT_UNSUBMITTED -} - -""" -Represents an error that occurs while cancelling a fulfillment order. -""" -type FulfillmentOrderCancelError implements DisplayableError @componentName(name: "fulfillments") { - """ - The error code. - """ - code: FulfillmentOrderCancelErrorCode - - """ - 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 `FulfillmentOrderCancelError`. -""" -enum FulfillmentOrderCancelErrorCode @componentName(name: "platform") { - """ - Cannot cancel fulfillment order with reported progress. Mark as unfulfilled first. - """ - FULFILLMENT_ORDER_HAS_MANUALLY_REPORTED_PROGRESS -} - -""" -Return type for `fulfillmentOrderCancel` mutation. -""" -type FulfillmentOrderCancelPayload @componentName(name: "platform") { - """ - 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: [FulfillmentOrderCancelError!]! -} - -""" -Return type for `fulfillmentOrderClose` mutation. -""" -type FulfillmentOrderClosePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { - """ - The first line of the address of the destination. - """ - address1: String @protectedField(subject: "customer", content: "address") - - """ - The second line of the address of the destination. - """ - address2: String @protectedField(subject: "customer", content: "address") - - """ - The city of the destination. - """ - city: String @protectedField(subject: "customer", content: "address") - - """ - 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 @protectedField(subject: "customer", content: "email") - - """ - The first name of the customer at the destination. - """ - firstName: String @protectedField(subject: "customer", content: "name") - - """ - A globally-unique ID. - """ - id: ID! - - """ - The last name of the customer at the destination. - """ - lastName: String @protectedField(subject: "customer", content: "name") - - """ - The location designated for the pick-up of the fulfillment order. - """ - location: Location - - """ - The phone number of the customer at the destination. - """ - phone: String @protectedField(subject: "customer", content: "phone") - - """ - The province of the destination. - """ - province: String - - """ - The ZIP code of the destination. - """ - zip: String @protectedField(subject: "customer", content: "address") -} - -""" -An auto-generated type which holds one FulfillmentOrder and a cursor during pagination. -""" -type FulfillmentOrderEdge @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "fulfillments") { - """ - A configurable ID used to track the automation system releasing these holds. - """ - externalId: 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!] = [] - - """ - 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 = "" - - """ - Whether the merchant receives a notification about the fulfillment hold. The default value is `false`. - """ - notifyMerchant: Boolean = false - - """ - The reason for the fulfillment hold. - """ - reason: FulfillmentHoldReason! - - """ - Additional information about the fulfillment hold reason. - """ - reasonNotes: String -} - -""" -Return type for `fulfillmentOrderHold` mutation. -""" -type FulfillmentOrderHoldPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The fulfillment order line items are not unique. - """ - DUPLICATED_FULFILLMENT_ORDER_LINE_ITEMS - - """ - 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 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 fulfillment order could not be found. - """ - FULFILLMENT_ORDER_NOT_FOUND - - """ - The fulfillment order is not in a splittable state. - """ - FULFILLMENT_ORDER_NOT_SPLITTABLE - - """ - The fulfillment order line item quantity must be greater than 0. - """ - GREATER_THAN_ZERO - - """ - The fulfillment order line item quantity is invalid. - """ - INVALID_LINE_ITEM_QUANTITY - - """ - The input value is already taken. - """ - TAKEN -} - -""" -The international duties relevant to a fulfillment order. -""" -type FulfillmentOrderInternationalDuties @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 shipping line associated with this line item. - """ - shippingLine: ShippingLine - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "fulfillments") { - """ - The ID of the fulfillment order line item. - """ - id: ID! @gidTypes(types: ["FulfillmentOrderLineItem"]) - - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "fulfillments") { - """ - The ID of the fulfillment order. - """ - fulfillmentOrderId: ID! @gidTypes(types: ["FulfillmentOrder"]) - - """ - 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 @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Invalid fulfillment order ID provided. - """ - FULFILLMENT_ORDER_INVALID - - """ - The fulfillment order does not have any line items that can be prepared. - """ - NO_LINE_ITEMS_TO_PREPARE_FOR_FULFILLMENT_ORDER - - """ - Unable to prepare quantity. - """ - UNABLE_TO_PREPARE_QUANTITY -} - -""" -A location that a fulfillment order can potentially move to. -""" -type FulfillmentOrderLocationForMove @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - Fulfillment order line items that can be moved from their current location to the given location. - """ - availableLineItems( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "fulfillments") { - """ - The merchant requests cancellation of an `IN_PROGRESS` fulfillment order. - """ - CANCELLATION_REQUEST - - """ - The merchant requests fulfillment for an `OPEN` fulfillment order. - """ - FULFILLMENT_REQUEST -} - -""" -The input fields for merging fulfillment orders. -""" -input FulfillmentOrderMergeInput @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "fulfillments") { - """ - The ID of the fulfillment order to be merged. - """ - fulfillmentOrderId: ID! @gidTypes(types: ["FulfillmentOrder"]) - - """ - The fulfillment order line items to be merged. - """ - fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] -} - -""" -Return type for `fulfillmentOrderMerge` mutation. -""" -type FulfillmentOrderMergePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 -} - -""" -Represents a user error that occurs while moving a fulfillment order. -""" -type FulfillmentOrderMoveFulfillmentOrderMoveUserError implements DisplayableError @componentName(name: "fulfillments") { - """ - The error code. - """ - code: FulfillmentOrderMoveFulfillmentOrderMoveUserErrorCode - - """ - 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 `FulfillmentOrderMoveFulfillmentOrderMoveUserError`. -""" -enum FulfillmentOrderMoveFulfillmentOrderMoveUserErrorCode @componentName(name: "platform") { - """ - Cannot move a fulfillment order that has progress reported. - """ - CANNOT_MOVE_FULFILLMENT_ORDER_WITH_REPORTED_PROGRESS - - """ - Cannot move a fulfillment order to the location it's already assigned to. - """ - CANNOT_MOVE_TO_CURRENT_ORIGIN_LOCATION -} - -""" -Return type for `fulfillmentOrderMove` mutation. -""" -type FulfillmentOrderMovePayload @componentName(name: "platform") { - """ - 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: [FulfillmentOrderMoveFulfillmentOrderMoveUserError!]! -} - -""" -Return type for `fulfillmentOrderOpen` mutation. -""" -type FulfillmentOrderOpenPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - The fulfillment order was rejected because of an incorrect address. - """ - INCORRECT_ADDRESS - - """ - The fulfillment order was rejected because product information is incorrect to be able to ship. - """ - INCORRECT_PRODUCT_INFO - - """ - The fulfillment order was rejected because of an ineligible product. - """ - INELIGIBLE_PRODUCT - - """ - The fulfillment order was rejected because international address shipping hasn't been enabled. - """ - INTERNATIONAL_SHIPPING_UNAVAILABLE - - """ - The fulfillment order was rejected because of invalid customer contact information. - """ - INVALID_CONTACT_INFORMATION - - """ - The fulfillment order was rejected because of an invalid SKU. - """ - INVALID_SKU - - """ - The fulfillment order was rejected because inventory is out of stock. - """ - INVENTORY_OUT_OF_STOCK - - """ - The fulfillment order was rejected because the merchant is blocked or suspended. - """ - MERCHANT_BLOCKED_OR_SUSPENDED - - """ - The fulfillment order was rejected because customs information was missing for international shipping. - """ - MISSING_CUSTOMS_INFO - - """ - The fulfillment order was rejected because the order is too large. - """ - ORDER_TOO_LARGE - - """ - The fulfillment order was rejected for another reason. - """ - OTHER - - """ - The fulfillment order was rejected because the package preference was not set. - """ - PACKAGE_PREFERENCE_NOT_SET - - """ - The fulfillment order was rejected because the payment method was declined. - """ - PAYMENT_DECLINED - - """ - The fulfillment order was rejected because of an undeliverable destination. - """ - UNDELIVERABLE_DESTINATION -} - -""" -Return type for `fulfillmentOrderReleaseHold` mutation. -""" -type FulfillmentOrderReleaseHoldPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The fulfillment order wasn't found. - """ - FULFILLMENT_ORDER_NOT_FOUND - - """ - The app doesn't have access to release the fulfillment hold. - """ - INVALID_ACCESS -} - -""" -The input fields for the progress report for the fulfillment order. -""" -input FulfillmentOrderReportProgressInput @componentName(name: "fulfillments") { - """ - Additional information for the progress report. - """ - reasonNotes: String -} - -""" -Return type for `fulfillmentOrderReportProgress` mutation. -""" -type FulfillmentOrderReportProgressPayload @componentName(name: "platform") { - """ - The fulfillment order on which a mark as in progress update has been specified. - """ - fulfillmentOrder: FulfillmentOrder - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [FulfillmentOrderReportProgressUserError!]! -} - -""" -An error that occurs during the execution of `FulfillmentOrderReportProgress`. -""" -type FulfillmentOrderReportProgressUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: FulfillmentOrderReportProgressUserErrorCode - - """ - 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 `FulfillmentOrderReportProgressUserError`. -""" -enum FulfillmentOrderReportProgressUserErrorCode @componentName(name: "platform") { - """ - The fulfillment order contains picked items. - """ - FULFILLMENT_ORDER_CONTAINS_PICKED_ITEMS - - """ - Progress cannot be reported for a fulfillment order with this delivery method. - """ - FULFILLMENT_ORDER_INVALID_DELIVERY_METHOD - - """ - The fulfillment order is not assigned to the requesting fulfillment service. - """ - FULFILLMENT_ORDER_INVALID_FULFILLMENT_SERVICE_OWNERSHIP - - """ - The fulfillment order could not be found. - """ - FULFILLMENT_ORDER_NOT_FOUND - - """ - The fulfillment order status is invalid. - """ - FULFILLMENT_ORDER_STATUS_INVALID - - """ - The action is not supported for the fulfillment order. - """ - FULFILLMENT_ORDER_UNSUPPORTED_ACTION - - """ - Marketplace apps are not eligible to report progress on fulfillment orders. - """ - MARKETPLACE_APP_NOT_ELIGIBLE -} - -""" -The request status of a fulfillment order. -""" -enum FulfillmentOrderRequestStatus @componentName(name: "fulfillments") { - """ - The fulfillment service accepted the merchant's fulfillment request. - """ - ACCEPTED - - """ - 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 merchant requested a cancellation of the fulfillment request for this fulfillment order. - """ - CANCELLATION_REQUESTED - - """ - The fulfillment service closed the fulfillment order without completing it. - """ - CLOSED - - """ - The fulfillment service rejected the merchant's fulfillment request. - """ - REJECTED - - """ - The merchant requested fulfillment for this fulfillment order. - """ - SUBMITTED - - """ - 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 -} - -""" -Return type for `fulfillmentOrderReschedule` mutation. -""" -type FulfillmentOrderReschedulePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Fulfillment order could not be found. - """ - FULFILLMENT_ORDER_NOT_FOUND -} - -""" -The set of valid sort keys for the FulfillmentOrder query. -""" -enum FulfillmentOrderSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - The ID of the fulfillment order to be split. - """ - fulfillmentOrderId: ID! @gidTypes(types: ["FulfillmentOrder"]) - - """ - The fulfillment order line items to be split out. - """ - fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!]! -} - -""" -Return type for `fulfillmentOrderSplit` mutation. -""" -type FulfillmentOrderSplitPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - The fulfillment order has been cancelled by the merchant. - """ - CANCELLED - - """ - The fulfillment order has been completed and closed. - """ - CLOSED - - """ - The fulfillment order cannot be completed as requested. - """ - INCOMPLETE - - """ - The fulfillment order is being processed. - """ - IN_PROGRESS - - """ - The fulfillment order is on hold. The fulfillment process can't be initiated - until the hold on the fulfillment order is released. - """ - ON_HOLD - - """ - The fulfillment order is ready for fulfillment. - """ - OPEN - - """ - The fulfillment order is deferred and will be ready for fulfillment after the date and time specified in `fulfill_at`. - """ - SCHEDULED -} - -""" -Return type for `fulfillmentOrderSubmitCancellationRequest` mutation. -""" -type FulfillmentOrderSubmitCancellationRequestPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope or `read_third_party_fulfillment_orders` access scope.") @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Cannot move a fulfillment order that has progress reported. - """ - CANNOT_MOVE_FULFILLMENT_ORDER_WITH_REPORTED_PROGRESS - - """ - Cannot reassign location for fulfillment orders. - """ - CANNOT_REASSIGN_LOCATION_FOR_FULFILLMENT_ORDERS - - """ - The delivery method type is not supported. - """ - DELIVERY_METHOD_TYPE_NOT_SUPPORTED - - """ - Fulfillment orders must belong to the same location. - """ - FULFILLMENT_ORDERS_MUST_BELONG_TO_SAME_LOCATION - - """ - 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 - - """ - Fulfillment order could not be found. - """ - FULFILLMENT_ORDER_NOT_FOUND - - """ - No fulfillment order IDs were provided. - """ - NO_FULFILLMENT_ORDER_IDS - - """ - This feature is only supported for multi-location shops. - """ - SINGLE_LOCATION_SHOP_NOT_SUPPORTED -} - -""" -Return type for `fulfillmentOrdersSetFulfillmentDeadline` mutation. -""" -type FulfillmentOrdersSetFulfillmentDeadlinePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { - """ - The street address of the fulfillment location. - """ - address1: String @protectedField(subject: "customer", content: "address") - - """ - The second line of the address. Typically the number of the apartment, suite, or unit. - """ - address2: String @protectedField(subject: "customer", content: "address") - - """ - The city in which the fulfillment location is located. - """ - city: String @protectedField(subject: "customer", content: "address") - - """ - 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 @protectedField(subject: "customer", content: "address") -} - -""" -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 @componentName(name: "fulfillments") { - """ - 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 of the fulfillment location. - """ - countryCode: String! - - """ - The province of the fulfillment location. - """ - provinceCode: String - - """ - The zip code of the fulfillment location. - """ - zip: 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 @requiredAccess(scope: "Apps will need one of the following: `fulfillments`, `products` or `custom_fulfillment_services` (in case of custom fulfillment service). Fulfillment service apps can also access their own fulfillment service records if they have `assigned_fulfillment_orders` access scope. Users with access to the app will have access to their fulfillment services.") @componentName(name: "fulfillments") { - """ - 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 - - """ - 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 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - The fulfillment was canceled. - """ - CANCELLED - - """ - There was an error with the fulfillment request. - """ - ERROR - - """ - The fulfillment request failed. - """ - FAILURE - - """ - 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.") - - """ - 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 fulfillment was completed successfully. - """ - SUCCESS -} - -""" -Represents the tracking information for a fulfillment. -""" -type FulfillmentTrackingInfo @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope, `read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") @componentName(name: "fulfillments") @protectedObject(subject: "customer") { - """ - 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 - * 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "fulfillments") { - """ - 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 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 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 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 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 @componentName(name: "fulfillments") { - """ - 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!]! - - """ - 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 - - """ - Address information about the location from which the order was fulfilled. - """ - originAddress: FulfillmentOriginAddressInput - - """ - The fulfillment's tracking information, including a tracking URL, a tracking number, - and the company associated with the fulfillment. - """ - trackingInfo: FulfillmentTrackingInput -} - -""" -Trace information for a single country-language product feed sync triggered by [`channelFullSync`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelFullSync). -""" -type FullSyncTraceInfo @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") @componentName(name: "channels") { - """ - The country of the product feed that was triggered. - """ - country: CountryCode! - - """ - The language of the product feed that was triggered. - """ - language: LanguageCode! - - """ - The operation ID of a successfully initiated product full sync operation. This - field is set to nil when the full sync operation isn't successfully initiated. - """ - operationId: ID -} - -""" -The App Bridge information for a Shopify Function. -""" -type FunctionsAppBridge @componentName(name: "apps") { - """ - 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 @componentName(name: "apps") { - """ - 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - 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 - - """ - Status resulting from the latest update operation. See fileErrors for details. - """ - updateStatus: FileStatus - - """ - 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 @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") @protectedObject(subject: "customer") { - """ - The gift card's remaining balance. - """ - balance: MoneyV2! - - """ - The date and time at which the gift card was created. - """ - createdAt: DateTime! - - """ - The strategy used to convert the gift card's balance when it's redeemed in a currency other than the one it was issued in. - """ - crossCurrencyRedemptionStrategy: GiftCardCrossCurrencyRedemptionStrategy! - - """ - 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! - - """ - Whether the gift card is redeemable in any active market currency. - """ - isRedeemable: Boolean! - - """ - The final four characters of the gift card code. - """ - lastCharacters: String! - - """ - The line item from an order that initiated the creation of this gift card. - This value is `null` if the gift card was issued manually. - """ - lineItem: LineItem - - """ - 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 - - """ - Whether the customer and recipient will be notified when the gift card is issued. - """ - notify: Boolean! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") { - """ - The default expiration configuration of gift cards on the shop. This field is - null if the shop hasn't set a default expiration for gift cards. - """ - expirationConfiguration: GiftCardExpirationConfiguration - - """ - 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! -} - -""" -The supported units for gift card expiration. -""" -enum GiftCardConfigurationExpirationUnit @componentName(name: "stored_value_instruments") { - """ - Gift cards expire in days. - """ - DAYS - - """ - Gift cards expire in months. - """ - MONTHS - - """ - Gift cards expire in years. - """ - YEARS -} - -""" -An auto-generated type for paginating through multiple GiftCards. -""" -type GiftCardConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "stored_value_instruments") { - """ - 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 strategy used to convert the gift card's balance when it's redeemed in a - currency other than the one it was issued in. When not provided, defaults to - `MARKET_FX` for gift cards issued in the shop's currency, and `NONE` for gift - cards issued in a different currency. - """ - crossCurrencyRedemptionStrategy: GiftCardCrossCurrencyRedemptionStrategy - - """ - The ID of the customer who will receive the gift card. Requires `write_customers` access_scope. - """ - customerId: ID @gidTypes(types: ["Customer"]) - - """ - The date at which the gift card will expire. If not provided, then the gift card will never expire. - """ - expiresOn: Date - - """ - The initial amount of the gift card. - """ - initialAmount: MoneyInput - - """ - The initial value of the gift card. - """ - initialValue: Decimal @deprecated(reason: "Use `initialAmount` instead.") - - """ - The note associated with the gift card, which isn't visible to the customer. - """ - note: String - - """ - Whether to enable sending of notifications to the customer and recipient. - Defaults to `true`. - Setting this to `false` will prevent all notifications to the customer or recipient, unless the property is - changed on a subsequent update. - """ - notify: Boolean = true - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "stored_value_instruments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_gift_card_transactions` access scope.") @componentName(name: "stored_value_instruments") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - A note about the transaction. - """ - note: String - - """ - The date and time when the transaction was processed. - """ - processedAt: DateTime! -} - -""" -The strategy used to convert the gift card's balance when it is redeemed in a currency other than the one it was issued in. -""" -enum GiftCardCrossCurrencyRedemptionStrategy @componentName(name: "stored_value_instruments") { - """ - The gift card is redeemed using the automatic or manual exchange rate - configured in the market's currency setting when converting from shop - currency. Only applicable for gift cards issued in the shop currency. - """ - MARKET_FX - - """ - The gift card can only be redeemed in the currency it was issued in. It cannot be used for purchases in other currencies. - """ - NONE - - """ - The gift card is redeemed using standard spot exchange rates between the redemption currency and the gift card currency. - """ - SPOT_FX -} - -""" -Return type for `giftCardDeactivate` mutation. -""" -type GiftCardDeactivatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The gift card could not be found. - """ - GIFT_CARD_NOT_FOUND -} - -""" -The input fields for a gift card debit transaction. -""" -input GiftCardDebitInput @componentName(name: "stored_value_instruments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_gift_card_transactions` access scope.") @componentName(name: "stored_value_instruments") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 @componentName(name: "stored_value_instruments") { - """ - 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 @componentName(name: "platform") { - """ - The customer could not be found. - """ - CUSTOMER_NOT_FOUND - - """ - The gift card's value exceeds the allowed limits. - """ - GIFT_CARD_LIMIT_EXCEEDED - - """ - The input value should be greater than the minimum allowed value. - """ - GREATER_THAN - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - The maximum initial value in the shop's local currency of a gift card was exceeded. - """ - MAX_INITIAL_VALUE_EXCEEDED - - """ - The maximum initial value in USD of a gift card was exceeded. - """ - MAX_INITIAL_VALUE_EXCEEDED_IN_USD - - """ - Missing a required argument. - """ - MISSING_ARGUMENT - - """ - The recipient could not be found. - """ - RECIPIENT_NOT_FOUND - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT -} - -""" -Represents the default expiration configuration of gift cards on the shop. -""" -type GiftCardExpirationConfiguration @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") { - """ - The unit for the default gift card expiration. - """ - expirationUnit: GiftCardConfigurationExpirationUnit! - - """ - The value for the default gift card expiration. - """ - expirationValue: Int! -} - -""" -The input fields for creating or updating a gift card product with the -[`giftCardProductSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet) -mutation. - -For list fields like -[`variants`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-input.fields.variants), -the mutation creates new entries, updates existing ones, and deletes any entries not included -in the input. All other fields update only when explicitly provided, leaving omitted fields -unchanged. -""" -input GiftCardProductSetInput @componentName(name: "merchandising") { - """ - The IDs of collections that this product will be a member of. - """ - collections: [ID!] @gidTypes(types: ["Collection"]) - - """ - Whether gift cards fulfilled from this product are redeemable in any payment currency supported by the store. - - > Note - > This value can't be changed after the product is created. - """ - crossCurrencyRedeemable: Boolean - - """ - The description of the product, with HTML tags. - For example, the description might include bold `` and italic `` text. - """ - descriptionHtml: String - - """ - The files to associate with the product. - - Complexity cost: 1.9 per file. - """ - files: [FileSetInput!] - - """ - 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 - - """ - 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 issuance currency for gift cards fulfilled from this product. - - > Note - > This value can't be changed after the product is created. - """ - issuanceCurrency: CurrencyCode - - """ - The metafields to associate with this product. - - Complexity cost: 0.4 per metafield. - """ - metafields: [MetafieldInput!] - - """ - List of custom product options and option values (maximum of 3 per product). - """ - productOptions: [OptionSetInput!] - - """ - The [product type](https://help.shopify.com/manual/products/details/product-type) - that merchants define. - """ - productType: 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 - - """ - The [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) - that are associated with a product. - """ - seo: SEOInput - - """ - The status of the product. - """ - status: ProductStatus - - """ - 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 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 - - """ - A list of variants associated with the gift card product. - - Complexity cost: 0.2 per variant. - """ - variants: [GiftCardProductVariantSetInput!] - - """ - The name of the product's vendor. - """ - vendor: String -} - -""" -Return type for `giftCardProductSet` mutation. -""" -type GiftCardProductSetPayload @componentName(name: "platform") { - """ - The gift card 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: [GiftCardProductSetUserError!]! -} - -""" -Defines errors for GiftCardProductSet mutation. -""" -type GiftCardProductSetUserError implements DisplayableError @componentName(name: "merchandising") { - """ - The error code. - """ - code: GiftCardProductSetUserErrorCode - - """ - 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 `GiftCardProductSetUserError`. -""" -enum GiftCardProductSetUserErrorCode @componentName(name: "platform") { - """ - An option cannot have both metafield linked and nonlinked option values. - """ - CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES - - """ - The metafield violates a capability restriction. - """ - CAPABILITY_VIOLATION - - """ - Duplicated metafield value for linked option. - """ - DUPLICATED_METAFIELD_VALUE - - """ - Duplicated option name. - """ - DUPLICATED_OPTION_NAME - - """ - Duplicated option value. - """ - DUPLICATED_OPTION_VALUE - - """ - Duplicated value. - """ - DUPLICATED_VALUE - - """ - Cannot link multiple options to the same metafield. - """ - DUPLICATE_LINKED_OPTION - - """ - Something went wrong, please try again. - """ - GENERIC_ERROR - - """ - 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 - - """ - Handle already in use. Please provide a new handle. - """ - HANDLE_NOT_UNIQUE - - """ - The id field is not allowed if identifier is provided. - """ - ID_NOT_ALLOWED - - """ - The identifier value does not match the value of the corresponding field in the input. - """ - INPUT_MISMATCH - - """ - Input is not valid. - """ - INVALID_INPUT - - """ - Metafield is not valid. - """ - INVALID_METAFIELD - - """ - Invalid metafield value for linked option. - """ - INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION - - """ - Product is not valid. - """ - INVALID_PRODUCT - - """ - Product variant is not valid. - """ - INVALID_VARIANT - - """ - Error processing request in the background job. - """ - JOB_ERROR - - """ - No valid metafield definition found for linked option. - """ - LINKED_METAFIELD_DEFINITION_NOT_FOUND - - """ - Linked options are currently not supported for this shop. - """ - LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP - - """ - The input argument `metafields` (if present) must contain the `customId` value. - """ - METAFIELD_MISMATCH - - """ - The input field corresponding to the identifier is required. - """ - MISSING_FIELD_REQUIRED - - """ - Resource matching the identifier was not found. - """ - NOT_FOUND - - """ - Options over limit. - """ - OPTIONS_OVER_LIMIT - - """ - Option does not exist. - """ - OPTION_DOES_NOT_EXIST - - """ - Each option must have at least one option value specified. - """ - OPTION_VALUES_MISSING - - """ - Option values over limit. - """ - OPTION_VALUES_OVER_LIMIT - - """ - Option value does not exist. - """ - OPTION_VALUE_DOES_NOT_EXIST - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - The specified product is not a gift card. The giftCardProductSet mutation can only be used with gift card products. - """ - PRODUCT_MUST_BE_GIFT_CARD - - """ - Must specify product options when updating variants. - """ - PRODUCT_OPTIONS_INPUT_MISSING - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED - - """ - Product variant does not exist. - """ - PRODUCT_VARIANT_DOES_NOT_EXIST - - """ - Must specify variants when updating options. - """ - VARIANTS_INPUT_MISSING - - """ - Number of product variants exceeds shop limit. - """ - VARIANTS_OVER_LIMIT -} - -""" -The gift card configuration settings for a -[`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), -including the -[`issuanceCurrency`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardProductSettings#field-GiftCardProductSettings.fields.issuanceCurrency) -and whether the gift card can be redeemed across currencies via -[`crossCurrencyRedeemable`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCardProductSettings#field-GiftCardProductSettings.fields.crossCurrencyRedeemable). -Configure these settings when creating a gift card product with the -[`giftCardProductSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet) -mutation. -""" -type GiftCardProductSettings @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - Whether the gift card can be redeemed in currencies other than the issuance currency. - """ - crossCurrencyRedeemable: Boolean! - - """ - The currency in which the gift card fulfilled by this product is issued. - """ - issuanceCurrency: CurrencyCode -} - -""" -The input fields for specifying a gift card product variant to create or update with the -[`giftCardProductSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet) -mutation. - -Include an -[`id`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/GiftCardProductSetVariantInput#field-GiftCardProductSetVariantInput.fields.id) -to update an existing variant, or omit it to create a new one. Gift card variant defaults are -applied automatically, meaning variants are set to non-taxable, don't require shipping, and their inventory is untracked. -""" -input GiftCardProductVariantSetInput @componentName(name: "merchandising") { - """ - The value of the barcode associated with the product. - """ - barcode: String - - """ - 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 - - """ - Specifies the product variant to update or create a new variant if absent. - """ - id: ID @gidTypes(types: ["ProductVariant"]) - - """ - Additional customizable information about the product variant. - - Complexity cost: 0.4 per variant metafield. - """ - metafields: [MetafieldInput!] - - """ - The custom properties that a shop owner uses to define product variants. - """ - optionValues: [VariantOptionValueInput!]! - - """ - The order of the product variant in the list of product variants. The first position in the list is 1. - """ - position: Int - - """ - The price of the variant. - """ - price: Money - - """ - Indicates whether the product variant is created as published or unpublished. - This option is only available for new product variants. - """ - published: Boolean - - """ - The SKU for the variant. Case-sensitive string. - """ - sku: String -} - -""" -Represents a recipient who will receive the issued gift card. -""" -type GiftCardRecipient @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") @protectedObject(subject: "customer") { - """ - The message sent with the gift card. - """ - message: String - - """ - The preferred name of the recipient who will receive the gift card. - """ - preferredName: String @protectedField(subject: "customer", content: "name") - - """ - 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 @componentName(name: "stored_value_instruments") { - """ - The ID of the customer who will be the recipient of the gift card. Requires `write_customers` access_scope. - """ - id: ID! @gidTypes(types: ["Customer"]) - - """ - The personalized message intended for the recipient. - """ - message: String - - """ - The preferred name of the recipient. - """ - preferredName: 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The customer could not be found. - """ - CUSTOMER_NOT_FOUND - - """ - The gift card could not be found. - """ - GIFT_CARD_NOT_FOUND - - """ - The input value is invalid. - """ - INVALID -} - -""" -Return type for `giftCardSendNotificationToRecipient` mutation. -""" -type GiftCardSendNotificationToRecipientPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The gift card could not be found. - """ - GIFT_CARD_NOT_FOUND - - """ - The input value is invalid. - """ - INVALID - - """ - The recipient could not be found. - """ - RECIPIENT_NOT_FOUND -} - -""" -The set of valid sort keys for the GiftCard query. -""" -enum GiftCardSortKeys @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_gift_card_transactions` access scope.") @componentName(name: "stored_value_instruments") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "stored_value_instruments") { - """ - 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 @requiredAccess(scope: "`read_gift_card_transactions` access scope.") @componentName(name: "stored_value_instruments") { - """ - 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 @componentName(name: "platform") { - """ - The gift card's value exceeds the allowed limits. - """ - GIFT_CARD_LIMIT_EXCEEDED - - """ - The gift card could not be found. - """ - GIFT_CARD_NOT_FOUND - - """ - The gift card does not have sufficient funds to satisfy the request. - """ - INSUFFICIENT_FUNDS - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - The currency provided does not match the currency of the gift card. - """ - MISMATCHING_CURRENCY - - """ - A positive amount must be used. - """ - NEGATIVE_OR_ZERO_AMOUNT -} - -""" -The input fields to update a gift card. -""" -input GiftCardUpdateInput @componentName(name: "stored_value_instruments") { - """ - The strategy used to convert the gift card's balance when it's redeemed in a currency other than the one it was issued in. - """ - crossCurrencyRedemptionStrategy: GiftCardCrossCurrencyRedemptionStrategy - - """ - 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 @gidTypes(types: ["Customer"]) - - """ - The date at which the gift card will expire. If set to `null`, 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 - - """ - Whether to enable sending of notifications to the customer or recipient of the gift card. - """ - notify: Boolean - - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_gift_cards` access scope.") @componentName(name: "stored_value_instruments") { - """ - 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 @componentName(name: "platform") { - """ - The data stored in the resource, represented as a digest. - """ - compareDigest: String! -} - -""" -Represents an object that has a list of events. -""" -interface HasEvents @componentName(name: "timeline") { - """ - The paginated list of events associated with the host subject. - """ - events( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): EventConnection! -} - -""" -Localization extensions associated with the specified resource. For example, the tax id for government invoice. -""" -interface HasLocalizationExtensions @componentName(name: "platform") { - """ - List of localization extensions for the resource. - """ - localizationExtensions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The country codes of the extensions. - """ - countryCodes: [CountryCode!] - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The purpose of the extensions. - """ - purposes: [LocalizationExtensionPurpose!] - - """ - 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 @componentName(name: "platform") { - """ - List of localized fields for the resource. - """ - localizedFields( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The country codes of the extensions. - """ - countryCodes: [CountryCode!] - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The purpose of the extensions. - """ - purposes: [LocalizedFieldPurpose!] - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): LocalizedFieldConnection! -} - -""" -Resources that metafield definitions can be applied to. -""" -interface HasMetafieldDefinitions @componentName(name: "content") { - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 @componentName(name: "content") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! -} - -""" -The input fields to identify a metafield on an owner resource by namespace and key. -""" -input HasMetafieldsIdentifier @componentName(name: "content") { - """ - The key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String -} - -""" -The input fields that identify metafield definitions. -""" -input HasMetafieldsMetafieldIdentifierInput @componentName(name: "content") { - """ - The unique identifier for the metafield definition within its namespace. - """ - key: String! - - """ - 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 -} - -""" -Published translations associated with the resource. -""" -interface HasPublishedTranslations @componentName(name: "markets") { - """ - 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 @gidTypes(types: ["Market"]) - ): [Translation!]! -} - -""" -Represents information about the store credit accounts associated to the specified owner. -""" -interface HasStoreCreditAccounts @requiredAccess(scope: "`read_store_credit_accounts` access scope.") @componentName(name: "stored_value_instruments") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | currency_code | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): StoreCreditAccountConnection! -} - -""" -Return type for `httpServerPixelUpdate` mutation. -""" -type HttpServerPixelUpdatePayload @componentName(name: "platform") @privatelyDocumented { - """ - The server pixel as configured by the mutation. - """ - serverPixel: ServerPixel - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ErrorsServerPixelUserError!]! -} - -""" -Represents a Hydrogen storefront. -""" -type HydrogenStorefront @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { - """ - The date and time when the Hydrogen storefront was created. - """ - createdAt: DateTime! - - """ - The current deployment for the Hydrogen storefront. - """ - currentProductionDeployment: HydrogenStorefrontDeployment - - """ - The variables associated with the preview Hydrogen storefront environment. - """ - environmentVariables( - """ - The name of the environment branch to query. - """ - branchName: String - - """ - The handle of the environment to query. - """ - handle: String - ): [HydrogenStorefrontEnvironmentVariable!]! - - """ - All environments for the storefront. - """ - environments: [HydrogenStorefrontEnvironment!]! - - """ - The handle of the Hydrogen storefront. - """ - handle: String - - """ - The ID of the Hydrogen storefront. - """ - id: ID! - - """ - The token that allows the custom storefront to be deployed to Oxygen. - """ - oxygenDeploymentToken: String - - """ - The production URL for a Hydrogen storefront. - """ - productionUrl: URL - - """ - The name of the Hydrogen storefront. - """ - title: String! - - """ - The date and time when the Hydrogen storefront was last updated. - """ - updatedAt: DateTime! -} - -""" -Return type for `hydrogenStorefrontCreate` mutation. -""" -type HydrogenStorefrontCreatePayload @componentName(name: "platform") { - """ - The Hydrogen storefront that was just created. - """ - hydrogenStorefront: HydrogenStorefront - - """ - ID for job that connects the Hydrogen storefront to Oxygen. - """ - jobId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [HydrogenStorefrontCreateUserError!]! -} - -""" -An error that occurs during the execution of `HydrogenStorefrontCreate`. -""" -type HydrogenStorefrontCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: HydrogenStorefrontCreateUserErrorCode - - """ - 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 `HydrogenStorefrontCreateUserError`. -""" -enum HydrogenStorefrontCreateUserErrorCode @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - The Hydrogen storefront app isn't installed. - """ - CUSTOM_STOREFRONTS_NOT_INSTALLED - - """ - The Hydrogen storefront failed to be created. - """ - FAILED_TO_CREATE - - """ - Your plan doesn't include Hydrogen storefronts. - """ - HYDROGEN_NOT_SUPPORTED_ON_PLAN - - """ - The input value is invalid. - """ - INVALID - - """ - The job couldn't be processed. Please try again later. - """ - JOB_NOT_ENQUEUED - - """ - The title for the storefront is already taken. - """ - TITLE_ALREADY_EXISTS - - """ - The title for the storefront is too long. - """ - TITLE_TOO_LONG -} - -""" -The input fields use to replace application urls on a Customer OAuth Application. -""" -input HydrogenStorefrontCustomerApplicationUrlsReplaceInput @componentName(name: "channels") { - """ - Add and remove urls from the list of allowed JavaScript url origins. - """ - javascriptOrigin: HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput - - """ - Add and remove urls from the list of allowed urls that can be redirected to post-logout. - """ - logoutUris: HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput - - """ - Add and remove urls from the list of allowed callback urls. - """ - redirectUri: HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput -} - -""" -Return type for `hydrogenStorefrontCustomerApplicationUrlsReplace` mutation. -""" -type HydrogenStorefrontCustomerApplicationUrlsReplacePayload @componentName(name: "platform") { - """ - List of allowed javaScript url origins. - """ - javascriptOrigin: [String!] - - """ - List of allowed urls that can be redirected to post-logout. - """ - logoutUris: [String!] - - """ - List of allowed callback urls. - """ - redirectUri: [String!] - - """ - Whether the customer application was updated successfully. - """ - success: Boolean - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [HydrogenStorefrontCustomerUserError!]! -} - -""" -The input fields used to replace Customer Account application urls. -""" -input HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput @componentName(name: "channels") { - """ - Url to add. - """ - add: [String!] - - """ - Regular expression pattern for Urls to remove. - """ - removeRegex: String -} - -""" -Catches validation errors when setting up customer authentication for your -Hydrogen storefront, so you can quickly fix configuration issues and get -customers logging in smoothly. - -For example, when setting invalid redirect URLs or JavaScript origins that don't -meet security requirements, this error type captures the specific validation -failure with clear guidance for resolution. - -Use `HydrogenStorefrontCustomerUserError` to: -- Handle customer account configuration errors -- Display specific validation messages for authentication setup -- Identify problematic URL or origin configurations -- Guide developers through Customer Account API requirements - -Each error includes the field that failed validation and a descriptive message -explaining the specific requirement, making it easier to troubleshoot customer -authentication setup. - -Learn more about [Customer Account API configuration](https://shopify.dev/docs/storefronts/headless/building-with-the-customer-account-api/getting-started). -""" -type HydrogenStorefrontCustomerUserError implements DisplayableError @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") { - """ - The error code. - """ - code: HydrogenStorefrontCustomerUserErrorCode - - """ - 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 `HydrogenStorefrontCustomerUserError`. -""" -enum HydrogenStorefrontCustomerUserErrorCode @componentName(name: "platform") { - """ - Customer Account API application not found. - """ - CUSTOMER_ACCOUNT_API_APPLICATION_NOT_FOUND - - """ - The input value is invalid. - """ - INVALID - - """ - The Regex is invalid. - """ - REGEX_INVALID -} - -""" -Tracks each version of your Hydrogen storefront as it gets deployed, giving you -a complete history of what's live and what's been released. Every time you push -updates to your storefront, this creates a new deployment record that captures -the commit information and timestamps. - -For example, when pushing updates to a Hydrogen storefront, each deployment -represents a distinct version with its own commit SHA, commit message, and -deployment timestamp, allowing teams to track release history. - -Use `HydrogenStorefrontDeployment` to: -- Track deployment history and version information -- Access deployment metadata and timestamps -- View commit information for each deployment - -Deployments maintain immutable records of each release, providing audit trails for storefront changes. - -Learn more about [Hydrogen deployment workflows](https://shopify.dev/docs/storefronts/headless/hydrogen/deployments). -""" -type HydrogenStorefrontDeployment @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { - """ - The latest commit message for the deployment. - """ - commitMessage: String - - """ - The latest commit SHA for the deployment. - """ - commitSha: String - - """ - The date and time when the deployment was created. - """ - createdAt: DateTime! - - """ - The ID of the Hydrogen storefront deployment. - """ - id: ID! - - """ - The date and time when the deployment was created. - """ - updatedAt: DateTime! -} - -""" -Defines an environment context for a Hydrogen storefront, such as development, -staging, or production. Each environment maintains its own configuration and variables. - -For example, a storefront might have separate environments for testing new -features in development and serving customers in production, each with distinct -configuration values. - -Environments provide isolated contexts for storefront operations and configuration management. - -Learn more about [Hydrogen environments](https://shopify.dev/docs/custom-storefronts/hydrogen). -""" -type HydrogenStorefrontEnvironment @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { - """ - The branch associated with the custom storefront environment. - """ - branch: String - - """ - The date and time when the environment was created. - """ - createdAt: DateTime! - - """ - The handle of the custom storefront environment. - """ - handle: String - - """ - The ID of the custom storefront environment. - """ - id: ID! - - """ - The name of the custom storefront environment. - """ - name: String! - - """ - The type of hydrogen storefront environment. - """ - type: CustomStorefrontEnvironmentType! - - """ - The date and time when the environment was last updated. - """ - updatedAt: DateTime! - - """ - The URL of the custom storefront environment. - """ - url: URL -} - -""" -Configuration variables that customize how your Hydrogen storefront behaves -across different environments, letting you store key-value pairs for -configuration settings. - -For example, environment variables might store configuration values that differ -between development and production environments. - -Variables enable flexible storefront configuration without code changes across different deployment contexts. - -Learn more about [Hydrogen configuration](https://shopify.dev/docs/custom-storefronts/hydrogen). -""" -type HydrogenStorefrontEnvironmentVariable @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { - """ - The ID of the environment variable. - """ - id: ID! - - """ - Whether the environment variable is secret. - """ - isSecret: Boolean! - - """ - The key of the environment variable. - """ - key: String! - - """ - Whether the environment variable is read-only. - """ - readOnly: Boolean! - - """ - The value of the environment variable. - """ - value: String! -} - -""" -Return type for `hydrogenStorefrontEnvironmentVariableBulkReplace` mutation. -""" -type HydrogenStorefrontEnvironmentVariableBulkReplacePayload @componentName(name: "platform") { - """ - The created environment variables. - """ - environmentVariables: [HydrogenStorefrontEnvironmentVariable!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [EnvironmentVariablesUserError!]! -} - -""" -The input fields for environment variables. -""" -input HydrogenStorefrontEnvironmentVariableInput @componentName(name: "channels") { - """ - Whether the variable value is hidden from the user. - """ - isSecret: Boolean = false - - """ - The key for your environment variable. - """ - key: String! - - """ - The value of the environment variable. - """ - value: String! -} - -""" -Tracks long-running background operations for your Hydrogen storefront so you -can monitor progress without waiting around. When you kick off time-intensive -tasks that would normally timeout, the system creates a job that you can check -on periodically. - -For example, when performing operations that take time to complete, the system -creates a job that you can poll to track progress and completion status. - -Use the `HydrogenStorefrontJob` object to: -- Monitor operation progress -- Track the status of background tasks -- Handle asynchronous storefront management operations - -Jobs provide a reliable way to manage operations that may take several minutes -to complete, allowing your CLI tools to provide progress feedback without -maintaining long-lived connections. - -Learn more about [Hydrogen operations](https://shopify.dev/docs/custom-storefronts/hydrogen). -""" -type HydrogenStorefrontJob @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") @componentName(name: "channels") @privatelyDocumented { - """ - Indicates whether the job is done. - """ - done: Boolean! - - """ - The errors for the job. - """ - errors: [CliHydrogenStorefrontJobError!]! - - """ - The ID of the job. - """ - id: ID! - - """ - The results for the job. - """ - results: [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 - -""" -Details of a staff member's associated Shopify Identity. -""" -type IdentityAccount @requiredAccess(scope: "`read_users` access scope.") @componentName(name: "user_management") { - """ - The account settings page URL for the staff member. - """ - url: URL -} - -""" -Represents a customer's identity provider subject identifier. -""" -type IdentityProviderSubject implements Node @requiredAccess(scope: "The user must have access to manage identity providers.") @componentName(name: "access_and_auth") { - """ - The date and time when the provider subject was created. - """ - createdAt: DateTime! - - """ - A globally-unique ID for the provider subject. - """ - id: ID! - - """ - The merchant-configured name of the third-party identity provider. - """ - providerName: String - - """ - The unique subject identifier assigned to the customer by the authentication provider. - """ - subject: String! - - """ - The date and time when the provider subject was last updated. - """ - updatedAt: DateTime! -} - -""" -Represents an image resource. -""" -type Image implements HasMetafields & HasPublishedTranslations @componentName(name: "platform") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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( - """ - Crops the image according to the specified region. - """ - crop: CropRegion - - """ - Image height in pixels between 1 and 5760. - """ - maxHeight: Int - - """ - Image width in pixels between 1 and 5760. - """ - maxWidth: Int - - """ - Best effort conversion of image into content type (SVG -> PNG, Anything -> JPG, Anything -> WEBP are supported). - """ - preferredContentType: ImageContentType - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. - """ - scale: Int = 1 - ): 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 @gidTypes(types: ["Market"]) - ): [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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - A BMP image. - """ - BMP - - """ - A JPG image. - """ - JPG - - """ - A PNG image. - """ - PNG - - """ - A WEBP image. - """ - WEBP -} - -""" -An auto-generated type which holds one Image and a cursor during pagination. -""" -type ImageEdge @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - A word or phrase to share the nature or contents of an image. - """ - altText: String - - """ - A globally-unique ID. - """ - id: ID @gidTypes(types: ["CollectionImage", "ProductImage"]) - - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - Defines an arbitrary cropping region. - """ - cropRegion: CropRegionInput - - """ - Image height in pixels between 1 and 5760. - """ - maxHeight: Int - - """ - Image width in pixels between 1 and 5760. - """ - maxWidth: Int - - """ - 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 - - """ - Image size multiplier for high-resolution retina displays. Must be within 1..3. - """ - scale: Int = 1 -} - -""" -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 @componentName(name: "platform") { - """ - The parameter name. - """ - name: String! - - """ - The parameter value. - """ - value: String! -} - -""" -Answers the question if prices include duties and / or taxes. -""" -enum InclusiveDutiesPricingStrategy @componentName(name: "taxes") { - """ - 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 @componentName(name: "taxes") { - """ - 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 @componentName(name: "fulfillments") { - """ - The ID of the rejected line item. - """ - fulfillmentOrderLineItemId: ID! @gidTypes(types: ["FulfillmentOrderLineItem"]) - - """ - The rejection message of the line item. - """ - message: String -} - -""" -A string representing a choice of DDP or DDU configuration. -""" -enum IncotermConfiguration @componentName(name: "taxes") { - """ - Duties paid at delivery. - """ - DAP - - """ - Duties paid at checkout. - """ - DDP - - """ - Duties paid at delivery. - """ - DDU - - """ - This region is not supported. - """ - UNSUPPORTED -} - -""" -Represents whether the duties and international taxes are paid at the time of purchase or to be paid upon delivery. -""" -type IncotermInformation @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope or `read_draft_orders` access scope.") @componentName(name: "taxes") { - """ - The incoterm representing when duties and international taxes will be payed. - """ - incoterm: IncotermConfiguration - - """ - The reason why the incoterm was used for the order. - """ - reason: IncotermReason -} - -""" -A string representing the reason for an incoterm configuration on an order. -""" -enum IncotermReason @componentName(name: "taxes") { - """ - The incoterm was selected by the buyer during checkout. - """ - BUYER_CONFIGURED - - """ - The incoterm followed its default value of DDP, no configuration was specified. - """ - DEFAULT_DUTIES_AND_TAXES - - """ - Duties and import taxes are included in the product price. - """ - DUTY_AND_TAX_INCLUSIVE_PRICING - - """ - Duties are included in the product price. - """ - DUTY_INCLUSIVE_PRICING - - """ - The incoterm was determined by the duty and tax calculation fallback. - """ - DUTY_TAX_CALCULATION_FALLBACK - - """ - An error occured while attempting to calculate duties and taxes. - """ - ERROR_OCCURED - - """ - The incoterm was configured by Flow. - """ - FLOW_CONFIGURED - - """ - The incoterm was determined by the Low Value Goods Tax fallback. - """ - LOW_VALUE_GOODS_TAXES_APPLY - - """ - The incoterm is the result of a merchant configuration. - """ - PRE_CONFIGURED - - """ - The incoterm was determined by the Tax Calculation fallback. - """ - TAX_CALCULATION_FALLBACK - - """ - The destination country is unsupported. - """ - UNSUPPORTED @deprecated(reason: "Use UNSUPPORTED_REGION instead") - - """ - The destination country is unsupported. - """ - UNSUPPORTED_REGION -} - -""" -Return type for `inventoryActivate` mutation. -""" -type InventoryActivatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "inventory") { - """ - The quantity changes of items at locations to be made. - """ - changes: [InventoryChangeInput!]! - - """ - The quantity [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) - to be adjusted. - """ - name: String! - - """ - 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 -} - -""" -Return type for `inventoryAdjustQuantities` mutation. -""" -type InventoryAdjustQuantitiesPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The quantities couldn't be adjusted. Try again. - """ - ADJUST_QUANTITIES_FAILED - - """ - The changeFromQuantity argument no longer matches the persisted quantity. - """ - CHANGE_FROM_QUANTITY_STALE - - """ - 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 - - """ - 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 higher than 2,000,000,000. - """ - INVALID_QUANTITY_TOO_HIGH - - """ - The quantity can't be lower than -2,000,000,000. - """ - INVALID_QUANTITY_TOO_LOW - - """ - The specified reason is invalid. - """ - INVALID_REASON - - """ - The specified reference document is invalid. - """ - INVALID_REFERENCE_DOCUMENT - - """ - The inventory item is not stocked at the location. - """ - ITEM_NOT_STOCKED_AT_LOCATION - - """ - 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 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 service is temporarily unavailable. Try again later. - """ - SERVICE_UNAVAILABLE -} - -""" -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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { - """ - 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!] @gidTypes(types: ["InventoryItem"]) - - """ - The IDs of the locations to filter changes by. - """ - locationIds: [ID!] @gidTypes(types: ["Location"]) - - """ - The [names](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) - of 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 -} - -""" -An auto-generated type for paginating through multiple InventoryAdjustmentGroups. -""" -type InventoryAdjustmentGroupConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [InventoryAdjustmentGroupEdge!]! - - """ - A list of nodes that are contained in InventoryAdjustmentGroupEdge. 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: [InventoryAdjustmentGroup!]! - - """ - 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 InventoryAdjustmentGroup and a cursor during pagination. -""" -type InventoryAdjustmentGroupEdge @componentName(name: "inventory") { - """ - 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 InventoryAdjustmentGroupEdge. - """ - node: InventoryAdjustmentGroup! -} - -""" -The input fields required to adjust the available quantity of a product variant at a location. -""" -input InventoryAdjustmentInput @componentName(name: "merchandising") { - """ - 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. This field is - mandatory- you must explicitly pass in a value (even if it's `null`), or else - you will get an error. - """ - changeFromQuantity: Int - - """ - The ID of the location where the available quantity should be adjusted. - """ - locationId: ID! @gidTypes(types: ["Location"]) -} - -""" -The input fields to specify whether the inventory item should be activated or not at the specified location. -""" -input InventoryBulkToggleActivationInput @componentName(name: "inventory") { - """ - 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! - - """ - The ID of the location to modify the inventory item's stocked status. - """ - locationId: ID! @gidTypes(types: ["Location"]) -} - -""" -Return type for `inventoryBulkToggleActivation` mutation. -""" -type InventoryBulkToggleActivationPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - 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 committed quantities. - """ - COMMITTED_INVENTORY_AT_LOCATION - - """ - Failed to stock this inventory item at this location. - """ - FAILED_TO_STOCK_AT_LOCATION - - """ - Failed to unstock this inventory item from this location. - """ - FAILED_TO_UNSTOCK_FROM_LOCATION - - """ - An error occurred while setting the activation status. - """ - GENERIC_ERROR - - """ - Cannot unstock this inventory item from this location because it has incoming quantities. - """ - INCOMING_INVENTORY_AT_LOCATION - - """ - The inventory item was not found. - """ - INVENTORY_ITEM_NOT_FOUND - - """ - 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 - - """ - The location was not found. - """ - LOCATION_NOT_FOUND - - """ - Cannot stock this inventory item at this location because the variant is missing a SKU. - """ - MISSING_SKU - - """ - Cannot unstock this inventory item from this location because it has unavailable quantities. - """ - RESERVED_INVENTORY_AT_LOCATION -} - -""" -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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { - """ - 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 @componentName(name: "inventory") { - """ - 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 match the value you provide, then the mutation fails - with a `CHANGE_FROM_QUANTITY_STALE` error. This prevents unintended overwrites - when the request is based on stale inventory data. - - To skip the CAS check, pass `null`. Use this only when your system is the - source of truth for this inventory and you don’t need to protect against - concurrent updates. - This field is mandatory: you must explicitly pass in a value, even if that - value is `null`, or the mutation returns an error. - - 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 amount by which the inventory quantity will be changed. - """ - delta: Int! - - """ - Specifies the inventory item to which the change will be applied. - """ - inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) - - """ - 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 - - """ - Specifies the location at which the change will be applied. - """ - locationId: ID! @gidTypes(types: ["Location"]) -} - -""" -Return type for `inventoryDeactivate` mutation. -""" -type InventoryDeactivatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_inventory` access scope or `read_products` access scope.") @componentName(name: "inventory") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @requiredAccess(scope: "`read_inventory` access scope.") - - """ - 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 @requiredAccess(scope: "`read_inventory` access scope.") - - """ - The inventory item's quantities at the specified location. - """ - inventoryLevel( - """ - Whether to return the inventory level if it is inactive. - """ - includeInactive: Boolean = false - - """ - ID of the location for which the inventory level is requested. - """ - locationId: ID! @gidTypes(types: ["Location"]) - ): InventoryLevel @requiredAccess(scope: "`read_inventory` access scope.") - - """ - A list of the inventory item's quantities for each location that the inventory item can be stocked at. - """ - inventoryLevels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Whether to include inactive inventory levels. - """ - includeInactive: Boolean = false - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_group_id | id | - | inventory_item_id | id | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): InventoryLevelConnection! @requiredAccess(scope: "`read_inventory` access scope.") - - """ - The ID of the corresponding resource in the REST Admin API. - """ - legacyResourceId: UnsignedInt64! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - ): ProductVariantConnection -} - -""" -An auto-generated type for paginating through multiple InventoryItems. -""" -type InventoryItemConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "inventory") { - """ - 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 @componentName(name: "inventory") { - """ - Unit cost associated with the inventory item, the currency is the shop's default currency. - """ - cost: Decimal - - """ - 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 - - """ - List of country-specific harmonized system codes. - """ - countryHarmonizedSystemCodes: [CountryHarmonizedSystemCodeInput!] - - """ - The harmonized system code of the inventory item. This must be a number between 6 and 13 digits. - """ - harmonizedSystemCode: String - - """ - The measurements of an inventory item. - """ - measurement: InventoryItemMeasurementInput - - """ - 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 - - """ - 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 - - """ - The SKU (stock keeping unit) of the inventory item. - """ - sku: String - - """ - Whether the inventory item is tracked. - """ - tracked: 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 @requiredAccess(scope: "`read_inventory` access scope or `read_products` access scope.") @componentName(name: "inventory") { - """ - A globally-unique ID. - """ - id: ID! - - """ - The weight of the inventory item. - """ - weight: Weight -} - -""" -The input fields for an inventory item measurement. -""" -input InventoryItemMeasurementInput @componentName(name: "inventory") { - """ - Shipping package associated with inventory item. - """ - shippingPackageId: ID @gidTypes(types: ["ShippingPackageV2"]) - - """ - The weight of the inventory item. - """ - weight: WeightInput -} - -""" -Return type for `inventoryItemUpdate` mutation. -""" -type InventoryItemUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { - """ - The quantity of inventory items that are available at the inventory level's associated location. - """ - available: Int! @deprecated(reason: "Use the `quantities` field instead and specify available for names. Example: `quantities(names:[\"available\"]){name quantity}`.\n") - - """ - 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! - - """ - The quantity of inventory items that are going to the inventory level's associated location. - """ - incoming: Int! @deprecated(reason: "Use the `quantities` field instead and specify incoming for names. Example: `quantities(names:[\"incoming\"]){name quantity}`.\n") - - """ - Whether the inventory level is active. - """ - isActive: Boolean! - - """ - 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 - [names](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) - of the requested inventory quantities. - """ - names: [String!]! - ): [InventoryQuantity!]! - - """ - Scheduled changes for the requested quantity names. - """ - scheduledChanges( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | expected_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | quantity_names | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "inventory") { - """ - 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 @componentName(name: "inventory") { - """ - The available quantity of an inventory item at a location. - """ - availableQuantity: Int! - - """ - The ID of a location associated with the inventory level. - """ - locationId: ID! @gidTypes(types: ["Location"]) -} - -""" -The input fields required to move inventory quantities. -""" -input InventoryMoveQuantitiesInput @componentName(name: "inventory") { - """ - The quantity changes of items at locations to be made. - """ - changes: [InventoryMoveQuantityChange!]! - - """ - 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! -} - -""" -Return type for `inventoryMoveQuantities` mutation. -""" -type InventoryMoveQuantitiesPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The changeFromQuantity argument no longer matches the persisted quantity. - """ - CHANGE_FROM_QUANTITY_STALE - - """ - The quantities can't be moved between different locations. - """ - DIFFERENT_LOCATIONS - - """ - 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 - - """ - 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 inventory item is not stocked at the location. - """ - ITEM_NOT_STOCKED_AT_LOCATION - - """ - Only a maximum of 2 ledger document URIs across all changes is allowed. - """ - MAXIMUM_LEDGER_DOCUMENT_URIS - - """ - The quantities couldn't be moved. Try again. - """ - MOVE_QUANTITIES_FAILED - - """ - 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 quantity names for each change can't be the same. - """ - SAME_QUANTITY_NAME - - """ - The service is temporarily unavailable. Try again later. - """ - SERVICE_UNAVAILABLE -} - -""" -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 @componentName(name: "inventory") { - """ - Details about where the move will be made from. - """ - from: InventoryMoveQuantityTerminalInput! - - """ - Specifies the inventory item to which the change will be applied. - """ - inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) - - """ - The amount by which the inventory quantity will be changed. - """ - quantity: Int! - - """ - 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 @componentName(name: "inventory") { - """ - 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`. Use this only when your system is the - source of truth for this inventory and you don’t need to protect against - concurrent updates. - This field is mandatory: you must explicitly pass in a value, even if that - value is `null`, or the mutation returns an error. - - 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 - - """ - 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 - - """ - Specifies the location at which the change will be applied. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - The quantity - [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps#inventory-states) to be - moved. - """ - name: String! -} - -""" -General inventory properties for the shop. -""" -type InventoryProperties @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { - """ - 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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { - """ - 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 @componentName(name: "inventory") { - """ - 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`. Use this only when your system is the - source of truth for this inventory and you don’t need to protect against - concurrent updates. - This field is mandatory: you must explicitly pass in a value, even if that - value is `null`, or the mutation returns an error. - - 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 quantity will be set. - """ - inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) - - """ - Specifies the location at which the quantity will be set. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - The quantity to which the inventory quantity will be set. - """ - quantity: Int! -} - -""" -Details about an individual quantity name. -""" -type InventoryQuantityName @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { - """ - 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 @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "inventory") { - """ - 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 required to set inventory on hand quantities. -""" -input InventorySetOnHandQuantitiesInput @componentName(name: "inventory") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The changeFromQuantity argument no longer matches the persisted quantity. - """ - CHANGE_FROM_QUANTITY_STALE - - """ - The compareQuantity value does not match persisted value. - """ - COMPARE_QUANTITY_STALE - - """ - 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 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 total quantity can't be higher than 1,000,000,000. - """ - INVALID_QUANTITY_TOO_HIGH - - """ - The specified reason is invalid. - """ - INVALID_REASON - - """ - The specified reference document is invalid. - """ - INVALID_REFERENCE_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 - - """ - The service is temporarily unavailable. Try again later. - """ - SERVICE_UNAVAILABLE - - """ - The on-hand quantities couldn't be set. Try again. - """ - SET_ON_HAND_QUANTITIES_FAILED -} - -""" -The input fields required to set inventory quantities. -""" -input InventorySetQuantitiesInput @componentName(name: "inventory") { - """ - The name of quantities to be changed. The only accepted values are: `available` or `on_hand`. - """ - name: String! - - """ - The values to which each quantities will be set. - """ - quantities: [InventoryQuantityInput!]! - - """ - 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 -} - -""" -Return type for `inventorySetQuantities` mutation. -""" -type InventorySetQuantitiesPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The changeFromQuantity value does not match persisted value. - """ - CHANGE_FROM_QUANTITY_STALE - - """ - 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 - - """ - 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 specified inventory item could not be found. - """ - INVALID_INVENTORY_ITEM - - """ - The specified location could not be found. - """ - INVALID_LOCATION - - """ - The quantity name must be either 'available' or 'on_hand'. - """ - INVALID_NAME - - """ - The quantity can't be negative. - """ - INVALID_QUANTITY_NEGATIVE - - """ - 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 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 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 combination of inventoryItemId and locationId must be unique. - """ - NO_DUPLICATE_INVENTORY_ITEM_ID_GROUP_ID_PAIR -} - -""" -The input fields for the quantity to be set for an inventory item at a location. -""" -input InventorySetQuantityInput @componentName(name: "inventory") { - """ - The current quantity to be compared against the persisted quantity. This field - is mandatory- you must explicitly pass in a value (even if it's `null`), or - else you will get an error. 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 quantity will be set. - """ - inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) - - """ - Specifies the location at which the quantity will be set. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - The quantity to which the inventory quantity will be set. - """ - quantity: Int! -} - -""" -Represents an inventory shipment. -""" -type InventoryShipment implements Node @requiredAccess(scope: "`read_inventory_shipments` access scope.") @componentName(name: "inventory") { - """ - A unique barcode for the shipment. - """ - barcode: String - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): InventoryShipmentLineItemConnection - - """ - The number of line items associated with the inventory shipment. Limited to a maximum of 10000 by default. - """ - lineItemsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Failed to activate inventory at location. - """ - ACTIVATION_FAILED - - """ - A single item can't be listed twice. - """ - DUPLICATE_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 quantity is invalid. - """ - INVALID_QUANTITY - - """ - 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 item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The shipment was not found. - """ - SHIPMENT_NOT_FOUND - - """ - The item does not track inventory. - """ - UNTRACKED_ITEM -} - -""" -An auto-generated type for paginating through multiple InventoryShipments. -""" -type InventoryShipmentConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - A single item can't be listed twice. - """ - DUPLICATE_ITEM - - """ - The shipment input cannot be empty. - """ - EMPTY_SHIPMENT_INPUT - - """ - 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 - - """ - One or more items are not valid. - """ - INVALID_ITEM - - """ - The quantity is invalid. - """ - INVALID_QUANTITY - - """ - The shipment input is invalid. - """ - INVALID_SHIPMENT_INPUT - - """ - Current transfer status does not support this operation. - """ - INVALID_TRANSFER_STATUS - - """ - The URL is invalid. - """ - INVALID_URL - - """ - The item is not stocked at the intended location. - """ - INVENTORY_STATE_NOT_ACTIVE - - """ - The list of line items is empty. - """ - ITEMS_EMPTY - - """ - The item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The shipment was not found. - """ - SHIPMENT_NOT_FOUND - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND - - """ - The item does not track inventory. - """ - UNTRACKED_ITEM -} - -""" -The input fields to add a shipment. -""" -input InventoryShipmentCreateInput @componentName(name: "inventory") { - """ - A unique barcode for the shipment. - """ - barcode: String - - """ - The date the shipment was created. - """ - dateCreated: DateTime - - """ - The list of line items for the inventory shipment. - """ - lineItems: [InventoryShipmentLineItemInput!]! - - """ - The ID of the inventory movement (transfer or purchase order) this shipment belongs to. - """ - movementId: ID! @gidTypes(types: ["InventoryTransfer", "InventoryPurchaseOrder"]) - - """ - The tracking information for the shipment. - """ - trackingInput: InventoryShipmentTrackingInput -} - -""" -Return type for `inventoryShipmentCreate` mutation. -""" -type InventoryShipmentCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - This barcode is already assigned to another shipment. - """ - BARCODE_DUPLICATE - - """ - Barcode must be 255 characters or less. - """ - BARCODE_TOO_LONG - - """ - Bundled items cannot be used for this operation. - """ - BUNDLED_ITEM - - """ - A single item can't be listed twice. - """ - DUPLICATE_ITEM - - """ - The shipment input cannot be empty. - """ - EMPTY_SHIPMENT_INPUT - - """ - 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 - - """ - One or more items are not valid. - """ - INVALID_ITEM - - """ - The quantity is invalid. - """ - INVALID_QUANTITY - - """ - The shipment input is invalid. - """ - INVALID_SHIPMENT_INPUT - - """ - Current transfer status does not support this operation. - """ - INVALID_TRANSFER_STATUS - - """ - The URL is invalid. - """ - INVALID_URL - - """ - The item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND - - """ - The item does not track inventory. - """ - UNTRACKED_ITEM -} - -""" -Return type for `inventoryShipmentDelete` mutation. -""" -type InventoryShipmentDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Current shipment status does not support this operation. - """ - INVALID_SHIPMENT_STATUS - - """ - The shipment was not found. - """ - SHIPMENT_NOT_FOUND -} - -""" -An auto-generated type which holds one InventoryShipment and a cursor during pagination. -""" -type InventoryShipmentEdge @componentName(name: "inventory") { - """ - 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 @requiredAccess(scope: "`read_inventory_shipments` access scope.") @componentName(name: "inventory") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "inventory") { - """ - 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 @componentName(name: "inventory") { - """ - The inventory item ID for the shipment line item. - """ - inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) - - """ - The quantity for the shipment line item. - """ - quantity: Int! -} - -""" -Return type for `inventoryShipmentMarkInTransit` mutation. -""" -type InventoryShipmentMarkInTransitPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Failed to activate inventory at location. - """ - ACTIVATION_FAILED - - """ - The quantity is invalid. - """ - INVALID_QUANTITY - - """ - 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 list of line items is empty. - """ - ITEMS_EMPTY - - """ - The item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The shipment was not found. - """ - SHIPMENT_NOT_FOUND - - """ - The item does not track inventory. - """ - UNTRACKED_ITEM -} - -""" -The input fields to receive an item on an inventory shipment. -""" -input InventoryShipmentReceiveItemInput @componentName(name: "inventory") { - """ - The quantity for the item to be received. - """ - quantity: Int! - - """ - The reason for received item. - """ - reason: InventoryShipmentReceiveLineItemReason! - - """ - The shipment line item ID to be received. - """ - shipmentLineItemId: ID! @gidTypes(types: ["InventoryShipmentLineItem"]) -} - -""" -The reason for receiving a line item on an inventory shipment. -""" -enum InventoryShipmentReceiveLineItemReason @componentName(name: "inventory") { - """ - The line item was accepted. - """ - ACCEPTED - - """ - The line item was rejected. - """ - REJECTED -} - -""" -Return type for `inventoryShipmentReceive` mutation. -""" -type InventoryShipmentReceivePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - The quantity is invalid. - """ - INVALID_QUANTITY - - """ - 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 item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The shipment was not found. - """ - SHIPMENT_NOT_FOUND -} - -""" -Return type for `inventoryShipmentRemoveItems` mutation. -""" -type InventoryShipmentRemoveItemsPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - Current shipment status does not support this operation. - """ - INVALID_SHIPMENT_STATUS - - """ - The item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The shipment was not found. - """ - SHIPMENT_NOT_FOUND -} - -""" -Return type for `inventoryShipmentSetBarcode` mutation. -""" -type InventoryShipmentSetBarcodePayload @componentName(name: "platform") { - """ - The inventory shipment with the updated barcode. - """ - inventoryShipment: InventoryShipment - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [InventoryShipmentSetBarcodeUserError!]! -} - -""" -An error that occurs during the execution of `InventoryShipmentSetBarcode`. -""" -type InventoryShipmentSetBarcodeUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: InventoryShipmentSetBarcodeUserErrorCode - - """ - 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 `InventoryShipmentSetBarcodeUserError`. -""" -enum InventoryShipmentSetBarcodeUserErrorCode @componentName(name: "platform") { - """ - This barcode is already assigned to another shipment. - """ - BARCODE_DUPLICATE - - """ - Barcode must be 255 characters or less. - """ - BARCODE_TOO_LONG - - """ - The shipment was not found. - """ - SHIPMENT_NOT_FOUND -} - -""" -Return type for `inventoryShipmentSetTracking` mutation. -""" -type InventoryShipmentSetTrackingPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The URL is invalid. - """ - INVALID_URL - - """ - The shipment was not found. - """ - SHIPMENT_NOT_FOUND -} - -""" -The set of valid sort keys for the InventoryShipment query. -""" -enum InventoryShipmentSortKeys @componentName(name: "platform") { - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `status` value. - """ - STATUS -} - -""" -The status of an inventory shipment. -""" -enum InventoryShipmentStatus @componentName(name: "inventory") { - """ - The inventory shipment has been created but not yet shipped. - """ - DRAFT - - """ - The inventory shipment is currently in transit. - """ - IN_TRANSIT - - """ - Status not included in the current enumeration set. - """ - OTHER - - """ - The inventory shipment has been partially received at the destination. - """ - PARTIALLY_RECEIVED - - """ - The inventory shipment has been completely received at the destination. - """ - RECEIVED -} - -""" -Represents the tracking information for an inventory shipment. -""" -type InventoryShipmentTracking @requiredAccess(scope: "`read_inventory_shipments` access scope.") @componentName(name: "inventory") { - """ - 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 @componentName(name: "inventory") { - """ - The estimated date and time that the shipment will arrive. - """ - arrivesAt: DateTime - - """ - 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 tracking number for the shipment. - """ - trackingNumber: 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 input fields for a line item on an inventory shipment. -""" -input InventoryShipmentUpdateItemQuantitiesInput @componentName(name: "inventory") { - """ - The quantity for the shipment line item. - """ - quantity: Int! - - """ - The ID for the inventory shipment line item. - """ - shipmentLineItemId: ID! @gidTypes(types: ["InventoryShipmentLineItem"]) -} - -""" -Return type for `inventoryShipmentUpdateItemQuantities` mutation. -""" -type InventoryShipmentUpdateItemQuantitiesPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The quantity is invalid. - """ - INVALID_QUANTITY - - """ - Current shipment status does not support this operation. - """ - INVALID_SHIPMENT_STATUS - - """ - The item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The shipment was not found. - """ - SHIPMENT_NOT_FOUND -} - -""" -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 @requiredAccess(scope: "`read_inventory_transfers` access scope. Also: The user must have permission to view products.") @componentName(name: "inventory") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Filter line items to those matching specific inventory item IDs. - """ - inventoryItemIds: [ID!] @gidTypes(types: ["InventoryItem"]) - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): InventoryTransferLineItemConnection! - - """ - The number of line items associated with the inventory transfer. Limited to a maximum of 10000 by default. - """ - lineItemsCount( - """ - Filter line items to those matching specific inventory item IDs. - """ - inventoryItemIds: [ID!] @gidTypes(types: ["InventoryItem"]) - - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Current transfer status does not support this operation. - """ - INVALID_TRANSFER_STATUS - - """ - Shipment already exists for the transfer. - """ - SHIPMENT_EXISTS - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND -} - -""" -An auto-generated type for paginating through multiple InventoryTransfers. -""" -type InventoryTransferConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "inventory") { - """ - The date and time the inventory transfer was created. If left blank, defaults to the current date and time in UTC format. - """ - dateCreated: DateTime - - """ - The destination location for the inventory transfer. - """ - destinationLocationId: ID @gidTypes(types: ["Location"]) - - """ - The list of line items for the inventory transfer. - """ - lineItems: [InventoryTransferLineItemInput!]! = [] - - """ - A note to add to the Inventory Transfer. - """ - note: String - - """ - The origin location for the inventory transfer. - """ - originLocationId: ID @gidTypes(types: ["Location"]) - - """ - The reference name to add to the inventory transfer. - """ - referenceName: String - - """ - The tags to add to the inventory transfer. - """ - tags: [String!] -} - -""" -Return type for `inventoryTransferCreateAsReadyToShip` mutation. -""" -type InventoryTransferCreateAsReadyToShipPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Bundled items cannot be used for this operation. - """ - BUNDLED_ITEM - - """ - A single item can't be listed twice. - """ - DUPLICATE_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 quantity is invalid. - """ - INVALID_QUANTITY - - """ - Current transfer status does not support this operation. - """ - INVALID_TRANSFER_STATUS - - """ - The item is not stocked at the intended location. - """ - INVENTORY_STATE_NOT_ACTIVE - - """ - The list of line items is empty. - """ - ITEMS_EMPTY - - """ - The item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The location selected can't be found. - """ - LOCATION_NOT_FOUND - - """ - A location is required for this operation. - """ - LOCATION_REQUIRED - - """ - The tag exceeds the maximum length. - """ - TAG_EXCEEDS_MAX_LENGTH - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND - - """ - The origin location cannot be the same as the destination location. - """ - TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION - - """ - The item does not track inventory. - """ - UNTRACKED_ITEM -} - -""" -The input fields to create an inventory transfer. -""" -input InventoryTransferCreateInput @componentName(name: "inventory") { - """ - The date and time the inventory transfer was created. If left blank, defaults to the current date and time in UTC format. - """ - dateCreated: DateTime - - """ - The destination location for the inventory transfer. - """ - destinationLocationId: ID @gidTypes(types: ["Location"]) - - """ - The list of line items for the inventory transfer. - """ - lineItems: [InventoryTransferLineItemInput!]! = [] - - """ - A note to add to the Inventory Transfer. - """ - note: String - - """ - The origin location for the inventory transfer. - """ - originLocationId: ID @gidTypes(types: ["Location", "Supplier"]) - - """ - The reference name to add to the inventory transfer. - """ - referenceName: String - - """ - The tags to add to the inventory transfer. - """ - tags: [String!] -} - -""" -Return type for `inventoryTransferCreate` mutation. -""" -type InventoryTransferCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Bundled items cannot be used for this operation. - """ - BUNDLED_ITEM - - """ - A single item can't be listed twice. - """ - DUPLICATE_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 quantity is invalid. - """ - INVALID_QUANTITY - - """ - The item is not stocked at the intended location. - """ - INVENTORY_STATE_NOT_ACTIVE - - """ - The item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The location selected can't be found. - """ - LOCATION_NOT_FOUND - - """ - The tag exceeds the maximum length. - """ - TAG_EXCEEDS_MAX_LENGTH - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND - - """ - The origin location cannot be the same as the destination location. - """ - TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION - - """ - The item does not track inventory. - """ - UNTRACKED_ITEM -} - -""" -Return type for `inventoryTransferDelete` mutation. -""" -type InventoryTransferDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - A resource was not in the correct state for the operation to succeed. - """ - INVALID_STATE - - """ - Current transfer status does not support this operation. - """ - INVALID_TRANSFER_STATUS - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND -} - -""" -Return type for `inventoryTransferDuplicate` mutation. -""" -type InventoryTransferDuplicatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 transfer was not found. - """ - TRANSFER_NOT_FOUND -} - -""" -An auto-generated type which holds one InventoryTransfer and a cursor during pagination. -""" -type InventoryTransferEdge @componentName(name: "inventory") { - """ - 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 @componentName(name: "inventory") { - """ - The date the inventory transfer was created. - """ - dateCreated: Date - - """ - The destination location for the inventory transfer. The destination location can only be - changed for draft transfers. - """ - destinationId: ID @gidTypes(types: ["Location"]) - - """ - A note to add to the Inventory Transfer. - """ - note: String - - """ - The origin location for the inventory transfer. The origin location can only be changed - for draft transfers. - """ - originId: ID @gidTypes(types: ["Location", "Supplier"]) - - """ - The reference name to add to the inventory transfer. - """ - referenceName: String - - """ - The tags to add to the inventory transfer. - """ - tags: [String!] -} - -""" -Return type for `inventoryTransferEdit` mutation. -""" -type InventoryTransferEditPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The item is not stocked at the intended location. - """ - INVENTORY_STATE_NOT_ACTIVE - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The location selected can't be found. - """ - LOCATION_NOT_FOUND - - """ - The tag exceeds the maximum length. - """ - TAG_EXCEEDS_MAX_LENGTH - - """ - The location of a transfer cannot be updated. Only Draft Transfers can mutate their locations. - """ - TRANSFER_LOCATION_IMMUTABLE - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND - - """ - The origin location cannot be the same as the destination location. - """ - TRANSFER_ORIGIN_CANNOT_BE_THE_SAME_AS_DESTINATION -} - -""" -Represents a line item belonging to an inventory transfer. -""" -type InventoryTransferLineItem implements Node @requiredAccess(scope: "`read_inventory_transfers` access scope. Also: The user must have permission to view products.") @componentName(name: "inventory") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "inventory") { - """ - 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 @componentName(name: "inventory") { - """ - The inventory item ID for the transfer line item. - """ - inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) - - """ - The quantity for the transfer line item. - """ - quantity: Int! -} - -""" -Represents an update to a single transfer line item. -""" -type InventoryTransferLineItemUpdate @requiredAccess(scope: "`read_inventory` access scope.") @componentName(name: "inventory") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - One or more items are not valid. - """ - INVALID_ITEM - - """ - Current transfer status does not support this operation. - """ - INVALID_TRANSFER_STATUS - - """ - The list of line items is empty. - """ - ITEMS_EMPTY - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The location selected can't be found. - """ - LOCATION_NOT_FOUND - - """ - A location is required for this operation. - """ - LOCATION_REQUIRED - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND -} - -""" -The input fields to remove inventory items from a transfer. -""" -input InventoryTransferRemoveItemsInput @componentName(name: "inventory") { - """ - The ID of the inventory transfer where the items will be removed. - """ - id: ID! @gidTypes(types: ["InventoryTransfer"]) - - """ - 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!] @gidTypes(types: ["InventoryTransferLineItem"]) -} - -""" -Return type for `inventoryTransferRemoveItems` mutation. -""" -type InventoryTransferRemoveItemsPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - 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 - - """ - Current transfer status does not support this operation. - """ - INVALID_TRANSFER_STATUS - - """ - The item was not found. - """ - ITEM_NOT_FOUND - - """ - The line item cannot be removed because it appears on a draft shipment with quantity `0`. - """ - ITEM_PRESENT_ON_DRAFT_SHIPMENT_WITH_ZERO_QUANTITY - - """ - The location selected can't be found. - """ - LOCATION_NOT_FOUND - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND -} - -""" -The input fields to the InventoryTransferSetItems mutation. -""" -input InventoryTransferSetItemsInput @componentName(name: "inventory") { - """ - The ID of the inventory transfer where the items will be set. - """ - id: ID! @gidTypes(types: ["InventoryTransfer"]) - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Bundled items cannot be used for this operation. - """ - BUNDLED_ITEM - - """ - A single item can't be listed twice. - """ - DUPLICATE_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 quantity is invalid. - """ - INVALID_QUANTITY - - """ - Current transfer status does not support this operation. - """ - INVALID_TRANSFER_STATUS - - """ - The item is not stocked at the intended location. - """ - INVENTORY_STATE_NOT_ACTIVE - - """ - The item was not found. - """ - ITEM_NOT_FOUND - - """ - The location selected is not active. - """ - LOCATION_NOT_ACTIVE - - """ - The location selected can't be found. - """ - LOCATION_NOT_FOUND - - """ - The transfer was not found. - """ - TRANSFER_NOT_FOUND - - """ - The item does not track inventory. - """ - UNTRACKED_ITEM -} - -""" -The status of a transfer. -""" -enum InventoryTransferStatus @componentName(name: "inventory") { - """ - The inventory transfer has been canceled. - """ - CANCELED - - """ - The inventory transfer has been created but not yet finalized. - """ - DRAFT - - """ - The inventory transfer is in progress, with a shipment currently underway or received. - """ - IN_PROGRESS - - """ - Status not included in the current enumeration set. - """ - OTHER - - """ - The inventory transfer has been created, but not yet shipped. - """ - READY_TO_SHIP - - """ - The inventory transfer has been completely received at the destination. - """ - TRANSFERRED -} - -""" -The financial transfer details for a return outcome that results in an invoice. -""" -type InvoiceReturnOutcome @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - Church Slavic. - """ - CU - - """ - 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. - """ - PT - - """ - 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 - - """ - Volapük. - """ - VO - - """ - Wolof. - """ - WO - - """ - Xhosa. - """ - XH - - """ - Yiddish. - """ - YI - - """ - Yoruba. - """ - YO - - """ - Chinese. - """ - ZH - - """ - Chinese (Simplified). - """ - ZH_CN - - """ - Chinese (Traditional). - """ - ZH_TW - - """ - Zulu. - """ - ZU -} - -""" -The input fields for customer information in lead capture. -""" -input LeadCaptureCustomerInput @componentName(name: "marketplaces") @privatelyDocumented { - """ - The email address of the captured lead. - """ - email: String! -} - -""" -The input fields for discount information in lead capture. -""" -input LeadCaptureDiscountInput @componentName(name: "marketplaces") @privatelyDocumented { - """ - The code to use the discount. Must be unique to the shop. - """ - code: String! - - """ - The items in the order that qualify for the discount, their quantities, and the total value of the discount. - """ - customerGets: DiscountCustomerGetsInput! - - """ - 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 discount's name that displays to merchants in the Shopify admin and to customers. - """ - title: String! -} - -""" -Return type for `leadCaptureForDiscount` mutation. -""" -type LeadCaptureForDiscountPayload @componentName(name: "platform") @privatelyDocumented { - """ - The discount created. - """ - discountNode: DiscountNode - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [DiscountUserError!]! -} - -""" -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 @componentName(name: "platform") { - """ - The ID of the corresponding resource in the REST Admin API. - """ - legacyResourceId: UnsignedInt64! -} - -""" -Units of measurement for length. -""" -enum LengthUnit @componentName(name: "platform") { - """ - 100 centimeters equals 1 meter. - """ - CENTIMETERS - - """ - Imperial system unit of length. - """ - FEET - - """ - 12 inches equals 1 foot. - """ - INCHES - - """ - Metric system unit of length. - """ - METERS - - """ - 1000 millimeters equals 1 meter. - """ - MILLIMETERS - - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "shop_identity") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { - """ - 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( - """ - Crops the image according to the specified region. - """ - crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") - - """ - Image height in pixels between 1 and 2048. - """ - maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") - - """ - Image width in pixels between 1 and 2048. - """ - maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 total price of the line item in shop and presentment currencies, - after all discounts are applied and excluding refunded and removed quantities. - This value doesn't include taxes. - """ - priceAfterAllDiscountsBeforeTaxesSet: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - The weight of a line item unit. - """ - weight: Weight -} - -""" -An auto-generated type for paginating through multiple LineItems. -""" -type LineItemConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "online_store") { - """ - 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 @gidTypes(types: ["Market"]) - ): [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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The key of the metafield this option is linked to. - """ - key: String! - - """ - The namespace of the metafield this option is linked to. - """ - namespace: String! - - """ - Values associated with the option. - """ - values: [String!] -} - -""" -The input fields for linking a combined listing option to a metafield. -""" -input LinkedMetafieldInput @componentName(name: "merchandising") { - """ - The key of the linked metafield. - """ - key: String! - - """ - The namespace of the linked metafield. - """ - namespace: 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 @componentName(name: "merchandising") { - """ - The key of the metafield this option is linked to. - """ - key: String! - - """ - The namespace of the metafield this option is linked to. - """ - namespace: String! -} - -""" -Local payment methods payment details related to a transaction. -""" -type LocalPaymentMethodsPaymentDetails implements BasePaymentDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "markets") { - """ - A file reference. - """ - FILE_REFERENCE - - """ - An HTML. - """ - HTML - - """ - An inline rich text. - """ - INLINE_RICH_TEXT - - """ - A JSON. - """ - JSON - - """ - A JSON string. - """ - JSON_STRING - - """ - A link. - """ - LINK - - """ - A list of file references. - """ - LIST_FILE_REFERENCE - - """ - 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 URI. - """ - URI - - """ - A URL. - """ - URL -} - -""" -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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "apps") { - """ - The key for the localization extension. - """ - key: LocalizationExtensionKey! - - """ - The localization extension value. - """ - value: String! -} - -""" -The key of a localization extension. -""" -enum LocalizationExtensionKey @componentName(name: "platform") { - """ - Extension key 'shipping_credential_br' for country BR. - """ - SHIPPING_CREDENTIAL_BR - - """ - Extension key 'shipping_credential_cl' for country CL. - """ - SHIPPING_CREDENTIAL_CL - - """ - Extension key 'shipping_credential_cn' for country CN. - """ - SHIPPING_CREDENTIAL_CN - - """ - Extension key 'shipping_credential_co' for country CO. - """ - SHIPPING_CREDENTIAL_CO - - """ - Extension key 'shipping_credential_cr' for country CR. - """ - SHIPPING_CREDENTIAL_CR - - """ - Extension key 'shipping_credential_ec' for country EC. - """ - SHIPPING_CREDENTIAL_EC - - """ - Extension key 'shipping_credential_es' for country ES. - """ - SHIPPING_CREDENTIAL_ES - - """ - Extension key 'shipping_credential_gt' for country GT. - """ - SHIPPING_CREDENTIAL_GT - - """ - Extension key 'shipping_credential_id' for country ID. - """ - SHIPPING_CREDENTIAL_ID - - """ - Extension key 'shipping_credential_kr' for country KR. - """ - SHIPPING_CREDENTIAL_KR - - """ - Extension key 'shipping_credential_mx' for country MX. - """ - SHIPPING_CREDENTIAL_MX - - """ - Extension key 'shipping_credential_my' for country MY. - """ - SHIPPING_CREDENTIAL_MY - - """ - Extension key 'shipping_credential_pe' for country PE. - """ - SHIPPING_CREDENTIAL_PE - - """ - Extension key 'shipping_credential_pt' for country PT. - """ - SHIPPING_CREDENTIAL_PT - - """ - Extension key 'shipping_credential_py' for country PY. - """ - SHIPPING_CREDENTIAL_PY - - """ - Extension key 'shipping_credential_tr' for country TR. - """ - SHIPPING_CREDENTIAL_TR - - """ - Extension key 'shipping_credential_tw' for country TW. - """ - SHIPPING_CREDENTIAL_TW - - """ - Extension key 'shipping_credential_type_co' for country CO. - """ - SHIPPING_CREDENTIAL_TYPE_CO - - """ - Extension key 'tax_credential_br' for country BR. - """ - TAX_CREDENTIAL_BR - - """ - Extension key 'tax_credential_cl' for country CL. - """ - TAX_CREDENTIAL_CL - - """ - Extension key 'tax_credential_co' for country CO. - """ - TAX_CREDENTIAL_CO - - """ - Extension key 'tax_credential_cr' for country CR. - """ - TAX_CREDENTIAL_CR - - """ - Extension key 'tax_credential_ec' for country EC. - """ - TAX_CREDENTIAL_EC - - """ - Extension key 'tax_credential_es' for country ES. - """ - TAX_CREDENTIAL_ES - - """ - Extension key 'tax_credential_gt' for country GT. - """ - TAX_CREDENTIAL_GT - - """ - Extension key 'tax_credential_id' for country ID. - """ - TAX_CREDENTIAL_ID - - """ - Extension key 'tax_credential_it' for country IT. - """ - TAX_CREDENTIAL_IT - - """ - Extension key 'tax_credential_mx' for country MX. - """ - TAX_CREDENTIAL_MX - - """ - Extension key 'tax_credential_my' for country MY. - """ - TAX_CREDENTIAL_MY - - """ - Extension key 'tax_credential_pe' for country PE. - """ - TAX_CREDENTIAL_PE - - """ - Extension key 'tax_credential_pt' for country PT. - """ - TAX_CREDENTIAL_PT - - """ - Extension key 'tax_credential_py' for country PY. - """ - TAX_CREDENTIAL_PY - - """ - Extension key 'tax_credential_tr' for country TR. - """ - TAX_CREDENTIAL_TR - - """ - Extension key 'tax_credential_type_co' for country CO. - """ - TAX_CREDENTIAL_TYPE_CO - - """ - 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_email_it' for country IT. - """ - TAX_EMAIL_IT -} - -""" -The purpose of a localization extension. -""" -enum LocalizationExtensionPurpose @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "apps") { - """ - The key for the localized field. - """ - key: LocalizedFieldKey! - - """ - The localized field value. - """ - value: String! -} - -""" -The key of a localized field. -""" -enum LocalizedFieldKey @componentName(name: "platform") { - """ - Localized field key 'shipping_credential_br' for country Brazil. - """ - SHIPPING_CREDENTIAL_BR - - """ - 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 'shipping_credential_co' for country Colombia. - """ - SHIPPING_CREDENTIAL_CO - - """ - Localized field key 'shipping_credential_cr' for country Costa Rica. - """ - SHIPPING_CREDENTIAL_CR - - """ - Localized field key 'shipping_credential_ec' for country Ecuador. - """ - SHIPPING_CREDENTIAL_EC - - """ - Localized field key 'shipping_credential_es' for country Spain. - """ - SHIPPING_CREDENTIAL_ES - - """ - Localized field key 'shipping_credential_gt' for country Guatemala. - """ - SHIPPING_CREDENTIAL_GT - - """ - Localized field key 'shipping_credential_id' for country Indonesia. - """ - SHIPPING_CREDENTIAL_ID - - """ - Localized field key 'shipping_credential_kr' for country South Korea. - """ - SHIPPING_CREDENTIAL_KR - - """ - Localized field key 'shipping_credential_mx' for country Mexico. - """ - SHIPPING_CREDENTIAL_MX - - """ - Localized field key 'shipping_credential_my' for country Malaysia. - """ - SHIPPING_CREDENTIAL_MY - - """ - Localized field key 'shipping_credential_pe' for country Peru. - """ - SHIPPING_CREDENTIAL_PE - - """ - Localized field key 'shipping_credential_pt' for country Portugal. - """ - SHIPPING_CREDENTIAL_PT - - """ - Localized field key 'shipping_credential_py' for country Paraguay. - """ - SHIPPING_CREDENTIAL_PY - - """ - Localized field key 'shipping_credential_tr' for country Turkey. - """ - SHIPPING_CREDENTIAL_TR - - """ - Localized field key 'shipping_credential_tw' for country Taiwan. - """ - SHIPPING_CREDENTIAL_TW - - """ - Localized field key 'shipping_credential_type_co' for country Colombia. - """ - SHIPPING_CREDENTIAL_TYPE_CO - - """ - Localized field key 'tax_credential_br' for country Brazil. - """ - TAX_CREDENTIAL_BR - - """ - Localized field key 'tax_credential_cl' for country Chile. - """ - TAX_CREDENTIAL_CL - - """ - Localized field key 'tax_credential_co' for country Colombia. - """ - TAX_CREDENTIAL_CO - - """ - Localized field key 'tax_credential_cr' for country Costa Rica. - """ - TAX_CREDENTIAL_CR - - """ - Localized field key 'tax_credential_ec' for country Ecuador. - """ - TAX_CREDENTIAL_EC - - """ - Localized field key 'tax_credential_es' for country Spain. - """ - TAX_CREDENTIAL_ES - - """ - Localized field key 'tax_credential_gt' for country Guatemala. - """ - TAX_CREDENTIAL_GT - - """ - Localized field key 'tax_credential_id' for country Indonesia. - """ - TAX_CREDENTIAL_ID - - """ - Localized field key 'tax_credential_it' for country Italy. - """ - TAX_CREDENTIAL_IT - - """ - Localized field key 'tax_credential_mx' for country Mexico. - """ - TAX_CREDENTIAL_MX - - """ - Localized field key 'tax_credential_my' for country Malaysia. - """ - TAX_CREDENTIAL_MY - - """ - Localized field key 'tax_credential_pe' for country Peru. - """ - TAX_CREDENTIAL_PE - - """ - Localized field key 'tax_credential_pt' for country Portugal. - """ - TAX_CREDENTIAL_PT - - """ - Localized field key 'tax_credential_py' for country Paraguay. - """ - TAX_CREDENTIAL_PY - - """ - Localized field key 'tax_credential_tr' for country Turkey. - """ - TAX_CREDENTIAL_TR - - """ - Localized field key 'tax_credential_type_co' for country Colombia. - """ - TAX_CREDENTIAL_TYPE_CO - - """ - 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_email_it' for country Italy. - """ - TAX_EMAIL_IT -} - -""" -The purpose of a localized field. -""" -enum LocalizedFieldPurpose @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_locations` access scope, `read_inventory` access scope or `read_markets_home` access scope.") @componentName(name: "shop_identity") { - """ - 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! @requiredAccess(scope: "`read_locations` access scope.") - - """ - The address of this location. - """ - address: LocationAddress! @requiredAccess(scope: "`read_locations` access scope.") - - """ - Whether the location address has been verified. - """ - addressVerified: Boolean! @requiredAccess(scope: "`read_locations` access scope.") - - """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) that the location was added to a shop. - """ - createdAt: DateTime! @requiredAccess(scope: "`read_locations` access scope.") - - """ - 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! @requiredAccess(scope: "`read_locations` access scope.") - - """ - 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 @requiredAccess(scope: "`read_locations` access scope.") - - """ - Whether this location can be deleted. - """ - deletable: Boolean! @requiredAccess(scope: "`read_locations` access scope.") - - """ - Name of the service provider that fulfills from this location. - """ - fulfillmentService: FulfillmentService @requiredAccess(scope: "`read_locations` access scope.") - - """ - Whether this location can fulfill online orders. - """ - fulfillsOnlineOrders: Boolean! @requiredAccess(scope: "`read_locations` access scope.") - - """ - Whether this location has active inventory. - """ - hasActiveInventory: Boolean! @requiredAccess(scope: "`read_locations` access scope.") - - """ - Whether this location has orders that need to be fulfilled. - """ - hasUnfulfilledOrders: Boolean! @requiredAccess(scope: "`read_locations` access scope.") - - """ - A globally-unique ID. - """ - id: ID! @requiredAccess(scope: "`read_locations` access scope, `read_inventory` access scope or `read_markets_home` access scope.") - - """ - The quantities of an inventory item at this location. - """ - inventoryLevel( - """ - Whether to return the inventory level if it is inactive. - """ - includeInactive: Boolean = false - - """ - The ID of the inventory item to obtain the inventory level for. - """ - inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) - ): InventoryLevel @requiredAccess(scope: "`read_locations` access scope.") - - """ - A list of the quantities of the inventory items that can be stocked at this location. - """ - inventoryLevels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Whether to include inactive inventory levels. - """ - includeInactive: Boolean = false - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_group_id | id | - | inventory_item_id | id | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): InventoryLevelConnection! @requiredAccess(scope: "`read_locations` access scope.") - - """ - 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! @requiredAccess(scope: "`read_locations` access scope.") - - """ - Whether this location is a fulfillment service. - """ - isFulfillmentService: Boolean! @requiredAccess(scope: "`read_locations` access scope.") - - """ - 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") @requiredAccess(scope: "`read_locations` access scope.") - - """ - The ID of the corresponding resource in the REST Admin API. - """ - legacyResourceId: UnsignedInt64! - - """ - Local pickup settings for the location. - """ - localPickupSettingsV2: DeliveryLocalPickupSettings @requiredAccess(scope: "`read_locations` access scope.") - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - The name of the location. - """ - name: String! @requiredAccess(scope: "`read_locations` access scope or `read_markets_home` access scope.") - - """ - Legacy field indicating this location was designated for shipping. All locations with valid addresses can now ship. - """ - shipsInventory: Boolean! @requiredAccess(scope: "`read_locations` access scope.") - - """ - List of suggested addresses for this location (empty if none). - """ - suggestedAddresses: [LocationSuggestedAddress!]! @requiredAccess(scope: "`read_locations` access scope.") - - """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the location was last updated. - """ - updatedAt: DateTime! @requiredAccess(scope: "`read_locations` access scope.") -} - -""" -Return type for `locationActivate` mutation. -""" -type LocationActivatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_locations` access scope.") @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - An error occurred while activating the location. - """ - GENERIC_ERROR - - """ - There is already an active location with this name. - """ - HAS_NON_UNIQUE_NAME - - """ - This location currently cannot be activated as inventory, pending orders or - transfers are being relocated from this location. - """ - HAS_ONGOING_RELOCATION - - """ - 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 - - """ - Shop has reached its location limit. - """ - LOCATION_LIMIT - - """ - Location not found. - """ - LOCATION_NOT_FOUND -} - -""" -The input fields to use to specify the address while adding a location. -""" -input LocationAddAddressInput @componentName(name: "shop_identity") { - """ - 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 two-letter code of country for the address. - """ - countryCode: CountryCode! - - """ - The phone number of the location. - """ - phone: String - - """ - 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 ZIP code or postal code of the address. - """ - zip: String -} - -""" -The input fields to use to add a location. -""" -input LocationAddInput @componentName(name: "shop_identity") { - """ - 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!] - - """ - The name of the location. - """ - name: String! -} - -""" -Return type for `locationAdd` mutation. -""" -type LocationAddPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_locations` access scope.") @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - ApiPermission metafields can only be created or updated by the app owner. - """ - APP_NOT_AUTHORIZED - - """ - The input value is blank. - """ - BLANK - - """ - The metafield violates a capability restriction. - """ - CAPABILITY_VIOLATION - - """ - Owner type can't be used in this mutation. - """ - DISALLOWED_OWNER_TYPE - - """ - An error occurred while adding the location. - """ - GENERIC_ERROR - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - The type is invalid. - """ - INVALID_TYPE - - """ - The ZIP code is not a valid US ZIP code. - """ - INVALID_US_ZIPCODE - - """ - The value is invalid for the metafield type or for the definition options. - """ - INVALID_VALUE - - """ - 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 - - """ - Unstructured reserved namespace. - """ - UNSTRUCTURED_RESERVED_NAMESPACE -} - -""" -Represents the address of a location. -""" -type LocationAddress @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_locations` access scope.") @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - At least one location must fulfill online orders. - """ - CANNOT_DISABLE_ONLINE_ORDER_FULFILLMENT - - """ - 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 - - """ - Failed to relocate active inventories to the destination location. - """ - FAILED_TO_RELOCATE_ACTIVE_INVENTORIES - - """ - Failed to relocate incoming movements to the destination location. - """ - FAILED_TO_RELOCATE_INCOMING_MOVEMENTS - - """ - Failed to relocate open purchase orders to the destination location. - """ - FAILED_TO_RELOCATE_OPEN_PURCHASE_ORDERS - - """ - Location could not be deactivated without specifying where to relocate inventory at the location. - """ - HAS_ACTIVE_INVENTORY_ERROR - - """ - Location needs to be removed from Shopify POS for Retail subscription in Point of Sale channel. - """ - HAS_ACTIVE_RETAIL_SUBSCRIPTIONS - - """ - 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 purchase orders. - """ - HAS_OPEN_PURCHASE_ORDERS_ERROR - - """ - 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 - - """ - 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 -} - -""" -Return type for `locationDelete` mutation. -""" -type LocationDeletePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_locations` access scope.") @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - An error occurred while deleting the location. - """ - GENERIC_ERROR - - """ - The location cannot be deleted while it has any active Retail subscriptions in the Point of Sale channel. - """ - LOCATION_HAS_ACTIVE_RETAIL_SUBSCRIPTION - - """ - 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 is active. - """ - LOCATION_IS_ACTIVE - - """ - Location not found. - """ - LOCATION_NOT_FOUND -} - -""" -An auto-generated type which holds one Location and a cursor during pagination. -""" -type LocationEdge @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "shop_identity") { - """ - 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 two-letter code of country for the address. - """ - countryCode: CountryCode - - """ - The phone number of the location. - """ - phone: String - - """ - 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 ZIP code or postal code of the location. - """ - zip: String -} - -""" -The input fields to use to edit a location. -""" -input LocationEditInput @componentName(name: "shop_identity") { - """ - 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!] - - """ - The name of the location. - """ - name: String -} - -""" -Return type for `locationEdit` mutation. -""" -type LocationEditPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_locations` access scope or `read_fulfillments` access scope.") @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - ApiPermission metafields can only be created or updated by the app owner. - """ - APP_NOT_AUTHORIZED - - """ - The input value is blank. - """ - BLANK - - """ - 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 metafield violates a capability restriction. - """ - CAPABILITY_VIOLATION - - """ - Owner type can't be used in this mutation. - """ - DISALLOWED_OWNER_TYPE - - """ - An error occurred while editing the location. - """ - GENERIC_ERROR - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - The type is invalid. - """ - INVALID_TYPE - - """ - The ZIP code is not a valid US ZIP code. - """ - INVALID_US_ZIPCODE - - """ - The value is invalid for the metafield type or for the definition options. - """ - INVALID_VALUE - - """ - 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 long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT - - """ - Unstructured reserved namespace. - """ - UNSTRUCTURED_RESERVED_NAMESPACE -} - -""" -The input fields for identifying a location. -""" -input LocationIdentifierInput @oneOf @componentName(name: "shop_identity") { - """ - The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the location. - """ - customId: UniqueMetafieldValueInput - - """ - The ID of the location. - """ - id: ID -} - -""" -Return type for `locationLocalPickupDisable` mutation. -""" -type LocationLocalPickupDisablePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "shop_identity") { - """ - The application level for the condition. - """ - applicationLevel: MarketConditionApplicationType - - """ - The locations that comprise the market. - """ - locations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): LocationConnection! -} - -""" -Signals that indicate whether prices should be locked for draft order. -""" -enum LockDraftOrderPricesForBuyer @componentName(name: "draft_orders") { - """ - Ensure all variant-backed line items have price overrides. Preserves existing - overrides, or creates new ones from a line item's current price. - """ - LOCKALL - - """ - Leave current line item price overrides unchanged. - """ - NOCHANGE - - """ - Remove price overrides from all line items. - """ - UNLOCKALL -} - -""" -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 @componentName(name: "platform") @protectedObject(subject: "customer") { - """ - The first line of the address. Typically the street address or PO Box number. - """ - address1: String @protectedField(subject: "customer", content: "address") - - """ - The second line of the address. Typically the number of the apartment, suite, or unit. - """ - address2: String @protectedField(subject: "customer", content: "address") - - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - A formatted version of the address, customized by the provided arguments. - """ - formatted( - """ - Whether to include the customer's company in the formatted address. - """ - withCompany: Boolean = true - - """ - Whether to include the customer's name in the formatted address. - """ - withName: Boolean = false - ): [String!]! @protectedField(subject: "customer", content: "address") - - """ - 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 @protectedField(subject: "customer", content: "name") - - """ - The latitude coordinate of the customer address. - """ - latitude: Float @protectedField(subject: "customer", content: "address") - - """ - The longitude coordinate of the customer address. - """ - longitude: Float @protectedField(subject: "customer", content: "address") - - """ - The full name of the customer, based on firstName and lastName. - """ - name: String @protectedField(subject: "customer", content: "name") - - """ - A unique phone number for the customer. - """ - phone: String @protectedField(subject: "customer", content: "phone") - - """ - 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 is 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 @protectedField(subject: "customer", content: "address") -} - -""" -An auto-generated type for paginating through multiple MailingAddresses. -""" -type MailingAddressConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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.") @gidTypes(types: ["MailingAddress"]) - - """ - 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 @componentName(name: "platform") { - """ - Indicates that the address has been validated and is very likely to contain invalid information. - """ - ERROR - - """ - Indicates that the address has been validated and no issues were found. - """ - NO_ISSUES - - """ - 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 @componentName(name: "payments") { - """ - A credential stored on file for checkout. - """ - CHECKOUT - - """ - A credential stored on file for merchant and customer initiated transactions. - """ - CREDENTIAL_ON_FILE - - """ - 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - 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! @gidTypes(types: ["CheckoutProfile", "WebPresence", "Catalog", "MarketCatalog", "DummyGraphQlType", "CurrencySettings", "JsonTemplate", "ThemeType", "RetailSettings", "RetailScreenLock", "Layout", "RetailCheckoutValidationRule", "RetailBuyerLedReceiptsSettings"]) - ): Boolean! - - """ - The catalogs that belong to the market. - """ - catalogs( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MarketCatalogConnection! - - """ - The number of catalogs that belong to the market. - """ - catalogsCount: Count - - """ - The channels associated with this market. - """ - channels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection - - """ - The number of channels associated with this market. - """ - channelsCount: Count - - """ - The conditions under which a visitor is in the market. - """ - conditions: MarketConditions - - """ - The market’s currency settings. - """ - currencySettings: MarketCurrencySettings - - """ - The discounts that are available in this market. - """ - discounts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DiscountNodeConnection - - """ - The number of discounts that are assigned to this market. - """ - discountsCount: Count - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - A globally-unique ID. - """ - id: ID! - - """ - The markets associated with the catalog. - """ - markets( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Filters markets by status. - """ - status: MarketStatus = null - - """ - Filters markets by type. - """ - type: MarketType = null - ): MarketConnection! - - """ - The number of markets associated with the catalog. - """ - marketsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | market_condition_types | string | A comma-separated list of condition types. | - | market_type | string | - | name | string | - | status | string | | - `ACTIVE`
- `DRAFT` | - | wildcard_company_location_with_country_code | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Filters markets by status. - """ - status: MarketStatus = null - - """ - Filters markets by type. - """ - type: MarketType = null - ): Count @requiredAccess(scope: "`read_products` access scope.") - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "markets") { - """ - The condition matches all records of a given type. - """ - ALL - - """ - The condition matches specified records of a given type. - """ - SPECIFIED -} - -""" -The condition types for the condition set. -""" -enum MarketConditionType @componentName(name: "markets") { - """ - The condition checks the channel that the visitor is shopping from. - """ - CHANNEL - - """ - The condition checks the company location that the visitor is purchasing for. - """ - COMPANY_LOCATION - - """ - The condition checks the location that the visitor is shopping from. - """ - LOCATION - - """ - The condition checks the visitor's region. - """ - REGION -} - -""" -The conditions that determine whether a visitor is in a market. -""" -type MarketConditions @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - The channel conditions that determine whether a visitor is in the market. - """ - channelsCondition: ChannelsCondition - - """ - 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 channel market condition. -""" -input MarketConditionsChannelsInput @componentName(name: "markets") { - """ - A list of channel IDs to include in the market condition. - """ - channelIds: [ID!] @gidTypes(types: ["Channel"]) -} - -""" -The input fields required to create or update a company location market condition. -""" -input MarketConditionsCompanyLocationsInput @oneOf @componentName(name: "markets") { - """ - A type of market condition (e.g. ALL) to apply. - """ - applicationLevel: MarketConditionApplicationType - - """ - A list of company location IDs to include in the market condition. - """ - companyLocationIds: [ID!] @gidTypes(types: ["CompanyLocation"]) -} - -""" -The input fields required to create or update the market conditions. -""" -input MarketConditionsInput @componentName(name: "markets") { - """ - The channels to include in the market conditions. - """ - channelsCondition: MarketConditionsChannelsInput - - """ - 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 @componentName(name: "markets") { - """ - A type of market condition (e.g. ALL) to apply. - """ - applicationLevel: MarketConditionApplicationType - - """ - A list of location IDs to include in the market condition. - """ - locationIds: [ID!] @gidTypes(types: ["Location"]) -} - -""" -The input fields to specify a region condition. -""" -input MarketConditionsRegionInput @componentName(name: "markets") { - """ - A country code to which this condition should apply. - """ - countryCode: CountryCode! - - """ - A province or state. - """ - province: String -} - -""" -The input fields required to create or update a region market condition. -""" -input MarketConditionsRegionsInput @oneOf @componentName(name: "markets") { - """ - A type of market condition (e.g. ALL) to apply. - """ - applicationLevel: MarketConditionApplicationType - - """ - A list of market region IDs to include in the market condition. - """ - regionIds: [ID!] @gidTypes(types: ["Region"]) - - """ - A list of market regions to include in the market condition. - """ - regions: [MarketConditionsRegionInput!] -} - -""" -The input fields required to update a market condition. -""" -input MarketConditionsUpdateInput @componentName(name: "markets") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "markets") { - """ - Catalog IDs to include in the market. - """ - catalogs: [ID!] @gidTypes(types: ["Catalog"]) - - """ - The conditions that apply to the market. - """ - conditions: MarketConditionsInput - - """ - Currency settings for the market. - """ - currencySettings: MarketCurrencySettingsUpdateInput - - """ - Discounts that are eligible for this market. - """ - discounts: [ID!] @gidTypes(types: ["DiscountCodeNode", "DiscountAutomaticNode"]) - - """ - 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.") - - """ - 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 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 name of the market. Not shown to customers. - """ - name: String! - - """ - The strategy used to determine how prices are displayed to the customer. - """ - priceInclusions: MarketPriceInclusionsInput - - """ - 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 status of the market. - """ - status: MarketStatus - - """ - Web presence IDs to include in the market. - """ - webPresences: [ID!] @gidTypes(types: ["WebPresence"]) -} - -""" -Return type for `marketCreate` mutation. -""" -type MarketCreatePayload @componentName(name: "platform") { - """ - The market object. - """ - market: Market - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MarketUserError!]! -} - -""" -A market's currency settings. -""" -type MarketCurrencySettings @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - 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 @componentName(name: "markets") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "markets") { - """ - 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 @componentName(name: "platform") { - """ - The currency settings of the given market cannot be changed because the market manager has exclusive control of pricing. - """ - MANAGED_MARKET - - """ - The specified market wasn't found. - """ - MARKET_NOT_FOUND - - """ - 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 primary market must use the shop currency. - """ - PRIMARY_MARKET_USES_SHOP_CURRENCY - - """ - This action is restricted if unified markets is enabled. - """ - UNIFIED_MARKETS_ENABLED - - """ - The specified currency is not supported. - """ - UNSUPPORTED_CURRENCY -} - -""" -Return type for `marketDelete` mutation. -""" -type MarketDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "markets") { - """ - 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 @componentName(name: "markets") { - """ - 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 @requiredAccess(scope: "`read_translations` access scope.") @componentName(name: "markets") { - """ - The market localizable content. - """ - marketLocalizableContent: [MarketLocalizableContent!]! - - """ - Market localizations for the market localizable content. - """ - marketLocalizations( - """ - Filters market localizations by market ID. - """ - marketId: ID! @gidTypes(types: ["Market"]) - ): [MarketLocalization!]! - - """ - The GID of the resource. - """ - resourceId: ID! -} - -""" -An auto-generated type for paginating through multiple MarketLocalizableResources. -""" -type MarketLocalizableResourceConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "markets") { - """ - 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 @componentName(name: "markets") { - """ - 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 @componentName(name: "markets") { - """ - 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 @componentName(name: "markets") { - """ - A reference to the value being localized on the resource that this market localization belongs to. - """ - key: String! - - """ - The ID of the market that the localization is specific to. - """ - marketId: ID! @gidTypes(types: ["Market"]) - - """ - A hash digest representation of the content being localized. - """ - marketLocalizableContentDigest: String! - - """ - The value of the market localization. - """ - value: String! -} - -""" -Return type for `marketLocalizationsRegister` mutation. -""" -type MarketLocalizationsRegisterPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "taxes") { - """ - 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 incoterm configuration of the market. - """ - incotermConfiguration: IncotermConfiguration! -} - -""" -The input fields used to create a price inclusion. -""" -input MarketPriceInclusionsInput @componentName(name: "markets") { - """ - The inclusive duties pricing strategy for the market. - """ - dutiesPricingStrategy: InclusiveDutiesPricingStrategy - - """ - The incoterm configuration for the market. - """ - incotermConfiguration: IncotermConfiguration - - """ - The inclusive tax pricing strategy for the market. - """ - taxPricingStrategy: InclusiveTaxPricingStrategy -} - -""" -A geographic region which comprises a market. -""" -interface MarketRegion @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - A globally-unique ID. - """ - id: ID! - - """ - The name of the region. - """ - name: String! -} - -""" -An auto-generated type for paginating through multiple MarketRegions. -""" -type MarketRegionConnection @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - 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 @componentName(name: "markets") { - """ - A country code for the region. - """ - countryCode: CountryCode! -} - -""" -Return type for `marketRegionDelete` mutation. -""" -type MarketRegionDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "markets") { - """ - 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! -} - -""" -A province of a country which comprises a market. -""" -type MarketRegionProvince implements MarketRegion & Node @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - The province or state code. - """ - code: String! - - """ - The country the province belongs to. - """ - country: MarketRegionProvinceCountry! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The name of the region. - """ - name: String! -} - -""" -A country that a province belongs to. -""" -type MarketRegionProvinceCountry @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - The ISO code identifying the country. - """ - code: CountryCode! - - """ - The name of the country. - """ - name: String! -} - -""" -Return type for `marketRegionsCreate` mutation. -""" -type MarketRegionsCreatePayload @componentName(name: "platform") { - """ - The market object. - """ - market: Market - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MarketUserError!]! -} - -""" -Return type for `marketRegionsDelete` mutation. -""" -type MarketRegionsDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "markets") { - """ - The market is active. - """ - ACTIVE - - """ - The market is in draft. - """ - DRAFT -} - -""" -The market types. -""" -enum MarketType @componentName(name: "markets") { - """ - The market applies to the visitor based on the channel. - """ - CHANNEL - - """ - The market applies to the visitor based on the company location. - """ - COMPANY_LOCATION - - """ - The market applies to the visitor based on the location. - """ - LOCATION - - """ - The market does not apply to any visitor. - """ - NONE - - """ - The market applies to the visitor based on region. - """ - REGION -} - -""" -The input fields used to update a market. -""" -input MarketUpdateInput @componentName(name: "markets") { - """ - Catalog IDs to include in the market. - """ - catalogsToAdd: [ID!] @gidTypes(types: ["Catalog"]) - - """ - Catalog IDs to remove from the market. - """ - catalogsToDelete: [ID!] @gidTypes(types: ["Catalog"]) - - """ - The conditions to update. - """ - conditions: MarketConditionsUpdateInput - - """ - Currency settings for the market. - """ - currencySettings: MarketCurrencySettingsUpdateInput - - """ - The discounts to add to the market. - """ - discountsToAdd: [ID!] @gidTypes(types: ["DiscountCodeNode", "DiscountAutomaticNode"]) - - """ - The discounts to remove from the market. - """ - discountsToDelete: [ID!] @gidTypes(types: ["DiscountCodeNode", "DiscountAutomaticNode"]) - - """ - 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.") - - """ - A unique identifier for the market. For example `"ca"`. - """ - handle: String - - """ - 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 name of the market. Not shown to customers. - """ - name: String - - """ - The strategy used to determine how prices are displayed to the customer. - """ - priceInclusions: MarketPriceInclusionsInput - - """ - Remove any currency settings that are defined for the market. - """ - removeCurrencySettings: Boolean - - """ - The price inclusions to remove from the market. - """ - removePriceInclusions: Boolean - - """ - The status of the market. - """ - status: MarketStatus - - """ - The web presences to add to the market. - """ - webPresencesToAdd: [ID!] @gidTypes(types: ["WebPresence"]) - - """ - The web presences to remove from the market. - """ - webPresencesToDelete: [ID!] @gidTypes(types: ["WebPresence"]) -} - -""" -Return type for `marketUpdate` mutation. -""" -type MarketUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - 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 @componentName(name: "platform") { - """ - The maximum number of active B2B catalogs allowed by your plan has been reached. - """ - B2B_CATALOG_LIMIT_REACHED - - """ - B2B markets must be merchant managed. - """ - B2B_MARKET_MUST_BE_MERCHANT_MANAGED - - """ - The input value is blank. - """ - BLANK - - """ - Can't activate this market because the B2B catalog limit has been reached. - """ - CANNOT_ACTIVATE_MARKET_B2B_CATALOG_LIMIT_REACHED - - """ - Can't add all provinces for a country to a market. - """ - CANNOT_ADD_ALL_PROVINCES_FOR_A_COUNTRY_TO_A_MARKET - - """ - Country conditions cannot be added to a market with province conditions. - """ - CANNOT_ADD_COUNTRY_CONDITION_TO_PROVINCE_MARKET @deprecated(reason: "No longer used") - - """ - Can't add customer account domain to a market. - """ - CANNOT_ADD_CUSTOMER_DOMAIN - - """ - 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 add the web presence to the primary market. - """ - CANNOT_ADD_WEB_PRESENCE_TO_PRIMARY_MARKET @deprecated(reason: "No longer used") - - """ - Can't delete the only region in a market. - """ - CANNOT_DELETE_ONLY_REGION - - """ - Can't delete the primary market. - """ - CANNOT_DELETE_PRIMARY_MARKET - - """ - Can't delete the primary market's web presence. - """ - CANNOT_DELETE_PRIMARY_MARKET_WEB_PRESENCE @deprecated(reason: "No longer used") - - """ - Can't delete the last province-driven market. - """ - CANNOT_DELETE_PROVINCE_MARKET - - """ - Can't disable the primary market. - """ - CANNOT_DISABLE_PRIMARY_MARKET - - """ - Can't have both subfolder and domain web presences. - """ - CANNOT_HAVE_BOTH_SUBFOLDER_AND_DOMAIN_WEB_PRESENCES - - """ - Can't have multiple subfolder web presences per market. - """ - CANNOT_HAVE_MULTIPLE_SUBFOLDERS_PER_MARKET - - """ - Can't pass both `subfolderSuffix` and `domainId`. - """ - CANNOT_HAVE_SUBFOLDER_AND_DOMAIN - - """ - Can't set default locale to null. - """ - CANNOT_SET_DEFAULT_LOCALE_TO_NULL - - """ - Catalogs with volume pricing or quantity rules are not supported for the specified condition types. - """ - CATALOGS_WITH_VOLUME_PRICING_OR_QUANTITY_RULES_NOT_SUPPORTED - - """ - Catalog condition types must be the same for all conditions on a catalog. - """ - CATALOG_CONDITION_TYPES_MUST_BE_THE_SAME - - """ - 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 - - """ - A channel driver must have a channel specification. - """ - CHANNEL_DRIVER_MUST_HAVE_CHANNEL_SPECIFICATION - - """ - A channel market must have a single channel driver. - """ - CHANNEL_MARKET_MUST_HAVE_SINGLE_CHANNEL_DRIVER - - """ - The selected channel is not valid for a channel market. - """ - CHANNEL_NOT_VALID_FOR_CHANNEL_MARKET - - """ - One or more condition IDs were not found. - """ - CONDITIONS_NOT_FOUND - - """ - Contains regions that cannot be managed. - """ - CONTAINS_REGIONS_THAT_CANNOT_BE_MANAGED - - """ - One or more customizations were not found. - """ - CUSTOMIZATIONS_NOT_FOUND - - """ - The language isn't enabled on the store. - """ - DISABLED_LANGUAGE - - """ - One or more discounts exceed the maximum number of markets allowed. - """ - DISCOUNT_EXCEEDS_MARKET_LIMIT - - """ - The shop does not have discounts enabled for B2B markets. - """ - DISCOUNT_NOT_COMPATIBLE_WITH_B2B_MARKET - - """ - One or more discounts do not have market eligibility. - """ - DISCOUNT_NOT_MARKET_CONTEXTUAL - - """ - Domain was not found. - """ - DOMAIN_NOT_FOUND - - """ - Duplicates found in languages. - """ - DUPLICATE_LANGUAGES - - """ - Duplicate region market. - """ - DUPLICATE_REGION_MARKET - - """ - Duplicate unique market. - """ - DUPLICATE_UNIQUE_MARKET - - """ - Exceeds max multi-context markets. - """ - EXCEEDS_MAX_MULTI_CONTEXT_MARKETS - - """ - An error occurred. See the message for details. - """ - GENERIC_ERROR - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - 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 input value is invalid. - """ - INVALID - - """ - Channel ids are invalid. - """ - INVALID_CHANNEL_IDS - - """ - A country condition and a province condition belonging to the same country cannot be added to the same market. - """ - INVALID_COUNTRY_AND_PROVINCE_CONDITIONS - - """ - A country driver and a province driver belonging to the same country cannot be added to the same market. - """ - INVALID_COUNTRY_AND_PROVINCE_DRIVERS @deprecated(reason: "Use INVALID_COUNTRY_AND_PROVINCE_CONDITIONS instead") - - """ - Can't add selected customizations to a market with a province condition. - """ - INVALID_CUSTOMIZATION_FOR_PROVINCE_CONDITION - - """ - The province format is invalid. - """ - INVALID_PROVINCE_FORMAT - - """ - Can't add selected responders to a province driven market. - """ - INVALID_RESPONDER_FOR_PROVINCE_DRIVEN_MARKET @deprecated(reason: "No longer used") - - """ - Invalid combination of status and enabled. - """ - INVALID_STATUS_AND_ENABLED_COMBINATION - - """ - 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 - - """ - The currency settings of the given market cannot be changed because the market manager has exclusive control of pricing. - """ - MANAGED_MARKET - - """ - Catalogs created by Managed Markets cannot be added to a market. - """ - MANAGED_MARKETS_CATALOG_NOT_ALLOWED - - """ - A direct connection catalog can't be attached to a market. - """ - MARKET_CANT_HAVE_DIRECT_CONNECTION_CATALOG - - """ - 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 market wasn't found. - """ - MARKET_NOT_FOUND - - """ - Can't add another web presence to the market. - """ - MARKET_REACHED_WEB_PRESENCE_LIMIT - - """ - The country code is missing. - """ - MISSING_COUNTRY_CODE - - """ - The province code is missing. - """ - MISSING_PROVINCE_CODE - - """ - All retail locations in a market must be in the same country. - """ - MIXED_COUNTRY_LOCATIONS_NOT_ALLOWED - - """ - The shop's payment gateway does not support enabling more than one currency. - """ - MULTIPLE_CURRENCIES_NOT_SUPPORTED - - """ - Can’t delete, disable, or change the type of the last region market. - """ - MUST_HAVE_AT_LEAST_ONE_ACTIVE_REGION_MARKET - - """ - Your shop is not entitled to activate markets of this type. - """ - NOT_ENTITLED_TO_ACTIVATE_MARKET - - """ - 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") - - """ - POS location markets must be merchant managed. - """ - POS_LOCATION_MARKET_MUST_BE_MERCHANT_MANAGED - - """ - 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") - - """ - The province doesn't exist. - """ - PROVINCE_DOES_NOT_EXIST - - """ - The selected province does not belong to the selected country. - """ - PROVINCE_MUST_BELONG_TO_COUNTRY - - """ - The market region wasn't found. - """ - REGION_NOT_FOUND - - """ - The selected region is not supported for the selected channel. - """ - REGION_NOT_SUPPORTED_FOR_CHANNEL - - """ - Cannot add region-specific language. - """ - REGION_SPECIFIC_LANGUAGE - - """ - One of `subfolderSuffix` or `domainId` is required. - """ - REQUIRES_DOMAIN_OR_SUBFOLDER - - """ - Exactly one input option is required. - """ - REQUIRES_EXACTLY_ONE_OPTION @deprecated(reason: "No longer used") - - """ - Retail location currency must be local. - """ - RETAIL_LOCATION_CURRENCY_MUST_BE_LOCAL - - """ - The shop must have a web presence that uses the primary domain. - """ - SHOP_MUST_HAVE_PRIMARY_DOMAIN_WEB_PRESENCE - - """ - Can't have more than 50 markets. - """ - SHOP_REACHED_MARKETS_LIMIT @deprecated(reason: "No longer used") - - """ - Specified conditions cannot be empty. - """ - SPECIFIED_CONDITIONS_CANNOT_BE_EMPTY - - """ - With an ID list in input, SPECIFIED is not needed. - """ - SPECIFIED_NOT_VALID_FOR_INPUT - - """ - The subfolder suffix is invalid, please provide a different value. - """ - SUBFOLDER_SUFFIX_CANNOT_BE_SCRIPT_CODE - - """ - The subfolder suffix must be at least 2 letters. - """ - SUBFOLDER_SUFFIX_MUST_BE_AT_LEAST_2_LETTERS - - """ - The subfolder suffix must contain only letters. - """ - SUBFOLDER_SUFFIX_MUST_CONTAIN_ONLY_LETTERS @deprecated(reason: "No longer used") - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT - - """ - 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") - - """ - Managing this catalog is not supported by your plan. - """ - UNPERMITTED_ENTITLEMENTS_MARKET_CATALOGS - - """ - The language isn't published to the store. - """ - UNPUBLISHED_LANGUAGE - - """ - Can't add unsupported country or region. - """ - UNSUPPORTED_COUNTRY_REGION - - """ - The specified currency is not supported. - """ - UNSUPPORTED_CURRENCY - - """ - The user doesn't have permission access to create or edit markets. - """ - USER_LACKS_PERMISSION - - """ - Web presences and condition types are not compatible with each other. - """ - WEB_PRESENCE_NOT_COMPATIBLE_WITH_CONDITION_TYPES - - """ - The market web presence wasn't found. - """ - WEB_PRESENCE_NOT_FOUND - - """ - 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") - - """ - Matching ALL or NONE isn't supported for this driver type. - """ - WILDCARD_NOT_SUPPORTED -} - -""" -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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "markets") { - """ - The alternate locales for the market’s web presence. - """ - alternateLocales: [String!] - - """ - The default locale for the market’s web presence. - """ - defaultLocale: String! - - """ - The web presence's domain ID. This field must be `null` if the `subfolderSuffix` isn't `null`. - """ - domainId: ID @gidTypes(types: ["Domain"]) - - """ - 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 @componentName(name: "platform") { - """ - The market object. - """ - market: Market - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MarketUserError!]! -} - -""" -Return type for `marketWebPresenceDelete` mutation. -""" -type MarketWebPresenceDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "markets") { - """ - 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - 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 @componentName(name: "markets") { - """ - The alternate locales for the market’s web presence. - """ - alternateLocales: [String!] - - """ - The default locale for the market’s web presence. - """ - defaultLocale: String - - """ - The web presence's domain ID. This field must be null if `subfolderSuffix` is not null. - """ - domainId: ID @gidTypes(types: ["Domain"]) - - """ - 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 @componentName(name: "platform") { - """ - The market object. - """ - market: Market - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MarketUserError!]! -} - -""" -Return type for `marketingActivitiesDeleteAllExternal` mutation. -""" -type MarketingActivitiesDeleteAllExternalPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_marketing_events` access scope.") @componentName(name: "merchant_marketing") { - """ - The URL of the marketing activity listing page in the marketing section. - """ - activityListUrl: URL - - """ - The amount spent on the marketing activity. - """ - adSpend: MoneyV2 - - """ - The admin url used to edit this activity. - """ - adminEditUrl: URL! - - """ - The app which created this marketing activity. - """ - app: App! - - """ - The errors generated when an app publishes the marketing activity. - """ - appErrors: MarketingActivityExtensionAppErrors - - """ - The step type of a marketing automation activity. - """ - automationStepType: String - - """ - The allocated budget for the marketing activity. - """ - budget: MarketingBudget - - """ - The date and time when the marketing activity was created. - """ - createdAt: DateTime! - - """ - The time at which the most recent error occurred, which is set by the app. - """ - errorOccurredAt: DateTime - - """ - The flow editor URL to which the marketing activity is associated. - """ - flowEditorUrl: URL - - """ - 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 - - """ - The scheduled end time of the marketing activity, which is set by the app. - """ - scheduledToEndAt: DateTime - - """ - The scheduled start time of the marketing activity, which is set by the app. - """ - scheduledToStartAt: DateTime - - """ - 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! - - """ - Whether the marketing activity is tracking opens. - """ - trackingOpens: Boolean! - - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - The amount spent on the marketing activity. - """ - adSpend: MoneyInput - - """ - The budget for this marketing activity. - """ - budget: MarketingActivityBudgetInput - - """ - 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 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 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 hierarchy level of the activity within a campaign. The hierarchy level can't be updated. - """ - hierarchyLevel: MarketingActivityHierarchyLevel - - """ - The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. - """ - marketingChannelType: MarketingChannel! - - """ - The ID for the parent marketing activity, if creating hierarchical activities. - """ - parentActivityId: ID @gidTypes(types: ["MarketingActivity"]) - - """ - The remote ID for the parent marketing activity, if creating hierarchical activities. - """ - parentRemoteId: String - - """ - The domain from which ad clicks are forwarded to the shop. - """ - referringDomain: String - - """ - 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 URL for a preview image that's used for the marketing activity. - """ - remotePreviewImageUrl: URL - - """ - The URL for viewing and/or managing the activity outside of Shopify. - """ - remoteUrl: URL! - - """ - The date and time at which the activity is scheduled to end. - """ - scheduledEnd: DateTime - - """ - The date and time at which the activity is scheduled to start. - """ - scheduledStart: 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 status of the marketing activity. If status isn't set it will default to UNDEFINED. - """ - status: MarketingActivityExternalStatus - - """ - 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 title of the marketing activity. - """ - title: String! - - """ - 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 - - """ - 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 -} - -""" -Return type for `marketingActivityCreateExternal` mutation. -""" -type MarketingActivityCreateExternalPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - The budget for this marketing activity. - """ - budget: MarketingActivityBudgetInput @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") - - """ - Encoded context containing marketing campaign id. - """ - context: 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! @gidTypes(types: ["MarketingActivityExtension"]) - - """ - 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 current state of the marketing activity. - """ - status: MarketingActivityStatus! - - """ - 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.") - - """ - 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.") -} - -""" -Return type for `marketingActivityCreate` mutation. -""" -type MarketingActivityCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - The app is either not responding or returning unexpected data. - """ - API_ERROR - - """ - The app needs to be installed. - """ - INSTALL_REQUIRED_ERROR - - """ - The shop/user must be onboarded to use the app. - """ - NOT_ONBOARDED_ERROR - - """ - The app has returned an error when invoking the platform. - """ - PLATFORM_ERROR - - """ - The app has returned an error with a critical severity level. - """ - PLATFORM_ERROR_CRITICAL - - """ - The app has returned an error with an info severity level. - """ - PLATFORM_ERROR_INFO - - """ - The app has returned an error with a warning severity level. - """ - PLATFORM_ERROR_WARNING - - """ - The app has returned validation errors. - """ - VALIDATION_ERROR -} - -""" -Represents errors returned from apps when using the marketing activity extension. -""" -type MarketingActivityExtensionAppErrors @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - This marketing activity is currently running. - """ - ACTIVE - - """ - This marketing activity was deleted and it was triggered from outside of Shopify. - """ - DELETED_EXTERNALLY - - """ - This marketing activity has completed running. - """ - INACTIVE - - """ - This marketing activity is currently not running. - """ - PAUSED - - """ - This marketing activity is scheduled to run. - """ - SCHEDULED - - """ - The marketing activity's status is unknown. - """ - UNDEFINED -} - -""" -Hierarchy levels for external marketing activities. -""" -enum MarketingActivityHierarchyLevel @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - This status badge has type attention. - """ - ATTENTION - - """ - This status badge has type critical. - """ - CRITICAL - - """ - This status badge has type default. - """ - DEFAULT - - """ - This status badge has type info. - """ - INFO - - """ - This status badge has type success. - """ - SUCCESS - - """ - This status badge has type warning. - """ - WARNING -} - -""" -The input fields required to update an externally managed marketing activity. -""" -input MarketingActivityUpdateExternalInput @componentName(name: "merchant_marketing") { - """ - The amount spent on the marketing activity. - """ - adSpend: MoneyInput - - """ - The budget for this marketing activity. - """ - budget: MarketingActivityBudgetInput - - """ - 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 date and time at which the activity ended. - """ - end: DateTime - - """ - 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 URL for a preview image that's used for the marketing activity. - """ - remotePreviewImageUrl: URL - - """ - The URL for viewing and/or managing the activity outside of Shopify. - """ - remoteUrl: URL - - """ - The date and time at which the activity is scheduled to end. - """ - scheduledEnd: DateTime - - """ - The date and time at which the activity is scheduled to start. - """ - scheduledStart: DateTime - - """ - The date and time at which the activity started. - """ - start: DateTime - - """ - The status of the marketing activity. - """ - status: MarketingActivityExternalStatus - - """ - 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 title of the marketing activity. - """ - title: String -} - -""" -Return type for `marketingActivityUpdateExternal` mutation. -""" -type MarketingActivityUpdateExternalPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - The cumulative amount spent on the marketing activity. - """ - adSpend: MoneyInput @deprecated(reason: "Use `MarketingEngagementCreate.MarketingEngagementInput.adSpend` GraphQL to send the ad spend.") - - """ - The budget for the marketing activity. - """ - budget: MarketingActivityBudgetInput @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 time at which the most recent error occurred. - """ - errorOccurredAt: DateTime @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") - - """ - 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.") - - """ - The event context of the marketing activity. The event context is relayed from - the external editor URL. - """ - eventContext: String @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.") - - """ - The ID of the marketing activity. - """ - id: ID! @gidTypes(types: ["MarketingActivity"]) - - """ - 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.") @gidTypes(types: ["Product", "Shop"]) - - """ - The marketing channel of the marketing activity. - """ - marketingChannel: MarketingChannel @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") - - """ - 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.") @gidTypes(types: ["MarketingRecommendation"]) - - """ - The time at which the activity is scheduled to end. - """ - scheduledToEndAt: DateTime @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") - - """ - The time at which the activity is scheduled to start. - """ - scheduledToStartAt: DateTime @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") - - """ - 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 title of the marketing activity. - """ - title: String @deprecated(reason: "Marketing activity app extensions are deprecated and will be removed in the near future.") - - """ - Whether the marketing activity is tracking the email open rate. - """ - trackingOpens: Boolean @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.") - - """ - Whether the marketing activity uses the external editor. - """ - useExternalEditor: Boolean @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.") -} - -""" -Return type for `marketingActivityUpdate` mutation. -""" -type MarketingActivityUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - The amount spent on the marketing activity. - """ - adSpend: MoneyInput - - """ - The budget for this marketing activity. - """ - budget: MarketingActivityBudgetInput - - """ - 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 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 - - """ - The hierarchy level of the activity within a campaign. The hierarchy level can't be updated. - """ - hierarchyLevel: MarketingActivityHierarchyLevel - - """ - The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation. - """ - marketingChannelType: MarketingChannel! - - """ - The remote ID for the parent marketing activity, if creating hierarchical activities. - """ - parentRemoteId: String - - """ - The domain from which ad clicks are forwarded to the shop. - """ - referringDomain: String - - """ - 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 URL for a preview image that's used for the marketing activity. - """ - remotePreviewImageUrl: URL - - """ - The URL for viewing and/or managing the activity outside of Shopify. - """ - remoteUrl: URL! - - """ - The date and time at which the activity is scheduled to end. - """ - scheduledEnd: DateTime - - """ - The date and time at which the activity is scheduled to start. - """ - scheduledStart: 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 status of the marketing activity. - """ - status: MarketingActivityExternalStatus! - - """ - 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 title of the marketing activity. - """ - title: String! - - """ - 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 - - """ - 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 -} - -""" -Return type for `marketingActivityUpsertExternal` mutation. -""" -type MarketingActivityUpsertExternalPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "platform") { - """ - The marketing activity must be an external activity. - """ - ACTIVITY_NOT_EXTERNAL - - """ - 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 from STOREFRONT_APP. - """ - CANNOT_UPDATE_TACTIC_IF_ORIGINALLY_STOREFRONT_APP - - """ - 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 - - """ - All currency codes provided in the input need to match. - """ - CURRENCY_CODE_MISMATCH_INPUT - - """ - 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 job to delete all external activities failed to enqueue. - """ - DELETE_JOB_FAILED_TO_ENQUEUE - - """ - The channel handle value cannot be modified. - """ - IMMUTABLE_CHANNEL_HANDLE - - """ - The hierarchy level cannot be modified. - """ - IMMUTABLE_HIERARCHY_LEVEL - - """ - The parent activity cannot be modified. - """ - IMMUTABLE_PARENT_ID - - """ - The URL parameter value cannot be modified. - """ - IMMUTABLE_URL_PARAMETER - - """ - The UTM parameters cannot be modified. - """ - IMMUTABLE_UTM_PARAMETERS - - """ - The input value is invalid. - """ - INVALID - - """ - 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 - - """ - The remote ID does not correspond to an existing activity. - """ - INVALID_REMOTE_ID - - """ - The currency codes provided need to match the referenced marketing activity's currency code. - """ - MARKETING_ACTIVITY_CURRENCY_CODE_MISMATCH - - """ - 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 URL parameter value already exists. - """ - MARKETING_ACTIVITY_WITH_URL_PARAMETER_VALUE_ALREADY_EXISTS - - """ - A marketing activity with the same UTM campaign, medium, and source already exists. - """ - MARKETING_ACTIVITY_WITH_UTM_CAMPAIGN_ALREADY_EXISTS - - """ - Marketing activity is not valid, the associated marketing event does not exist. - """ - MARKETING_EVENT_DOES_NOT_EXIST - - """ - Non-hierarchical marketing activities must have UTM parameters or a URL parameter value. - """ - NON_HIERARCHIAL_REQUIRES_UTM_URL_PARAMETER - - """ - The input value is already taken. - """ - TAKEN -} - -""" -This type combines budget amount and its marketing budget type. -""" -type MarketingBudget @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - Displayed ads. - """ - DISPLAY - - """ - Email. - """ - EMAIL - - """ - Referral links. - """ - REFERRAL - - """ - Paid search. - """ - SEARCH - - """ - Social media. - """ - SOCIAL -} - -""" -Marketing engagement represents customer activity taken on a marketing activity or a marketing channel. -""" -type MarketingEngagement @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - The total ad spend for the marketing content. Recurring weekly, monthly, or - yearly spend needs to be divided into daily amounts. - """ - adSpend: MoneyInput - - """ - 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 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 = false @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 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: MoneyInput - - """ - 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 `marketingEngagementsDelete` mutation. -""" -type MarketingEngagementsDeletePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_marketing_events` access scope.") @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - 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 - - """ - Search engine optimization. - """ - SEO - - """ - A popup on the online store. - """ - STOREFRONT_APP - - """ - A transactional email. - """ - TRANSACTIONAL -} - -""" -The required configuration of features that a marketplace sets for a store to onboard -onto the marketplace channel. -""" -type MarketplacePaymentsConfiguration @requiredAccess(scope: "`read_marketplace_payments_configurations` access scope.") @componentName(name: "marketplaces") @privatelyDocumented { - """ - The URL that redirects the merchant to set up the required features on their store. - """ - actionUrl: URL! - - """ - The required features for a store to onboard onto the marketplace channel. - """ - requestedFeatures: [MarketplacePaymentsFeature!]! -} - -""" -Return type for `marketplacePaymentsConfigurationUpdate` mutation. -""" -type MarketplacePaymentsConfigurationUpdatePayload @componentName(name: "platform") @privatelyDocumented { - """ - The current payment configuration. - """ - paymentConfiguration: MarketplacePaymentsConfiguration - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MarketplacePaymentsConfigurationUpdateUserError!]! -} - -""" -An error that occurs during the execution of `MarketplacePaymentsConfigurationUpdate`. -""" -type MarketplacePaymentsConfigurationUpdateUserError implements DisplayableError @componentName(name: "platform") @privatelyDocumented { - """ - The error code. - """ - code: MarketplacePaymentsConfigurationUpdateUserErrorCode - - """ - 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 `MarketplacePaymentsConfigurationUpdateUserError`. -""" -enum MarketplacePaymentsConfigurationUpdateUserErrorCode @componentName(name: "platform") @privatelyDocumented { - """ - No features were requested. - """ - EMPTY_FEATURES - - """ - Invalid feature requested. - """ - INVALID_FEATURE - - """ - A feature was required that the shop isn't eligible for. - """ - NON_ONBOARDABLE_REQUIRED_FEATURE - - """ - The configuration couldn't be saved. - """ - NOT_SAVED -} - -""" -A feature that a Marketplace has requested a merchant have enabled on their shop. -""" -type MarketplacePaymentsFeature @requiredAccess(scope: "`read_marketplace_payments_configurations` access scope.") @componentName(name: "marketplaces") @privatelyDocumented { - """ - Whether the shop can onboard onto the feature. - """ - onboardable: Boolean! - - """ - Whether the feature is ready for Marketplace usage. - """ - ready: Boolean! - - """ - Whether the feature is required for the configuration to be ready. - """ - required: Boolean! - - """ - The subtype of the requested marketplace payments feature. - """ - subtype: MarketplacePaymentsFeatureSubtype! - - """ - The type of the requested marketplace payments feature. - """ - type: MarketplacePaymentsFeatureType! -} - -""" -The input fields for a marketplace payments feature. -""" -input MarketplacePaymentsFeatureInput @componentName(name: "marketplaces") @privatelyDocumented { - """ - Whether the feature is required for the configuration to be ready. - """ - required: Boolean! - - """ - The type of the marketplace payments feature. - """ - type: MarketplacePaymentsFeatureType! -} - -""" -All the possible feature subtypes that can be returned for a feature. -""" -enum MarketplacePaymentsFeatureSubtype @componentName(name: "marketplaces") @privatelyDocumented { - """ - The only subtype for PayPal feature. - """ - PAYPAL @deprecated(reason: "PayPal marketplace payments is no longer supported.") - - """ - The Shopify Payments subtype for Shopify Payments feature. Returned when a merchant can use Shopify Payments. - """ - SHOPIFY_PAYMENTS - - """ - The Shop Pay subtype for Shopify Payments feature. Returned when a merchant can use Shop Pay with a 3rd party gateway. - """ - SHOP_PAY -} - -""" -All the possible features that a marketplace can require a merchant to enable for onboarding. -""" -enum MarketplacePaymentsFeatureType @componentName(name: "marketplaces") @privatelyDocumented { - """ - The PayPal payments app is enabled on a store and the merchant is onboarded with PayPal. - """ - PAYPAL @deprecated(reason: "PayPal marketplace payments is no longer supported.") - - """ - Shopify Payments is enabled on a store. - """ - SHOPIFY_PAYMENTS -} - -""" -The entitlements for B2B markets. -""" -type MarketsB2BEntitlement @componentName(name: "markets") { - """ - The entitlements for B2B market catalogs. - """ - catalogs: MarketsCatalogsEntitlement! - - """ - Whether B2B markets are enabled. - """ - enabled: Boolean! -} - -""" -The entitlements for catalogs. -""" -type MarketsCatalogsEntitlement @componentName(name: "merchandising") { - """ - Whether catalogs are enabled. - """ - enabled: Boolean! - - """ - The maximum number of catalogs allowed. - """ - limit: Int! -} - -""" -The entitlements for region markets. -""" -type MarketsRegionsEntitlement @componentName(name: "markets") { - """ - 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - The resolved catalogs. - """ - catalogs( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MarketWebPresenceConnection! -} - -""" -The entitlements for retail markets. -""" -type MarketsRetailEntitlement @componentName(name: "markets") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - Whether themes are enabled. - """ - enabled: Boolean! -} - -""" -Markets entitlement information. -""" -type MarketsType @componentName(name: "billing") { - """ - 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope or `read_files` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Media could not be created because a file with the same name already exists. - """ - DUPLICATE_FILENAME_ERROR - - """ - 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 - - """ - 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 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 cumulative file storage limit would be exceeded. - """ - FILE_STORAGE_LIMIT_EXCEEDED - - """ - 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 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 could not be created because the image has an invalid aspect ratio. - """ - INVALID_IMAGE_ASPECT_RATIO - - """ - Media could not be created because the image size is too large. - """ - INVALID_IMAGE_FILE_SIZE - - """ - Media could not be created because the image's resolution exceeds the max limit. - """ - INVALID_IMAGE_RESOLUTION - - """ - Media could not be processed because the signed URL was invalid. - """ - INVALID_SIGNED_URL - - """ - Media timed out because it is currently being modified by another operation. - """ - MEDIA_TIMEOUT_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 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_PROCESSING_FAILURE - - """ - 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 - - """ - Model failed validation. - """ - MODEL3D_VALIDATION_ERROR - - """ - Media could not be reverted to previous version. - """ - REVERT_MEDIA_VERSION_FAILURE - - """ - Media error has occured for unknown reason. - """ - UNKNOWN - - """ - Media could not be created because the image is an unsupported file type. - """ - UNSUPPORTED_IMAGE_FILE_TYPE - - """ - 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 maximum duration requirement. - """ - VIDEO_MAX_DURATION_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 maximum width requirement. - """ - VIDEO_MAX_WIDTH_ERROR - - """ - Media could not be created because the metadata could not be read. - """ - VIDEO_METADATA_READ_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 minimum height requirement. - """ - VIDEO_MIN_HEIGHT_ERROR - - """ - Media could not be created because it does not meet the minimum width requirement. - """ - VIDEO_MIN_WIDTH_ERROR - - """ - Video failed validation. - """ - VIDEO_VALIDATION_ERROR -} - -""" -Host for a Media Resource. -""" -enum MediaHost @componentName(name: "merchandising") { - """ - Host for Vimeo embedded videos. - """ - VIMEO - - """ - Host for YouTube embedded videos. - """ - YOUTUBE -} - -""" -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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! @deprecated(reason: "No longer supported. Use metaobjects instead.") - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 @gidTypes(types: ["Market"]) - ): [Translation!]! - - """ - Status resulting from the latest update operation. See fileErrors for details. - """ - updateStatus: FileStatus - - """ - 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope or `read_images` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Preview image processing has failed. - """ - FAILED - - """ - Preview image is being processed. - """ - PROCESSING - - """ - Preview image is ready to be displayed. - """ - READY - - """ - Preview image is uploaded but not yet processed. - """ - UPLOADED -} - -""" -The possible statuses for a media object. -""" -enum MediaStatus @componentName(name: "merchandising") { - """ - Media processing has failed. - """ - FAILED - - """ - Media is being processed. - """ - PROCESSING - - """ - Media is ready to be displayed. - """ - READY - - """ - Media has been uploaded but not yet processed. - """ - UPLOADED -} - -""" -Represents an error that happens during execution of a Media query or mutation. -""" -type MediaUserError implements DisplayableError @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - Cannot specify source and revert version at the same time. - """ - CANNOT_SPECIFY_SOURCE_AND_VERSION_ID - - """ - The input value is invalid. - """ - INVALID - - """ - Invalid media type. - """ - INVALID_MEDIA_TYPE - - """ - Exceeded the maximum number of 100 variant-media pairs per mutation call. - """ - MAXIMUM_VARIANT_MEDIA_PAIRS_EXCEEDED - - """ - Media cannot be modified. It is currently being modified by another operation. - """ - MEDIA_CANNOT_BE_MODIFIED - - """ - Media does not exist. - """ - MEDIA_DOES_NOT_EXIST - - """ - Media does not exist on the given product. - """ - MEDIA_DOES_NOT_EXIST_ON_PRODUCT - - """ - The specified media is not attached to the specified variant. - """ - MEDIA_IS_NOT_ATTACHED_TO_VARIANT - - """ - Media version does not exist. - """ - MEDIA_VERSION_DOES_NOT_EXIST - - """ - Missing arguments. - """ - MISSING_ARGUMENTS - - """ - Model3d creation throttle was exceeded. - """ - MODEL3D_THROTTLE_EXCEEDED - - """ - Model validation failed. - """ - MODEL3D_VALIDATION_ERROR - - """ - Non-ready media are not supported. - """ - NON_READY_MEDIA - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Exceeded the limit of media per product. - """ - PRODUCT_MEDIA_LIMIT_EXCEEDED - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED - - """ - Product variant already has attached media. - """ - PRODUCT_VARIANT_ALREADY_HAS_MEDIA - - """ - Variant does not exist on the given product. - """ - PRODUCT_VARIANT_DOES_NOT_EXIST_ON_PRODUCT - - """ - Variant specified in more than one pair. - """ - PRODUCT_VARIANT_SPECIFIED_MULTIPLE_TIMES - - """ - Exceeded the limit of media per shop. - """ - SHOP_MEDIA_LIMIT_EXCEEDED - - """ - Only one mediaId is allowed per variant-media input pair. - """ - TOO_MANY_MEDIA_PER_INPUT_PAIR - - """ - Video creation throttle was exceeded. - """ - VIDEO_THROTTLE_EXCEEDED - - """ - Video validation failed. - """ - VIDEO_VALIDATION_ERROR -} - -""" -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 @requiredAccess(scope: "`read_products` access scope or `read_files` access scope.") @componentName(name: "merchandising") { - """ - The code representing the type of warning. - """ - code: MediaWarningCode! - - """ - Translated warning message. - """ - message: String -} - -""" -Warning types for media. -""" -enum MediaWarningCode @componentName(name: "merchandising") { - """ - 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 - - """ - 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 -} - -""" -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 @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { - """ - 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 @gidTypes(types: ["Market"]) - ): [Translation!]! -} - -""" -An auto-generated type for paginating through multiple Menus. -""" -type MenuConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The menu cannot be nested more than 3 level deep. - """ - NESTING_TOO_DEEP - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -Return type for `menuDelete` mutation. -""" -type MenuDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - 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 @componentName(name: "online_store") { - """ - 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 @componentName(name: "online_store") { - """ - List of the menu items nested under this item sorted by position. - """ - items: [MenuItemCreateInput!] - - """ - The menu item's association with an existing resource. - """ - resourceId: ID @gidTypes(types: ["Collection", "Product", "OnlineStorePage", "OnlineStoreBlog", "Article", "Page", "Blog", "Article", "ShopPolicy", "Metaobject", "CustomerAccountPage"]) - - """ - 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 to be used when the item doesn't point to a resource. - """ - url: String -} - -""" -A menu item type. -""" -enum MenuItemType @componentName(name: "online_store") { - """ - The article menu item type. - """ - ARTICLE - - """ - The blog menu item type. - """ - BLOG - - """ - The catalog menu item type. - """ - CATALOG - - """ - The collection menu item type. - """ - COLLECTION - - """ - The collections menu item type. - """ - COLLECTIONS - - """ - The customer_account_page menu item type. - """ - CUSTOMER_ACCOUNT_PAGE - - """ - The frontpage menu item type. - """ - FRONTPAGE - - """ - The http menu item type. - """ - HTTP - - """ - The metaobject menu item type. - """ - METAOBJECT - - """ - The page menu item type. - """ - PAGE - - """ - The product menu item type. - """ - PRODUCT - - """ - The search menu item type. - """ - SEARCH - - """ - The shop_policy menu item type. - """ - SHOP_POLICY -} - -""" -The input fields required to update a valid menu item. -""" -input MenuItemUpdateInput @componentName(name: "online_store") { - """ - A globally-unique ID of the online store navigation menu item. - """ - id: ID @gidTypes(types: ["MenuItem"]) - - """ - List of the menu items nested under this item sorted by position. - """ - items: [MenuItemUpdateInput!] - - """ - The menu item's association with an existing resource. - """ - resourceId: ID @gidTypes(types: ["Collection", "Product", "OnlineStorePage", "OnlineStoreBlog", "Article", "Page", "Blog", "Article", "ShopPolicy", "Metaobject", "CustomerAccountPage"]) - - """ - 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 to be used when the item doesn't point to a resource. - """ - url: String -} - -""" -The set of valid sort keys for the Menu query. -""" -enum MenuSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The menu cannot be nested more than 3 level deep. - """ - NESTING_TOO_DEEP - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -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 @componentName(name: "pricing") { - """ - 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 - [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations) - class. - """ - PRODUCT -} - -""" -Merchant signals for apps. -""" -type MerchantAppSignals @requiredAccess(scope: "The app must have access to check merchant signals.") @componentName(name: "merchant_risk") { - """ - Whether Shopify has pre-verified the merchant's business for onboarding to - restricted apps. Returns `false` if the shop isn't marked as eligible. - """ - eligibleForRestrictedApps: Boolean! -} - -""" -Merchant approval for accelerated onboarding to channel integration apps. -""" -type MerchantApprovalSignals @requiredAccess(scope: "`read_merchant_approval_signals` access scope.") @componentName(name: "merchant_risk") { - """ - Check if there is an enabled payment gateway. - """ - canProcessCheckout: Boolean! - - """ - 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! - - """ - A list of scores that represents the shop's ability to deliver on time to a - particular country. The score is a value between 0 and 1. - """ - onTimeDeliveryScores: [OnTimeDeliveryScore!]! - - """ - 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 & HasPublishedTranslations & LegacyInteroperability & Node @componentName(name: "content") @protectedObject(subject: "customer") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - ): MetafieldReferenceConnection - - """ - The size of the metafield value in bytes. - """ - sizeInBytes: 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 @gidTypes(types: ["Market"]) - ): [Translation!]! - - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The access permitted on the Admin API. - """ - admin: MetafieldAdminAccessInput - - """ - The access permitted on the Customer Account API. - """ - customerAccount: MetafieldCustomerAccountAccessInput - - """ - The access permitted on the Storefront API. - """ - storefront: MetafieldStorefrontAccessInput -} - -""" -The input fields for the access settings for the metafields under the definition. -""" -input MetafieldAccessUpdateInput @componentName(name: "content") { - """ - The admin access setting to use for the metafields under this definition. - """ - admin: MetafieldAdminAccessInput - - """ - The Customer Account API access setting to use for the metafields under this definition. - """ - customerAccount: MetafieldCustomerAccountAccessInput - - """ - The storefront access setting to use for the metafields under this definition. - """ - storefront: MetafieldStorefrontAccessInput -} - -""" -Metafield access permissions for the Admin API. -""" -enum MetafieldAdminAccess @componentName(name: "content") { - """ - 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 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 -} - -""" -Metafield access permissions for the Admin API. -""" -enum MetafieldAdminAccessInput @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - Indicate whether a metafield definition is configured for filtering. - """ - adminFilterable: MetafieldCapabilityAdminFilterable! - - """ - Indicate whether a metafield definition can be queried in analytics. - """ - analyticsQueryable: MetafieldCapabilityAnalyticsQueryable! - - """ - The capability configuration for automatically copying values from a cart - metafield to the corresponding order metafield when an order is created. - """ - cartToOrderCopyable: MetafieldCapabilityCartToOrderCopyable! - - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - Indicates whether the capability should be enabled or disabled. - """ - enabled: Boolean! -} - -""" -The analytics queryable capability of a metafield definition. -""" -type MetafieldCapabilityAnalyticsQueryable @componentName(name: "content") { - """ - Indicates if the definition is eligible to have the capability. - """ - eligible: Boolean! - - """ - Indicates if the capability is enabled. - """ - enabled: Boolean! -} - -""" -The input fields for the analytics queryable capability. -""" -input MetafieldCapabilityAnalyticsQueryableInput @componentName(name: "content") { - """ - Indicates whether the capability should be enabled or disabled. - """ - enabled: Boolean! -} - -""" -Information about the cart to order copyable capability on a metafield definition. -Only order metafield definitions are eligible to have this capability enabled. - -When enabled, the value from a cart metafield is automatically copied to the corresponding -order metafield when an order is created. The namespace and key must match between the cart and order metafields. -""" -type MetafieldCapabilityCartToOrderCopyable @componentName(name: "sales") { - """ - 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 or disabling the "Cart to order copyable" capability. -This capability is only available for order metafield definitions. - -When enabled, the value from a cart metafield is automatically copied to the corresponding -order metafield when an order is created. The namespace and key must match between the cart and order metafields. -""" -input MetafieldCapabilityCartToOrderCopyableInput @componentName(name: "sales") { - """ - Indicates whether the capability should be enabled or disabled. - """ - enabled: Boolean! -} - -""" -The input fields for creating a metafield capability. -""" -input MetafieldCapabilityCreateInput @componentName(name: "content") { - """ - The input for updating the admin filterable capability. - """ - adminFilterable: MetafieldCapabilityAdminFilterableInput - - """ - The input for the analytics queryable capability. - """ - analyticsQueryable: MetafieldCapabilityAnalyticsQueryableInput - - """ - The input for updating the cart to order copyable capability. - """ - cartToOrderCopyable: MetafieldCapabilityCartToOrderCopyableInput - - """ - The input for updating the smart collection condition capability. - """ - smartCollectionCondition: MetafieldCapabilitySmartCollectionConditionInput - - """ - The input for updating the unique values capability. - """ - uniqueValues: MetafieldCapabilityUniqueValuesInput -} - -""" -Information about the smart collection condition capability on a metafield definition. -""" -type MetafieldCapabilitySmartCollectionCondition @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Indicates whether the capability should be enabled or disabled. - """ - enabled: Boolean! -} - -""" -Information about the unique values capability on a metafield definition. -""" -type MetafieldCapabilityUniqueValues @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - Indicates whether the capability should be enabled or disabled. - """ - enabled: Boolean! -} - -""" -The input fields for updating a metafield capability. -""" -input MetafieldCapabilityUpdateInput @componentName(name: "content") { - """ - The input for updating the admin filterable capability. - """ - adminFilterable: MetafieldCapabilityAdminFilterableInput - - """ - The input for the analytics queryable capability. - """ - analyticsQueryable: MetafieldCapabilityAnalyticsQueryableInput - - """ - The input for updating the cart to order copyable capability. - """ - cartToOrderCopyable: MetafieldCapabilityCartToOrderCopyableInput - - """ - The input for updating the smart collection condition capability. - """ - smartCollectionCondition: MetafieldCapabilitySmartCollectionConditionInput - - """ - The input for updating the unique values capability. - """ - uniqueValues: MetafieldCapabilityUniqueValuesInput -} - -""" -An auto-generated type for paginating through multiple Metafields. -""" -type MetafieldConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - No access. - """ - NONE - - """ - Read-only access. - """ - READ - - """ - Read and write access. - """ - READ_WRITE -} - -""" -Metafield access permissions for the Customer Account API. -""" -enum MetafieldCustomerAccountAccessInput @componentName(name: "content") { - """ - No access. - """ - NONE - - """ - Read-only access. - """ - READ - - """ - Read and write access. - """ - READ_WRITE -} - -""" -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 @componentName(name: "content") { - """ - 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 date and time when the metafield definition was created. - """ - createdAt: DateTime! - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Returns the metafields filtered by the validation status. - """ - validationStatus: MetafieldValidationStatus = ANY - ): 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! - - """ - The date and time when the metafield definition was updated. - """ - updatedAt: DateTime! - - """ - 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 @componentName(name: "content") { - """ - The metafield definition has failed to be enabled for admin filtering. - """ - FAILED - - """ - The metafield definition allows admin filtering by matching metafield values. - """ - FILTERABLE - - """ - The metafield definition's metafields are currently being processed for admin filtering. - """ - IN_PROGRESS - - """ - The metafield definition cannot be used for admin filtering. - """ - NOT_FILTERABLE -} - -""" -An auto-generated type for paginating through multiple MetafieldDefinitions. -""" -type MetafieldDefinitionConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The subtype value of the constraint. - """ - value: String! -} - -""" -An auto-generated type for paginating through multiple MetafieldDefinitionConstraintValues. -""" -type MetafieldDefinitionConstraintValueConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The category of resource subtypes that the definition applies to. - """ - key: String - - """ - The specific constraint subtype values that the definition applies to. - """ - values( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - The error code. - """ - code: MetafieldDefinitionCreateUserErrorCode - - """ - The index of the array element that's causing the error. - """ - elementIndex: Int - - """ - The key of the failing validation 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 `MetafieldDefinitionCreateUserError`. -""" -enum MetafieldDefinitionCreateUserErrorCode @componentName(name: "platform") { - """ - Admin access can only be specified for app-owned metafield definitions. - """ - ADMIN_ACCESS_INPUT_NOT_ALLOWED - - """ - The input value is blank. - """ - BLANK - - """ - A capability is required for the definition type but is disabled. - """ - CAPABILITY_REQUIRED_BUT_DISABLED - - """ - Owner type can't be used in this mutation. - """ - DISALLOWED_OWNER_TYPE - - """ - A duplicate option. - """ - DUPLICATE_OPTION - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - The input value is invalid. - """ - INVALID - - """ - The metafield definition capability is invalid. - """ - INVALID_CAPABILITY - - """ - A field contains an invalid character. - """ - INVALID_CHARACTER - - """ - The metafield definition constraints are invalid. - """ - INVALID_CONSTRAINTS - - """ - The input combination is invalid. - """ - INVALID_INPUT_COMBINATION - - """ - An invalid option. - """ - INVALID_OPTION - - """ - The maximum limit of definitions per owner type has exceeded. - """ - LIMIT_EXCEEDED - - """ - 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 pinned limit has been reached for the owner type. - """ - PINNED_LIMIT_REACHED - - """ - The input value needs to be blank. - """ - PRESENT - - """ - This namespace and key combination is reserved for standard definitions. - """ - RESERVED_NAMESPACE_KEY - - """ - 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 input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT - - """ - The definition type is not eligible to be used as collection condition. - """ - TYPE_NOT_ALLOWED_FOR_CONDITIONS - - """ - 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 -} - -""" -Return type for `metafieldDefinitionDelete` mutation. -""" -type MetafieldDefinitionDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - Deleting an id type metafield definition requires deletion of its associated metafields. - """ - ID_TYPE_DELETION_ERROR - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - Action cannot proceed. Definition is currently in use. - """ - METAFIELD_DEFINITION_IN_USE - - """ - Definition not found. - """ - NOT_FOUND - - """ - The input value needs to be blank. - """ - PRESENT - - """ - 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 - - """ - Definition is required by an installed app and cannot be deleted. - """ - STANDARD_METAFIELD_DEFINITION_DEPENDENT_ON_APP -} - -""" -An auto-generated type which holds one MetafieldDefinition and a cursor during pagination. -""" -type MetafieldDefinitionEdge @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The unique identifier for the metafield definition within its namespace. - """ - key: String! - - """ - 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 resource type that the metafield definition is attached to. - """ - ownerType: MetafieldOwnerType! -} - -""" -The input fields required to create a metafield definition. -""" -input MetafieldDefinitionInput @componentName(name: "content") { - """ - The access settings that apply to each of the metafields that belong to the metafield definition. - """ - access: MetafieldAccessInput - - """ - The capabilities of the metafield definition. - """ - capabilities: MetafieldCapabilityCreateInput - - """ - 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 description for the metafield definition. - """ - description: 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 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 resource type that the metafield definition is attached to. - """ - ownerType: MetafieldOwnerType! - - """ - Whether to [pin](https://help.shopify.com/manual/custom-data/metafields/pinning-metafield-definitions) - the metafield definition. - """ - pin: Boolean = false - - """ - 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! - - """ - Whether the metafield definition can be used as a collection condition. - """ - useAsCollectionCondition: Boolean = false @deprecated(reason: "Use `smartCollectionCondition` instead.") - - """ - 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!] -} - -""" -Return type for `metafieldDefinitionPin` mutation. -""" -type MetafieldDefinitionPinPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The metafield definition is already pinned. - """ - ALREADY_PINNED - - """ - 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 - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The metafield definition was not found. - """ - NOT_FOUND - - """ - The pinned limit has been reached for owner type. - """ - PINNED_LIMIT_REACHED - - """ - The metafield definition does not support pinning. - """ - UNSUPPORTED_PINNING -} - -""" -Possible metafield definition pinned statuses. -""" -enum MetafieldDefinitionPinnedStatus @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The metafield definition was not found. - """ - NOT_FOUND - - """ - The metafield definition isn't pinned. - """ - NOT_PINNED -} - -""" -The input fields required to update a metafield definition. -""" -input MetafieldDefinitionUpdateInput @componentName(name: "content") { - """ - The access settings that apply to each of the metafields that belong to the metafield definition. - """ - access: MetafieldAccessUpdateInput - - """ - The capabilities of the metafield definition. - """ - capabilities: MetafieldCapabilityUpdateInput - - """ - 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 description for the metafield definition. - """ - description: 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 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 resource type that the metafield definition is attached to. Used to help identify the metafield definition, - but can't be updated itself. - """ - ownerType: MetafieldOwnerType! - - """ - 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.") - - """ - 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!] -} - -""" -Return type for `metafieldDefinitionUpdate` mutation. -""" -type MetafieldDefinitionUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - The error code. - """ - code: MetafieldDefinitionUpdateUserErrorCode - - """ - The index of the array element that's causing the error. - """ - elementIndex: Int - - """ - The key of the failing validation 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 `MetafieldDefinitionUpdateUserError`. -""" -enum MetafieldDefinitionUpdateUserErrorCode @componentName(name: "platform") { - """ - 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 - - """ - The input value is blank. - """ - BLANK - - """ - The metafield definition capability cannot be disabled. - """ - CAPABILITY_CANNOT_BE_DISABLED - - """ - A capability is required for the definition type but is disabled. - """ - CAPABILITY_REQUIRED_BUT_DISABLED - - """ - Owner type can't be used in this mutation. - """ - DISALLOWED_OWNER_TYPE - - """ - A duplicate option. - """ - DUPLICATE_OPTION - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - The metafield definition capability is invalid. - """ - INVALID_CAPABILITY - - """ - The metafield definition constraints are invalid. - """ - INVALID_CONSTRAINTS - - """ - An invalid input. - """ - INVALID_INPUT - - """ - The input combination is invalid. - """ - INVALID_INPUT_COMBINATION - - """ - An invalid option. - """ - INVALID_OPTION - - """ - Action cannot proceed. Definition is currently in use. - """ - METAFIELD_DEFINITION_IN_USE - - """ - You cannot change the metaobject definition pointed to by a metaobject reference metafield definition. - """ - METAOBJECT_DEFINITION_CHANGED - - """ - The metafield definition wasn't found. - """ - NOT_FOUND - - """ - 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 pinned limit has been reached for the owner type. - """ - PINNED_LIMIT_REACHED - - """ - The input value needs to be blank. - """ - PRESENT - - """ - The input value is too long. - """ - TOO_LONG - - """ - The definition type is not eligible to be used as collection condition. - """ - TYPE_NOT_ALLOWED_FOR_CONDITIONS - - """ - The metafield definition does not support pinning. - """ - UNSUPPORTED_PINNING -} - -""" -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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The key of the metafield. - """ - key: String! - - """ - The namespace of the metafield. - """ - namespace: String! - - """ - The unique ID of the resource that the metafield is attached to. - """ - ownerId: ID! @gidTypes(types: ["HasMetafields"]) -} - -""" -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 @componentName(name: "content") { - """ - The unique ID of the metafield. Using `namespace` and `key` is preferred for creating and updating. - """ - id: ID @gidTypes(types: ["Metafield"]) - - """ - 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 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 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 - - """ - The data stored in the metafield. Always stored as a string, regardless of the metafield's type. - """ - value: String -} - -""" -Possible types of a metafield's owner resource. -""" -enum MetafieldOwnerType @componentName(name: "content") { - """ - The Api Permission metafield owner type. - """ - API_PERMISSION - - """ - The Article metafield owner type. - """ - ARTICLE - - """ - The Blog metafield owner type. - """ - BLOG - - """ - The Cart Transform metafield owner type. - """ - CARTTRANSFORM - - """ - The Collection metafield owner type. - """ - COLLECTION - - """ - The Company metafield owner type. - """ - COMPANY - - """ - The Company Location metafield owner type. - """ - COMPANY_LOCATION - - """ - The Customer metafield owner type. - """ - CUSTOMER - - """ - The Delivery Customization metafield owner type. - """ - DELIVERY_CUSTOMIZATION - - """ - The Delivery Method metafield owner type. - """ - DELIVERY_METHOD - - """ - The Delivery Option Generator metafield owner type. - """ - DELIVERY_OPTION_GENERATOR - - """ - The Discount metafield owner type. - """ - DISCOUNT - - """ - The draft order metafield owner type. - """ - DRAFTORDER - - """ - The Fulfillment Constraint Rule metafield owner type. - """ - FULFILLMENT_CONSTRAINT_RULE - - """ - The GiftCardTransaction metafield owner type. - """ - GIFT_CARD_TRANSACTION - - """ - The Location metafield owner type. - """ - LOCATION - - """ - The Market metafield owner type. - """ - MARKET - - """ - The Media Image metafield owner type. - """ - MEDIA_IMAGE @deprecated(reason: "`MEDIA_IMAGE` is deprecated.") - - """ - The Order metafield owner type. - """ - ORDER - - """ - The Order Routing Location Rule metafield owner type. - """ - ORDER_ROUTING_LOCATION_RULE - - """ - The Page metafield owner type. - """ - PAGE - - """ - The Payment Customization metafield owner type. - """ - PAYMENT_CUSTOMIZATION - - """ - The Product metafield owner type. - """ - PRODUCT - - """ - The Product Variant metafield owner type. - """ - PRODUCTVARIANT - - """ - The Selling Plan metafield owner type. - """ - SELLING_PLAN - - """ - The Shop metafield owner type. - """ - SHOP - - """ - The Validation metafield owner type. - """ - VALIDATION -} - -""" -The resource referenced by the metafield value. -""" -union MetafieldReference @componentName(name: "content") = 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") = 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 @componentName(name: "content") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - No access. - """ - NONE - - """ - Read-only access. - """ - PUBLIC_READ -} - -""" -Metafield access permissions for the Storefront API. -""" -enum MetafieldStorefrontAccessInput @componentName(name: "content") { - """ - No access. - """ - NONE - - """ - Read-only access. - """ - PUBLIC_READ -} - -""" -Possible metafield validation statuses. -""" -enum MetafieldValidationStatus @componentName(name: "content") { - """ - Any validation status (valid or invalid). - """ - ANY - - """ - Invalid (according to definition). - """ - INVALID - - """ - Valid (according to definition). - """ - VALID -} - -""" -Legacy type information for the stored value. -Replaced by `type`. -""" -enum MetafieldValueType @componentName(name: "content") { - """ - A `true` or `false` value. - """ - BOOLEAN - - """ - A number with decimal places. - """ - FLOAT - - """ - A whole number. - """ - INTEGER - - """ - A JSON string. - """ - JSON_STRING - - """ - A text field. - """ - STRING -} - -""" -Return type for `metafieldsDelete` mutation. -""" -type MetafieldsDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - The `compareDigest` value obtained from a previous query. Provide this with - updates to ensure the metafield is modified safely. - """ - compareDigest: 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 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 ID of the resource that the metafield is attached to. - """ - ownerId: ID! @gidTypes(types: ["HasMetafields"]) - - """ - 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 - - """ - The data stored in the metafield. Always stored as a string, regardless of the metafield's type. - """ - value: String! -} - -""" -Return type for `metafieldsSet` mutation. -""" -type MetafieldsSetPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "platform") { - """ - ApiPermission metafields can only be created or updated by the app owner. - """ - APP_NOT_AUTHORIZED - - """ - The input value is blank. - """ - BLANK - - """ - The metafield can't be deleted due to owner. - """ - CANNOT_DELETE_DUE_TO_OWNER - - """ - The metafield violates a capability restriction. - """ - CAPABILITY_VIOLATION - - """ - Owner type can't be used in this mutation. - """ - DISALLOWED_OWNER_TYPE - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - 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 - - """ - 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 metafield has been modified since it was loaded. - """ - STALE_OBJECT - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT -} - -""" -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 @requiredAccess(scope: "`read_metaobjects` access scope.") @componentName(name: "content") { - """ - The app used to create the object. - """ - app: App! @deprecated(reason: "Use `createdByApp` instead.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! - - """ - The values of the metaobject. - """ - values: JSON! -} - -""" -Access permissions for the definition's metaobjects. -""" -type MetaobjectAccess @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The access permitted on the Admin API. - """ - admin: MetaobjectAdminAccessInput - - """ - The access permitted on the Customer Account API. - """ - customerAccount: MetaobjectCustomerAccountAccess - - """ - The access permitted on the Storefront API. - """ - storefront: MetaobjectStorefrontAccess -} - -""" -Metaobject access permissions for the Admin API. When the metaobject is app-owned, the owning app always has -full access. -""" -enum MetaobjectAdminAccess @componentName(name: "content") { - """ - 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 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 -} - -""" -Metaobject access permissions for the Admin API. When the metaobject is app-owned, the owning app always has -full access. -""" -enum MetaobjectAdminAccessInput @componentName(name: "content") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - A list of metaobjects IDs to delete. - """ - ids: [ID!] @gidTypes(types: ["Metaobject"]) - - """ - Deletes all metaobjects with the specified `type`. - """ - type: String -} - -""" -Provides the capabilities of a metaobject definition. -""" -type MetaobjectCapabilities @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - Indicates if the capability is enabled. - """ - enabled: Boolean! -} - -""" -The renderable capability of a metaobject definition. -""" -type MetaobjectCapabilitiesRenderable @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - Indicates if the capability is enabled. - """ - enabled: Boolean! -} - -""" -The input fields for creating a metaobject capability. -""" -input MetaobjectCapabilityCreateInput @componentName(name: "content") { - """ - The input for enabling the Online Store capability. - """ - onlineStore: MetaobjectCapabilityOnlineStoreInput - - """ - The input for enabling the publishable capability. - """ - publishable: MetaobjectCapabilityPublishableInput - - """ - The input for enabling the renderable capability. - """ - renderable: MetaobjectCapabilityRenderableInput - - """ - The input for enabling the translatable capability. - """ - translatable: MetaobjectCapabilityTranslatableInput -} - -""" -Provides the capabilities of a metaobject. -""" -type MetaobjectCapabilityData @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - Online Store capability input. - """ - onlineStore: MetaobjectCapabilityDataOnlineStoreInput - - """ - Publishable capability input. - """ - publishable: MetaobjectCapabilityDataPublishableInput -} - -""" -The Online Store capability for the parent metaobject. -""" -type MetaobjectCapabilityDataOnlineStore @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The theme template used when viewing the metaobject in a store. - """ - templateSuffix: String -} - -""" -The publishable capability for the parent metaobject. -""" -type MetaobjectCapabilityDataPublishable @componentName(name: "content") { - """ - The visibility status of this metaobject across all channels. - """ - status: MetaobjectStatus! -} - -""" -The input fields for publishable capability to adjust visibility on channels. -""" -input MetaobjectCapabilityDataPublishableInput @componentName(name: "content") { - """ - The visibility status of this metaobject across all channels. - """ - status: MetaobjectStatus! -} - -""" -The Online Store capability data for the metaobject definition. -""" -type MetaobjectCapabilityDefinitionDataOnlineStore @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - Whether to redirect published metaobjects automatically when the URL handle changes. - """ - createRedirects: Boolean = false - - """ - The URL handle for accessing pages of this metaobject type in the Online Store. - """ - urlHandle: String! -} - -""" -The renderable capability data for the metaobject definition. -""" -type MetaobjectCapabilityDefinitionDataRenderable @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 for enabling and disabling the Online Store capability. -""" -input MetaobjectCapabilityOnlineStoreInput @componentName(name: "content") { - """ - The data associated with the Online Store capability. - """ - data: MetaobjectCapabilityDefinitionDataOnlineStoreInput - - """ - Indicates whether the capability should be enabled or disabled. - """ - enabled: Boolean! -} - -""" -The input fields for enabling and disabling the publishable capability. -""" -input MetaobjectCapabilityPublishableInput @componentName(name: "content") { - """ - Indicates whether the capability should be enabled or disabled. - """ - enabled: Boolean! -} - -""" -The input fields for enabling and disabling the renderable capability. -""" -input MetaobjectCapabilityRenderableInput @componentName(name: "content") { - """ - The data associated with the renderable capability. - """ - data: MetaobjectCapabilityDefinitionDataRenderableInput - - """ - Indicates whether the capability should be enabled or disabled. - """ - enabled: Boolean! -} - -""" -The input fields for enabling and disabling the translatable capability. -""" -input MetaobjectCapabilityTranslatableInput @componentName(name: "content") { - """ - Indicates whether the capability should be enabled or disabled. - """ - enabled: Boolean! -} - -""" -Metaobject Capabilities types which can be enabled. -""" -enum MetaobjectCapabilityType @componentName(name: "content") { - """ - Allows for a Metaobject to be rendered as an Online Store page. - """ - ONLINE_STORE - - """ - Allows for a Metaobject to be conditionally publishable. - """ - PUBLISHABLE - - """ - Allows for a Metaobject to have attributes of a renderable page such as SEO. - """ - RENDERABLE - - """ - Allows for a Metaobject to be translated using the translation api. - """ - TRANSLATABLE -} - -""" -The input fields for updating a metaobject capability. -""" -input MetaobjectCapabilityUpdateInput @componentName(name: "content") { - """ - The input for enabling the Online Store capability. - """ - onlineStore: MetaobjectCapabilityOnlineStoreInput - - """ - The input for updating the publishable capability. - """ - publishable: MetaobjectCapabilityPublishableInput - - """ - The input for enabling the renderable capability. - """ - renderable: MetaobjectCapabilityRenderableInput - - """ - The input for updating the translatable capability. - """ - translatable: MetaobjectCapabilityTranslatableInput -} - -""" -An auto-generated type for paginating through multiple Metaobjects. -""" -type MetaobjectConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - Capabilities for the metaobject. - """ - capabilities: MetaobjectCapabilityDataInput - - """ - Values for fields. These are mapped by key to fields of the metaobject definition. - """ - fields: [MetaobjectFieldInput!] - - """ - A unique handle for the metaobject. This value is auto-generated when omitted. - """ - handle: String - - """ - The type of the metaobject. Must match an existing metaobject definition type. - """ - type: String! - - """ - The field values for the metaobject as a JSON object, keyed by field - definition key. Cannot be used in conjunction with `fields`. - """ - values: JSON -} - -""" -Return type for `metaobjectCreate` mutation. -""" -type MetaobjectCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - 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 @requiredAccess(scope: "`read_metaobject_definitions` access scope.") @componentName(name: "content") { - """ - Access configuration for the metaobject definition. - """ - access: MetaobjectAccess! - - """ - The capabilities of the metaobject definition. - """ - capabilities: MetaobjectCapabilities! - - """ - The date and time when the metaobject definition was created. - """ - createdAt: DateTime! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! - - """ - The date and time when the metaobject definition was last updated. - """ - updatedAt: DateTime! -} - -""" -An auto-generated type for paginating through multiple MetaobjectDefinitions. -""" -type MetaobjectDefinitionConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - Access configuration for the metaobjects created with this definition. - """ - access: MetaobjectAccessInput - - """ - The capabilities of the metaobject definition. - """ - capabilities: MetaobjectCapabilityCreateInput - - """ - An administrative description of the definition. - """ - description: String - - """ - The key of a field to reference as the display name for metaobjects of this type. - """ - displayNameKey: String - - """ - A set of field definitions to create on this metaobject definition. - """ - fieldDefinitions: [MetaobjectFieldDefinitionCreateInput!] - - """ - A human-readable name for the definition. This can be changed at any time. - """ - name: 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! -} - -""" -Return type for `metaobjectDefinitionCreate` mutation. -""" -type MetaobjectDefinitionCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - Access configuration for the metaobjects created with this definition. - """ - access: MetaobjectAccessInput - - """ - The capabilities of the metaobject definition. - """ - capabilities: MetaobjectCapabilityUpdateInput - - """ - An administrative description of the definition. - """ - description: String - - """ - The key of a metafield to reference as the display name for objects of this type. - """ - displayNameKey: String - - """ - A set of operations for modifying field definitions. - """ - fieldDefinitions: [MetaobjectFieldDefinitionOperationInput!] - - """ - A human-readable name for the definition. - """ - name: 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 -} - -""" -Return type for `metaobjectDefinitionUpdate` mutation. -""" -type MetaobjectDefinitionUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - ): 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - 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!]! - - """ - Whether this field is visible within the Storefront API. - """ - visibleToStorefrontApi: Boolean! -} - -""" -Capabilities available for a metaobject field definition. -""" -type MetaobjectFieldDefinitionCapabilities @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The input for configuring the admin filterable capability. - """ - adminFilterable: MetaobjectFieldCapabilityAdminFilterableInput -} - -""" -The input fields for creating a metaobject field definition. -""" -input MetaobjectFieldDefinitionCreateInput @componentName(name: "content") { - """ - Capabilities configuration for this field. - """ - capabilities: MetaobjectFieldDefinitionCapabilityCreateInput - - """ - An administrative description of the field. - """ - description: String - - """ - 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! - - """ - A human-readable name for the field. This can be changed at any time. - """ - name: String - - """ - Whether metaobjects require a saved value for the field. - """ - required: Boolean = false - - """ - The metafield type applied to values of the field. - """ - type: String! - - """ - Custom validations that apply to values assigned to the field. - """ - validations: [MetafieldDefinitionValidationInput!] - - """ - Whether the field is visible to the storefront API. - Defaults to the visibility of the parent metaobject definition. - """ - visibleToStorefrontApi: Boolean -} - -""" -The input fields for deleting a metaobject field definition. -""" -input MetaobjectFieldDefinitionDeleteInput @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The input fields for creating a metaobject field definition. - """ - create: MetaobjectFieldDefinitionCreateInput - - """ - The input fields for deleting a metaobject field definition. - """ - delete: MetaobjectFieldDefinitionDeleteInput - - """ - The input fields for updating a metaobject field definition. - """ - update: MetaobjectFieldDefinitionUpdateInput -} - -""" -The input fields for updating a metaobject field definition. -""" -input MetaobjectFieldDefinitionUpdateInput @componentName(name: "content") { - """ - Capabilities configuration for this field. - """ - capabilities: MetaobjectFieldDefinitionCapabilityCreateInput - - """ - An administrative description of the field. - """ - description: String - - """ - The key of the field definition to update. - """ - key: String! - - """ - A human-readable name for the field. - """ - name: String - - """ - Whether metaobjects require a saved value for the field. - """ - required: Boolean - - """ - Custom validations that apply to values assigned to the field. - """ - validations: [MetafieldDefinitionValidationInput!] - - """ - Whether the field is visible to the storefront API. - """ - visibleToStorefrontApi: Boolean -} - -""" -The input fields for a metaobject field value. -""" -input MetaobjectFieldInput @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - The handle of the metaobject to create or update. - """ - handle: String! - - """ - The type of the metaobject. Must match an existing metaobject definition type. - """ - type: String! -} - -""" -Defines visibility status for metaobjects. -""" -enum MetaobjectStatus @componentName(name: "content") { - """ - The metaobjects is active for public use. - """ - ACTIVE - - """ - The metaobjects is an internal record. - """ - DRAFT -} - -""" -Metaobject access permissions for the Storefront API. -""" -enum MetaobjectStorefrontAccess @componentName(name: "content") { - """ - No access. - """ - NONE - - """ - Read-only access. - """ - PUBLIC_READ -} - -""" -Provides attributes for visual representation. -""" -type MetaobjectThumbnail @componentName(name: "content") { - """ - 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 @componentName(name: "content") { - """ - Capabilities for the metaobject. - """ - capabilities: MetaobjectCapabilityDataInput - - """ - Values for fields. These are mapped by key to fields of the metaobject definition. - """ - fields: [MetaobjectFieldInput!] - - """ - A unique handle for the metaobject. - """ - handle: String - - """ - Whether to create a redirect for the metaobject. - """ - redirectNewHandle: Boolean = false - - """ - The field values for the metaobject as a JSON object, keyed by field - definition key. This is a full replacement — omitted keys are cleared on an - existing record. Cannot be used in conjunction with `fields`. - """ - values: JSON -} - -""" -Return type for `metaobjectUpdate` mutation. -""" -type MetaobjectUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - Capabilities for the metaobject. - """ - capabilities: MetaobjectCapabilityDataInput - - """ - Values for fields. These are mapped by key to fields of the metaobject definition. - """ - fields: [MetaobjectFieldInput!] - - """ - The handle of the metaobject. - """ - handle: String -} - -""" -Return type for `metaobjectUpsert` mutation. -""" -type MetaobjectUpsertPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "content") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - The input value is blank. - """ - BLANK - - """ - The capability you are using is not enabled. - """ - CAPABILITY_NOT_ENABLED - - """ - The display name cannot be the same when using the metaobject as a product option. - """ - DISPLAY_NAME_CONFLICT - - """ - Duplicate inputs were provided for this field key. - """ - DUPLICATE_FIELD_INPUT - - """ - Renderable data input is referencing an invalid field. - """ - FIELD_TYPE_INVALID - - """ - The targeted object cannot be modified. - """ - IMMUTABLE - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - The maximum number of input metaobjects has been exceeded. - """ - INPUT_LIMIT_EXCEEDED - - """ - An unexpected error occurred. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - The value for the metafield definition option was invalid. - """ - INVALID_OPTION - - """ - The metafield type is invalid. - """ - INVALID_TYPE - - """ - The value is invalid for the metafield type or the definition options. - """ - INVALID_VALUE - - """ - 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 input is missing required keys. - """ - MISSING_REQUIRED_KEYS - - """ - Not authorized. - """ - NOT_AUTHORIZED - - """ - Missing required fields were found for this object. - """ - OBJECT_FIELD_REQUIRED - - """ - The specified field key is already in use. - """ - OBJECT_FIELD_TAKEN - - """ - The input value needs to be blank. - """ - PRESENT - - """ - The requested record couldn't be found. - """ - RECORD_NOT_FOUND - - """ - The action cannot be completed because associated metaobjects are referenced by another resource. - """ - REFERENCE_EXISTS_ERROR - - """ - The provided name is reserved for system use. - """ - RESERVED_NAME - - """ - Definition is required by an installed app and cannot be deleted. - """ - STANDARD_METAOBJECT_DEFINITION_DEPENDENT_ON_APP - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT - - """ - No field definition found for this key. - """ - UNDEFINED_OBJECT_FIELD - - """ - No metaobject definition found for this type. - """ - UNDEFINED_OBJECT_TYPE - - """ - The Online Store URL handle cannot be blank. - """ - URL_HANDLE_BLANK - - """ - The Online Store URL handle is invalid. - """ - URL_HANDLE_INVALID - - """ - The Online Store URL handle is already taken. - """ - URL_HANDLE_TAKEN -} - -""" -The input fields for creating multiple metaobjects. -""" -input MetaobjectsCreateInput @componentName(name: "content") { - """ - An array of inputs used to create metaobjects. - """ - metaobjects: [MetaobjectsCreateMetaobjectInput!]! - - """ - The type of metaobjects to create. Must match an existing metaobject definition type. - """ - type: String! -} - -""" -The input fields for creating a single metaobject. -""" -input MetaobjectsCreateMetaobjectInput @componentName(name: "content") { - """ - Capabilities for the metaobject. - """ - capabilities: MetaobjectCapabilityDataInput - - """ - Values for fields. These are mapped by key to fields of the metaobject definition. - """ - fields: [MetaobjectFieldInput!] - - """ - A unique handle for the metaobject. This value is auto-generated when omitted. - """ - handle: String - - """ - The field values for the metaobject as a JSON object, keyed by field - definition key. Cannot be used in conjunction with `fields`. - """ - values: JSON -} - -""" -Return type for `metaobjectsCreate` mutation. -""" -type MetaobjectsCreatePayload @componentName(name: "platform") { - """ - The created metaobjects. - """ - metaobjects: [Metaobject!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MetaobjectUserError!]! -} - -""" -The set of valid sort keys for the MethodDefinition query. -""" -enum MethodDefinitionSortKeys @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") @componentName(name: "mobile_support") = AndroidApplication | AppleApplication - -""" -An auto-generated type for paginating through multiple MobilePlatformApplications. -""" -type MobilePlatformApplicationConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "mobile_support") { - """ - Whether Android App Links are supported by this app. - """ - appLinksEnabled: Boolean! - - """ - Android application ID. - """ - applicationId: String - - """ - The SHA256 fingerprints of the app’s signing certificate. - """ - sha256CertFingerprints: [String!]! -} - -""" -The input fields for an Apple based mobile platform application. -""" -input MobilePlatformApplicationCreateAppleInput @componentName(name: "mobile_support") { - """ - The Apple app clip application ID. - """ - appClipApplicationId: String - - """ - Whether Apple app clips are enabled for this app. - """ - appClipsEnabled: Boolean - - """ - Apple application ID. - """ - appId: String - - """ - Whether Apple shared web credentials are enabled for this app. - """ - sharedWebCredentialsEnabled: Boolean! - - """ - Whether Apple Universal Links are supported by this app. - """ - universalLinksEnabled: Boolean! -} - -""" -The input fields for a mobile application platform type. -""" -input MobilePlatformApplicationCreateInput @oneOf @componentName(name: "mobile_support") { - """ - Android based mobile platform application. - """ - android: MobilePlatformApplicationCreateAndroidInput - - """ - Apple based mobile platform application. - """ - apple: MobilePlatformApplicationCreateAppleInput -} - -""" -Return type for `mobilePlatformApplicationCreate` mutation. -""" -type MobilePlatformApplicationCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "mobile_support") { - """ - 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 @componentName(name: "mobile_support") { - """ - Whether Android App Links are supported by this app. - """ - appLinksEnabled: Boolean - - """ - Android application ID. - """ - applicationId: String - - """ - The SHA256 fingerprints of the app’s signing certificate. - """ - sha256CertFingerprints: [String!] -} - -""" -The input fields for an Apple based mobile platform application. -""" -input MobilePlatformApplicationUpdateAppleInput @componentName(name: "mobile_support") { - """ - The Apple App Clip application ID. - """ - appClipApplicationId: String - - """ - Whether Apple App Clips are enabled for this app. - """ - appClipsEnabled: Boolean - - """ - Apple application ID. - """ - appId: String - - """ - Whether Apple shared web credentials are enabled for this app. - """ - sharedWebCredentialsEnabled: Boolean - - """ - Whether Apple Universal Links are supported by this app. - """ - universalLinksEnabled: Boolean -} - -""" -The input fields for the mobile platform application platform type. -""" -input MobilePlatformApplicationUpdateInput @oneOf @componentName(name: "mobile_support") { - """ - Android based Mobile Platform Application. - """ - android: MobilePlatformApplicationUpdateAndroidInput - - """ - Apple based Mobile Platform Application. - """ - apple: MobilePlatformApplicationUpdateAppleInput -} - -""" -Return type for `mobilePlatformApplicationUpdate` mutation. -""" -type MobilePlatformApplicationUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "mobile_support") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - 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! - - """ - Status resulting from the latest update operation. See fileErrors for details. - """ - updateStatus: FileStatus - - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope, `read_files` access scope or `read_themes` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - Amount in shop currency. - """ - shopMoney: MoneyInput! -} - -""" -The input fields for a monetary value with currency. -""" -input MoneyInput @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The ID of the object to be moved. - """ - id: ID! @gidTypes(types: ["Product", "ProductImage", "Media"]) - - """ - 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 @componentName(name: "platform") { - """ - Updates the email state value for an abandonment. - """ - abandonmentEmailStateUpdate( - """ - The date and time for when the email was sent, if that is the case. - """ - emailSentAt: DateTime - - """ - The new email state of the abandonment. - """ - emailState: AbandonmentEmailState! - - """ - The reason why the email was or was not sent. - """ - emailStateChangeReason: String - - """ - The ID of the abandonment that needs to be updated. - """ - id: ID! @gidTypes(types: ["Abandonment"]) - ): AbandonmentEmailStateUpdatePayload @deprecated(reason: "Use `abandonmentUpdateActivitiesDeliveryStatuses` instead.") @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - Updates the marketing activities delivery statuses for an abandonment. - """ - abandonmentUpdateActivitiesDeliveryStatuses( - """ - The ID of the abandonment that needs to be updated. - """ - abandonmentId: ID! @gidTypes(types: ["Abandonment"]) - - """ - The delivery timestamp if the activity delivered. - """ - deliveredAt: DateTime - - """ - The new delivery status of the marketing activity for this abandonment. - """ - deliveryStatus: AbandonmentDeliveryState! - - """ - The reason why the activity was or was not delivered. - """ - deliveryStatusChangeReason: String - - """ - The ID of the marketing activity that needs to be updated. - """ - marketingActivityId: ID! @gidTypes(types: ["MarketingActivity"]) - ): AbandonmentUpdateActivitiesDeliveryStatusesPayload @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - Creates an [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget) that - defines a merchant's goal for a specific metric over a date range. For example, a merchant - can set a target of $50,000 in total sales for a quarter, or 1,000 orders in a month. - - Provide the target attributes through the `input` argument. The target's currency is set to - the shop's currency. A target is uniquely identified by the combination of `metric`, `startDate`, - `endDate`, and `filters` — attempting to create a duplicate returns a user error. - - Use [`analyticsTargetUpdate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetUpdate) - to modify an existing target, or - [`analyticsTargetsDelete`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetsDelete) - to remove targets. - """ - analyticsTargetCreate( - """ - The input fields for creating an [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). - """ - input: AnalyticsTargetCreateInput! - ): AnalyticsTargetCreatePayload @requiredAccess(scope: "`write_reports` access scope.") - - """ - Updates an existing [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). - Only the fields provided in the `input` argument are modified; omitted fields remain unchanged. - Setting a nullable field to `null` clears its value. - - Use [`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetCreate) - to create a new target, or - [`analyticsTargetsDelete`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetsDelete) - to remove targets. - """ - analyticsTargetUpdate( - """ - The ID of the analytics target to update. - """ - id: ID! @gidTypes(types: ["AnalyticsTarget"]) - - """ - The input fields for updating an [analytics target](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). - """ - input: AnalyticsTargetUpdateInput! - ): AnalyticsTargetUpdatePayload @requiredAccess(scope: "`write_reports` access scope.") - - """ - Deletes one or more [analytics targets](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget). - Accepts a list of target IDs and returns the IDs that were successfully deleted. If any ID - is not found, a user error is returned for that ID while the remaining valid targets are still deleted. - - Use [`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetCreate) - to create new targets, or - [`analyticsTargetUpdate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetUpdate) - to modify existing ones. - """ - analyticsTargetsDelete( - """ - The IDs of the analytics targets to delete. - """ - ids: [ID!]! @gidTypes(types: ["AnalyticsTarget"]) - ): AnalyticsTargetsDeletePayload @requiredAccess(scope: "`write_reports` access scope.") - - """ - 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 @requiredAccess(scope: "This mutation can only be run on the current app.") - - """ - 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! @gidTypes(types: ["AppSubscription"]) - - """ - Whether to issue prorated credits for the unused portion of the app subscription. There will - be a corresponding deduction (based on revenue share) to your Partner account. - For example, if a $10.00 app subscription (with 0% revenue share) is cancelled and prorated half way - through the billing cycle, then the merchant will be credited $5.00 and that amount will be deducted - from 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( - """ - Attaches one or more pricing plans to an app subscription. Only one pricing plan can be defined for each available type. - """ - lineItems: [AppSubscriptionLineItemInput!]! - - """ - A descriptive name for the app subscription. - """ - name: String! - - """ - The replacement behavior when creating an app subscription for a merchant with an already existing app subscription. - """ - replacementBehavior: AppSubscriptionReplacementBehavior = STANDARD - - """ - The URL pointing to the page where the merchant is redirected after approving the app subscription. - """ - returnUrl: URL! - - """ - 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 - ): 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 new maximum amount of usage charges that can be incurred within a subscription billing interval. - """ - cappedAmount: MoneyInput! - - """ - The ID of the app subscription line item to be updated. - """ - id: ID! @gidTypes(types: ["AppSubscriptionLineItem"]) - ): 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 number of days to extend the trial. The value must be greater than 0 and less than or equal to 1000. - """ - days: Int! - - """ - The ID of the app subscription to extend the trial for. - """ - id: ID! @gidTypes(types: ["AppSubscription"]) - ): AppSubscriptionTrialExtendPayload @requiredAccess(scope: "This must be a third party developed application that you can access.") - - """ - 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 @requiredAccess(scope: "This mutation can only be used by apps to uninstall themselves.") - - """ - 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 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 - - """ - The price of the app usage record. - """ - price: MoneyInput! - - """ - 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! @gidTypes(types: ["AppSubscriptionLineItem"]) - ): 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 @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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! @gidTypes(types: ["Article"]) - ): ArticleDeletePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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 properties of the article to be updated. - """ - article: ArticleUpdateInput! - - """ - The properties of the blog to be created. - """ - blog: ArticleBlogInput - - """ - The ID of the article to be updated. - """ - id: ID! @gidTypes(types: ["Article"]) - ): ArticleUpdatePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - 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 @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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! @gidTypes(types: ["Blog"]) - ): BlogDeletePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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 properties of the blog to be updated. - """ - blog: BlogUpdateInput! - - """ - The ID of the blog to be updated. - """ - id: ID! @gidTypes(types: ["Blog"]) - ): BlogUpdatePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - Creates resource feedback for multiple discounts. - """ - bulkDiscountResourceFeedbackCreate( - """ - An array of inputs to create the feedback. Limited to 50. - """ - feedbackInput: [DiscountResourceFeedbackInput!]! - ): BulkDiscountResourceFeedbackCreatePayload @requiredAccess(scope: "`write_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") - - """ - 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! @gidTypes(types: ["BulkOperation"]) - ): 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. - You can run one bulk mutation operation at a time per shop, though a [`bulkOperationRunQuery`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/bulkoperationrunquery) - operation can run simultaneously. - - Learn more about [bulk importing data](https://shopify.dev/docs/api/usage/bulk-operations/imports). - """ - bulkOperationRunMutation( - """ - An optional identifier which may be used for querying. - """ - clientIdentifier: 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.") - - """ - The mutation to be executed in bulk. - """ - mutation: String! - - """ - The staged upload path of the file containing mutation variables. - """ - stagedUploadPath: String! - ): BulkOperationRunMutationPayload @requiredAccess(scope: "Only accessible by supported access tokens: https:\/\/shopify.dev\/docs\/api\/usage\/bulk-operations\/queries#access-token-considerations.") - - """ - 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. - - Apps can run one bulk query operation and one bulk mutation operation at a - time per shop. 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( - """ - 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 - - """ - The query to be executed in bulk. - """ - query: String! - ): BulkOperationRunQueryPayload @requiredAccess(scope: "Only accessible by supported access tokens: https:\/\/shopify.dev\/docs\/api\/usage\/bulk-operations\/queries#access-token-considerations.") - - """ - Creates product feedback for multiple products. - """ - bulkProductResourceFeedbackCreate( - """ - An array of inputs to create the feedback. Limited to 50. - """ - feedbackInput: [ProductResourceFeedbackInput!]! - ): BulkProductResourceFeedbackCreatePayload @requiredAccess(scope: "`write_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") - - """ - 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 @requiredAccess(scope: "`write_shipping` access scope.") - - """ - Removes an existing carrier service. - """ - carrierServiceDelete( - """ - The global ID of the carrier service to delete. - """ - id: ID! @gidTypes(types: ["CarrierService"]) - ): CarrierServiceDeletePayload @requiredAccess(scope: "`write_shipping` access scope.") - - """ - 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 @requiredAccess(scope: "`write_shipping` access scope.") - - """ - 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( - """ - Whether a run failure should block cart and checkout operations. - """ - blockOnFailure: Boolean = false - - """ - The handle of the Function providing the cart transform. - """ - functionHandle: String - - """ - The identifier of the Function providing the cart transform. - """ - functionId: String @deprecated(reason: "Use `functionHandle` instead.") - - """ - Additional metafields to associate to the cart transform. - """ - metafields: [MetafieldInput!] = [] - ): CartTransformCreatePayload @requiredAccess(scope: "`write_cart_transforms` access scope. Also: The shop must have\n[upgraded to Checkout Extensibility](https:\/\/help.shopify.com\/manual\/checkout-settings\/checkout-extensibility\/checkout-upgrade)\nand the user must have\n[products and preferences permission](https:\/\/help.shopify.com\/manual\/your-account\/staff-accounts\/staff-permissions)\nto create a cart transform function.\n") - - """ - 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! @gidTypes(types: ["CartTransform"]) - ): CartTransformDeletePayload @requiredAccess(scope: "`write_cart_transforms` access scope. Also: The user must have products and preferences permission to delete a cart transform function.") - - """ - Creates a cash drawer in a provided location. - """ - cashDrawerCreate( - """ - The location the cash drawer is located in. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - The name of the cash drawer. - """ - name: String! - ): CashDrawerCreatePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - Finds or creates a cash drawer for cash management. Also ensures the provided device is assigned to the drawer. - """ - cashDrawerFindOrCreate( - """ - The location the cash drawer is located in. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - The name of the cash drawer. - """ - name: String! - - """ - The point of sale device to assign to the cash drawer. - """ - pointOfSaleDeviceId: ID! @gidTypes(types: ["PointOfSaleDevice"]) - ): CashDrawerFindOrCreatePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - Updates a cash drawer. - """ - cashDrawerUpdate( - """ - The ID of the cash drawer to update. - """ - id: ID! @gidTypes(types: ["CashDrawer"]) - - """ - The input fields for updating a cash drawer. - """ - input: CashDrawerUpdateInput! - ): CashDrawerUpdatePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - Create a cash management reason code. - """ - cashManagementReasonCodeCreate( - """ - The reason code to create. - """ - code: String! - ): CashManagementReasonCodeCreatePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - Deletes a cash management reason code. - """ - cashManagementReasonCodeDelete( - """ - The reason code id to delete. - """ - id: ID! @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) - ): CashManagementReasonCodeDeletePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - 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! @gidTypes(types: ["Catalog"]) - - """ - The contexts to add to the catalog. - """ - contextsToAdd: CatalogContextInput - - """ - The contexts to remove from the catalog. - """ - contextsToRemove: CatalogContextInput - ): CatalogContextUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") - - """ - 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 @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") - - """ - Delete a catalog. - """ - catalogDelete( - """ - Whether to also delete the price list and the publication owned by the catalog. - """ - deleteDependentResources: Boolean = false - - """ - The ID of the catalog to delete. - """ - id: ID! @gidTypes(types: ["Catalog"]) - ): CatalogDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to delete catalogs.") - - """ - 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! @gidTypes(types: ["Catalog"]) - - """ - The properties of the updated catalog. - """ - input: CatalogUpdateInput! - ): CatalogUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") - - """ - Creates a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) - representing a connection between the shop and an external selling platform - account. Use this mutation after a merchant authenticates with an external - platform to establish the publishing destination for product syndication and, - for order-generating channels, order import. - - The platform resolves the [channel specification](https://shopify.dev/docs/apps/build/sales-channels/channel-config-extension) - identified by `specificationHandle`, determines its country coverage, - intersects with the shop's available region markets, and establishes product - feeds for all matching regions. Product feeds immediately begin emitting - events to the application's webhook or event subscription. - - If the specification sets `expects_online_store_parity` and no matching region - markets exist, the mutation returns an error. If the specification doesn't - require online store parity and no matching region markets exist, a channel - subordinate to shop defaults is created automatically. - """ - channelCreate( - """ - The input fields for creating the channel. - """ - input: ChannelCreateInput! - ): ChannelCreatePayload - - """ - Deletes a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) - from the shop. All associated product feeds are removed. Existing orders - attributed to the channel are preserved. The channel must have been created via [`channelCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelCreate). - """ - channelDelete( - """ - The ID of the channel to delete. - """ - id: ID! @gidTypes(types: ["Channel", "Publication"]) - ): ChannelDeletePayload - - """ - Triggers a full product resync for the specified [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). - All published products are added to the channel's product feed attention set, - causing the next poll or event-triggered consumption to receive current state - for the complete catalog. Use this mutation after initial channel setup, after - recovering from a prolonged outage, or when the channel's external catalog has - drifted from Shopify's state. - - The sync can be scoped to a specific country and language. When neither is - specified, all country-language combinations covered by the channel's - specification are triggered. - """ - channelFullSync( - """ - Syncs only products that haven't changed since the specified timestamp. - """ - beforeUpdatedAt: DateTime - - """ - The ID of the channel to trigger a full sync for. Accepts a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) or [`Publication`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) global ID. - """ - channelId: ID! @gidTypes(types: ["Channel", "Publication"]) - - """ - The country to scope the sync to. When omitted, all countries covered by the channel's specification are synced. - """ - country: CountryCode - - """ - The language to scope the sync to. When omitted, all languages for the targeted countries are synced. - """ - language: LanguageCode - - """ - Syncs only products that have changed since the specified timestamp. - """ - updatedAtSince: DateTime - ): ChannelFullSyncPayload @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") - - """ - Updates the properties of an existing [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel). - Use this mutation to update account information — such as the display name - shown in Shopify Admin — or to bind the channel to a different channel specification. - - Updating the `specificationHandle` triggers re-evaluation of the - specification's country coverage against the shop's region markets, - reconciling product feeds accordingly. This is also the mechanism for - migrating legacy channel records to the multi-channel model by assigning a - specification handle. - """ - channelUpdate( - """ - The ID of the [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) to update. - """ - id: ID! @gidTypes(types: ["Channel", "Publication"]) - - """ - The input fields for updating the channel. - """ - input: ChannelUpdateInput! - ): ChannelUpdatePayload - - """ - Updates a checkout and accounts configuration. - """ - checkoutAndAccountsConfigurationUpdate( - """ - The intended changes to the configuration. - """ - configuration: CheckoutAndAccountsConfigurationInput! - - """ - The ID of the configuration to update. - """ - id: ID! @gidTypes(types: ["Configuration"]) - ): CheckoutAndAccountsConfigurationUpdatePayload @requiredAccess(scope: "`write_checkout_and_accounts_configurations` access scope or `write_checkout_settings` access scope. Also: User must have `manage_checkout_settings` permission and shop must have access to the checkout and accounts editor as well as the contextualized checkouts and customer accounts feature. When modifying configuration overrides, user must have `view_markets` and `create_and_edit_markets` permissions.") - - """ - 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( - """ - The input fields to use to upsert the checkout branding settings (pass null to reset them to default). - """ - checkoutBrandingInput: CheckoutBrandingInput - - """ - A globally-unique identifier. - """ - checkoutProfileId: ID! @gidTypes(types: ["CheckoutProfile"]) - ): CheckoutBrandingUpsertPayload @deprecated(reason: "Use `checkoutAndAccountsConfigurationUpdate` instead.") @requiredAccess(scope: "access to checkout branding settings and the shop must be on a Plus plan or a Development store plan. User must have `preferences` permission to modify.") - - """ - 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. - - This operation only works with manual collections where merchants explicitly - choose which products to include. It will return an error if used with smart - collections that automatically include products based on conditions. - - 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. This can't be a smart collection. - """ - id: ID! @gidTypes(types: ["Collection"]) - - """ - The IDs of the products that are being added to the collection. - If any of the products is already present in the input collection, - then an error is raised and no products are added. - """ - productIds: [ID!]! @gidTypes(types: ["Product"]) - ): CollectionAddProductsPayload @requiredAccess(scope: "`write_products` access scope. Also: The store must not be on the Starter or Retail plans and user must have a permission to add products to a collection.") - - """ - 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! @gidTypes(types: ["Collection"]) - - """ - 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!]! @gidTypes(types: ["Product"]) - ): CollectionAddProductsV2Payload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to add products to a collection.") - - """ - 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. - - There are two types of collections: - - - **[Custom (manual) collections](https://help.shopify.com/manual/products/collections/manual-shopify-collection)**: - You specify the products to include in a collection. - - **[Smart (automated) collections](https://help.shopify.com/manual/products/collections/automated-collections)**: - You define rules, and products matching those rules are automatically - included in the collection. - - 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 rules (for example, by tag, type, or price) - - > 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 smart collections](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). - """ - collectionCreate( - """ - The properties to use when creating the collection. - """ - input: CollectionInput! - ): CollectionCreatePayload @requiredAccess(scope: "`write_products` access scope. Also: The app must have access to the input fields used to create the collection. Further, the store must not be on the Starter or Retail plans and user must have a permission to create collection.") - - """ - 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 @requiredAccess(scope: "`write_products` access scope. Also: The store must not be on the Starter or Retail plans and user must have a permission to delete collection.") - - """ - 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 @requiredAccess(scope: "`write_products` access scope. Also: The store must not be on the Starter or Retail plans and user must have permission to create collections. If also copying publications, user must have permission to manage publications.") - - """ - 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.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to publish a collection.") - - """ - Removes multiple 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 manual collection. - """ - id: ID! @gidTypes(types: ["Collection"]) - - """ - 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!]! @gidTypes(types: ["Product"]) - ): CollectionRemoveProductsPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to remove products from a collection.") - - """ - 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! @gidTypes(types: ["Collection"]) - - """ - A list of moves to perform, evaluated in order. Provide only products whose - positions changed; do not send the full list. - `newPosition` is a zero-based index evaluated at the time each move is applied (after any prior moves). - `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. - Up to 250 moves are supported. - """ - moves: [MoveInput!]! - ): CollectionReorderProductsPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to reorder products within a collection.") - - """ - 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.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to unpublish a collection.") - - """ - 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 (using rule updates for smart collections) - - Publishing or unpublishing collections across different sales channels - - Updating custom data using [metafields](https://shopify.dev/docs/apps/build/custom-data/metafields) - - There are two types of collections with different update capabilities: - - - **[Custom (manual) collections](https://help.shopify.com/manual/products/collections/manual-shopify-collection)**: - You can update collection properties, but rule sets can't be modified since - products are manually selected. - - **[Smart (automated) collections](https://help.shopify.com/manual/products/collections/automated-collections)**: - You can update both collection properties and the rules that automatically - determine which products are included. - When updating [rule sets](https://shopify.dev/docs/api/admin-graphql/latest/objects/CollectionRuleConditions) - for smart collections, 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 smart collections](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). - """ - collectionUpdate( - """ - The updated properties for the collection. - """ - input: CollectionInput! - ): CollectionUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The app must have access to the input fields used to update the collection. Further, the store must not be on the Starter or Retail plans and user must have a permission to update collection.") - - """ - 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 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!] - - """ - The ID of the parent product. - """ - parentProductId: ID! - - """ - 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!] @gidTypes(types: ["Product"]) - - """ - The updated title for the combined listing. - """ - title: String - ): CombinedListingUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to manage products.") - - """ - 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! @gidTypes(types: ["Comment"]) - ): CommentApprovePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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! @gidTypes(types: ["Comment"]) - ): CommentDeletePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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! @gidTypes(types: ["Comment"]) - ): CommentNotSpamPayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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! @gidTypes(types: ["Comment"]) - ): CommentSpamPayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - Deletes a list of companies. - """ - companiesDelete( - """ - A list of IDs of companies to delete. - """ - companyIds: [ID!]! @gidTypes(types: ["Company"]) - ): CompaniesDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Deletes a company address. - """ - companyAddressDelete( - """ - The ID of the address to delete. - """ - addressId: ID! @gidTypes(types: ["CompanyAddress"]) - ): CompanyAddressDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - 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! @gidTypes(types: ["Company"]) - - """ - The ID of the customer to assign as the contact. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - ): CompanyAssignCustomerAsContactPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Assigns the main contact for the company. - """ - companyAssignMainContact( - """ - The ID of the company contact to be assigned as the main contact. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - - """ - The ID of the company to assign the main contact to. - """ - companyId: ID! @gidTypes(types: ["Company"]) - ): CompanyAssignMainContactPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Assigns a role to a contact for a location. - """ - companyContactAssignRole( - """ - The ID of the contact to assign a role to. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - - """ - The ID of the role to assign to a contact. - """ - companyContactRoleId: ID! @gidTypes(types: ["CompanyContactRole"]) - - """ - The ID of the location to assign a role to a contact. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) - ): CompanyContactAssignRolePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Assigns roles on a company contact. - """ - companyContactAssignRoles( - """ - The contact whose roles are being assigned. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - - """ - The new roles to assign. - """ - rolesToAssign: [CompanyContactRoleAssign!]! - ): CompanyContactAssignRolesPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Creates a company contact and the associated customer. - """ - companyContactCreate( - """ - The ID of the company that the company contact belongs to. - """ - companyId: ID! @gidTypes(types: ["Company"]) - - """ - The fields to use to create the company contact. - """ - input: CompanyContactInput! - ): CompanyContactCreatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Deletes a company contact. - """ - companyContactDelete( - """ - The ID of the company contact to delete. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - ): CompanyContactDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Removes a company contact from a Company. - """ - companyContactRemoveFromCompany( - """ - The ID of the company contact to remove from the Company. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - ): CompanyContactRemoveFromCompanyPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Revokes a role on a company contact. - """ - companyContactRevokeRole( - """ - The ID of the contact to revoke a role from. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - - """ - The ID of the role assignment to revoke from a contact. - """ - companyContactRoleAssignmentId: ID! @gidTypes(types: ["CompanyContactRoleAssignment"]) - ): CompanyContactRevokeRolePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Revokes roles on a company contact. - """ - companyContactRevokeRoles( - """ - The contact whose roles are being revoked. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - - """ - Flag to revoke all roles on the contact. - """ - revokeAll: Boolean = false - - """ - The current role assignment IDs to revoke. - """ - roleAssignmentIds: [ID!] @gidTypes(types: ["CompanyContactRoleAssignment"]) - ): CompanyContactRevokeRolesPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Sends the company contact a welcome email. - """ - companyContactSendWelcomeEmail( - """ - The ID of the company contact to send welcome email to. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - - """ - The welcome email fields. - """ - email: EmailInput - ): CompanyContactSendWelcomeEmailPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") @privatelyDocumented - - """ - Updates a company contact. - """ - companyContactUpdate( - """ - The ID of the company contact to be updated. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - - """ - The fields to use to update the company contact. - """ - input: CompanyContactInput! - ): CompanyContactUpdatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Deletes one or more company contacts. - """ - companyContactsDelete( - """ - The list of IDs of the company contacts to delete. - """ - companyContactIds: [ID!]! @gidTypes(types: ["CompanyContact"]) - ): CompanyContactsDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - 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 @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Deletes a company. - """ - companyDelete( - """ - The ID of the company to delete. - """ - id: ID! @gidTypes(types: ["Company"]) - ): CompanyDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Updates an address on a company location. - """ - companyLocationAssignAddress( - """ - The input fields to use to update the address. - """ - address: CompanyAddressInput! - - """ - The list of address types on the location to update. - """ - addressTypes: [CompanyAddressType!]! - - """ - The ID of the company location to update addresses on. - """ - locationId: ID! @gidTypes(types: ["CompanyLocation"]) - ): CompanyLocationAssignAddressPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Assigns roles on a company location. - """ - companyLocationAssignRoles( - """ - The location whose roles are being assigned. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) - - """ - The roles to assign. - """ - rolesToAssign: [CompanyLocationRoleAssign!]! - ): CompanyLocationAssignRolesPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - 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! @gidTypes(types: ["CompanyLocation"]) - - """ - The list of IDs of the staff members to assign. - """ - staffMemberIds: [ID!]! @gidTypes(types: ["StaffMember"]) - ): CompanyLocationAssignStaffMembersPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Assigns tax exemptions to the company location. - """ - companyLocationAssignTaxExemptions( - """ - The location to which the tax exemptions will be assigned. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) - - """ - The tax exemptions that are being assigned to the location. - """ - taxExemptions: [TaxExemption!]! - ): CompanyLocationAssignTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - 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! @gidTypes(types: ["Company"]) - - """ - The fields to use to create the company location. - """ - input: CompanyLocationInput! - ): CompanyLocationCreatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Creates a tax registration for a company location. - """ - companyLocationCreateTaxRegistration( - """ - The ID of the company location that the tax registration gets assigned to. - """ - locationId: ID! @gidTypes(types: ["CompanyLocation"]) - - """ - The unique tax id for the tax registration. - """ - taxId: String! - ): CompanyLocationCreateTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Deletes a company location. - """ - companyLocationDelete( - """ - The ID of the company location to delete. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) - ): CompanyLocationDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - 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!]! @gidTypes(types: ["CompanyLocationStaffMemberAssignment"]) - ): CompanyLocationRemoveStaffMembersPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Revokes roles on a company location. - """ - companyLocationRevokeRoles( - """ - The location whose roles are being revoked. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) - - """ - The current roles to revoke. - """ - rolesToRevoke: [ID!]! @gidTypes(types: ["CompanyContactRoleAssignment"]) - ): CompanyLocationRevokeRolesPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Revokes tax exemptions from the company location. - """ - companyLocationRevokeTaxExemptions( - """ - The location from which the tax exemptions will be revoked. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) - - """ - The tax exemptions that are being revoked from the location. - """ - taxExemptions: [TaxExemption!]! - ): CompanyLocationRevokeTaxExemptionsPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Revokes tax registration on a company location. - """ - companyLocationRevokeTaxRegistration( - """ - The location whose tax registration is being revoked. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) - ): CompanyLocationRevokeTaxRegistrationPayload @deprecated(reason: "Use `companyLocationTaxSettingsUpdate` instead.") @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Sets the tax settings for a company location. - """ - companyLocationTaxSettingsUpdate( - """ - The ID of the company location that the tax settings get assigned to. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) - - """ - 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!] - - """ - Whether the location is exempt from taxes. - """ - taxExempt: Boolean - - """ - The unique tax registration ID for the company location. - """ - taxRegistrationId: String - ): CompanyLocationTaxSettingsUpdatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - 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! @gidTypes(types: ["CompanyLocation"]) - - """ - The input fields to update in the company location. - """ - input: CompanyLocationUpdateInput! - ): CompanyLocationUpdatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Deletes a list of company locations. - """ - companyLocationsDelete( - """ - A list of IDs of company locations to delete. - """ - companyLocationIds: [ID!]! @gidTypes(types: ["CompanyLocation"]) - ): CompanyLocationsDeletePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Revokes the main contact from the company. - """ - companyRevokeMainContact( - """ - The ID of the company to revoke the main contact from. - """ - companyId: ID! @gidTypes(types: ["Company"]) - ): CompanyRevokeMainContactPayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - 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! @gidTypes(types: ["Company"]) - - """ - The input fields to update the company. - """ - input: CompanyInput! - ): CompanyUpdatePayload @requiredAccess(scope: "`write_customers` access scope or `write_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - 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 @requiredAccess(scope: "`write_privacy_settings` access scope.") - - """ - Add tax exemptions for the customer. - """ - customerAddTaxExemptions( - """ - The ID of the customer to update. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - 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 @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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( - """ - Specifies the fields to use when creating the address. - """ - address: MailingAddressInput! - - """ - The ID of the customer. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - Whether to set the address as the customer's default address. - """ - setAsDefault: Boolean - ): CustomerAddressCreatePayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - Deletes a customer's address. - """ - customerAddressDelete( - """ - The ID of the address to be deleted from the customer. - """ - addressId: ID! @gidTypes(types: ["MailingAddress"]) - - """ - The ID of the customer whose address is being deleted. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - ): CustomerAddressDeletePayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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( - """ - Specifies the fields to use when updating the address. - """ - address: MailingAddressInput! - - """ - The ID of the address to update. - """ - addressId: ID! @gidTypes(types: ["MailingAddress"]) - - """ - The ID of the customer whose address is being updated. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - Whether to set the address as the customer's default address. - """ - setAsDefault: Boolean - ): CustomerAddressUpdatePayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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! @gidTypes(types: ["Customer"]) - ): CustomerCancelDataErasurePayload @requiredAccess(scope: "`write_customer_data_erasure` access scope. Also: The user must have access to erase customer data.") - - """ - 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 @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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 @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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 @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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! @gidTypes(types: ["Customer"]) - ): CustomerGenerateAccountActivationUrlPayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - Merges two customers. - """ - customerMerge( - """ - The ID of the first customer that will be merged. - """ - customerOneId: ID! @gidTypes(types: ["Customer"]) - - """ - The ID of the second customer that will be merged. - """ - customerTwoId: ID! @gidTypes(types: ["Customer"]) - - """ - The fields to override the default customer merge rules. - """ - overrideFields: CustomerMergeOverrideFields - ): CustomerMergePayload @requiredAccess(scope: "`write_customer_merge` access scope.") - - """ - 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 billing address. - """ - billingAddress: MailingAddressInput! - - """ - The ID of the customer. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - The encrypted payment method data. - """ - encryptedDuplicationData: String! - ): CustomerPaymentMethodCreateFromDuplicationDataPayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_vaulted_payment_method_duplication` scope.") @privatelyDocumented - - """ - 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 billing address. - """ - billingAddress: MailingAddressInput! - - """ - The ID of the customer. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - 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 @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") - - """ - 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 billing address. - """ - billingAddress: MailingAddressInput! - - """ - The ID of the customer payment method. - """ - id: ID! @gidTypes(types: ["CustomerPaymentMethod"]) - - """ - The Cardserver session ID. - """ - sessionId: String! - ): CustomerPaymentMethodCreditCardUpdatePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") - - """ - 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! @gidTypes(types: ["CustomerPaymentMethod"]) - - """ - The customer the payment method will be duplicated into. - """ - targetCustomerId: ID! @gidTypes(types: ["Customer"]) - - """ - The shop the payment method will be duplicated into. - """ - targetShopId: ID! @gidTypes(types: ["Shop"]) - ): CustomerPaymentMethodGetDuplicationDataPayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_vaulted_payment_method_duplication` scope.") @privatelyDocumented - - """ - 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! @gidTypes(types: ["CustomerPaymentMethod"]) - ): CustomerPaymentMethodGetUpdateUrlPayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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 billing address. - """ - billingAddress: MailingAddressInput - - """ - The billing agreement ID from PayPal that starts with 'B-' (for example, `B-1234XXXXX`). - """ - billingAgreementId: String! - - """ - The ID of the customer. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - Whether the PayPal billing agreement is inactive. - """ - inactive: Boolean = false - ): CustomerPaymentMethodPaypalBillingAgreementCreatePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") - - """ - 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 billing address. - """ - billingAddress: MailingAddressInput! - - """ - The ID of the customer payment method. - """ - id: ID! @gidTypes(types: ["CustomerPaymentMethod"]) - ): CustomerPaymentMethodPaypalBillingAgreementUpdatePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") - - """ - 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! @gidTypes(types: ["Customer"]) - - """ - Disables the requirement for a billing address on the remote payment method. - """ - disableAddressValidation: Boolean = false - - """ - Remote gateway payment method details. - """ - remoteReference: CustomerPaymentMethodRemoteInput! - ): CustomerPaymentMethodRemoteCreatePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") - - """ - 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! @gidTypes(types: ["CustomerPaymentMethod"]) - ): CustomerPaymentMethodRevokePayload @requiredAccess(scope: "`write_customers` access scope. Also: Requires `write_customer_payment_methods` scope.") - - """ - 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! @gidTypes(types: ["CustomerPaymentMethod"]) - - """ - Specifies the payment method update email fields. Only the 'from' and 'bcc' fields are accepted for input. - """ - email: EmailInput - ): CustomerPaymentMethodSendUpdateEmailPayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - Remove tax exemptions from a customer. - """ - customerRemoveTaxExemptions( - """ - The ID of the customer to update. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - 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 @requiredAccess(scope: "`write_customers` access scope.") - - """ - Replace tax exemptions for a customer. - """ - customerReplaceTaxExemptions( - """ - The ID of the customer to update. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - The list of tax exemptions that will replace the current exemptions for a - customer. Can be 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!]! - ): CustomerReplaceTaxExemptionsPayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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! @gidTypes(types: ["Customer"]) - ): CustomerRequestDataErasurePayload @requiredAccess(scope: "`write_customer_data_erasure` access scope. Also: The user must have access to erase customer data.") - - """ - Creates a customer segment members query. - """ - customerSegmentMembersQueryCreate( - """ - The input fields to create a customer segment members query. - """ - input: CustomerSegmentMembersQueryInput! - ): CustomerSegmentMembersQueryCreatePayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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! @gidTypes(types: ["Customer"]) - - """ - Specifies the account invite email fields. - """ - email: EmailInput - ): CustomerSendAccountInviteEmailPayload @requiredAccess(scope: "`write_customers` access scope. Also: The user must have permission to create and edit customers.") - - """ - 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( - """ - Specifies the identifier that will be used to lookup the resource. - """ - identifier: CustomerSetIdentifiers - - """ - The properties of the customer. - """ - input: CustomerSetInput! - ): CustomerSetPayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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 @requiredAccess(scope: "`write_customers` access scope.") - - """ - 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 @requiredAccess(scope: "`write_customers` access scope.") - - """ - Updates a customer's default address. - """ - customerUpdateDefaultAddress( - """ - The ID of the customer's new default address. - """ - addressId: ID! @gidTypes(types: ["MailingAddress"]) - - """ - The ID of the customer whose default address is being updated. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - ): CustomerUpdateDefaultAddressPayload @requiredAccess(scope: "`write_customers` access scope.") - - """ - Opt out a customer from data sale. - """ - dataSaleOptOut( - """ - The email address of the customer to opt out of data sale. - """ - email: String! - ): DataSaleOptOutPayload @requiredAccess(scope: "`write_privacy_settings` access scope.") - - """ - 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 enabled status of the delivery customizations. - """ - enabled: Boolean! - - """ - The global IDs of the delivery customizations. - """ - ids: [ID!]! @gidTypes(types: ["DeliveryCustomization"]) - ): DeliveryCustomizationActivationPayload @requiredAccess(scope: "`write_delivery_customizations` access scope.") - - """ - Creates a delivery customization. - """ - deliveryCustomizationCreate( - """ - The input data used to create the delivery customization. - """ - deliveryCustomization: DeliveryCustomizationInput! - ): DeliveryCustomizationCreatePayload @requiredAccess(scope: "`write_delivery_customizations` access scope.") - - """ - Creates a delivery customization. - """ - deliveryCustomizationDelete( - """ - The global ID of the delivery customization. - """ - id: ID! @gidTypes(types: ["DeliveryCustomization"]) - ): DeliveryCustomizationDeletePayload @requiredAccess(scope: "`write_delivery_customizations` access scope.") - - """ - Updates a delivery customization. - """ - deliveryCustomizationUpdate( - """ - The input data used to update the delivery customization. - """ - deliveryCustomization: DeliveryCustomizationInput! - - """ - The global ID of the delivery customization. - """ - id: ID! @gidTypes(types: ["DeliveryCustomization"]) - ): DeliveryCustomizationUpdatePayload @requiredAccess(scope: "`write_delivery_customizations` access scope.") - - """ - 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 @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") - - """ - Enqueue the removal of a delivery profile. - """ - deliveryProfileRemove( - """ - The ID of the delivery profile to remove. - """ - id: ID! @gidTypes(types: ["Profile"]) - ): DeliveryProfileRemovePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") - - """ - 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! @gidTypes(types: ["Profile"]) - - """ - Specifies the input fields for a delivery profile. - """ - profile: DeliveryProfileInput! - ): DeliveryProfileUpdatePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") - - """ - 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!] = [] @gidTypes(types: ["ProductVariant"]) - - """ - The owners to remove from the delivery promise participants. - """ - ownersToRemove: [ID!] = [] @gidTypes(types: ["ProductVariant"]) - ): DeliveryPromiseParticipantsUpdatePayload @requiredAccess(scope: "`write_delivery_promises` access scope.") - - """ - 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 ID of the location that will be associated with the delivery promise provider. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - 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 - ): DeliveryPromiseProviderUpsertPayload @requiredAccess(scope: "`write_delivery_promises` access scope.") - - """ - Set the delivery settings for a shop. - """ - deliverySettingUpdate: 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! @gidTypes(types: ["Location"]) - ): DeliveryShippingOriginAssignPayload @deprecated(reason: "Single origin shipping mode is no longer supported.") @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") - - """ - Activates an automatic discount. - """ - discountAutomaticActivate( - """ - The ID of the automatic discount to activate. - """ - id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) - ): DiscountAutomaticActivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 @requiredAccess(scope: "`write_discounts` access scope.") - - """ - 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 input fields required to update the automatic discount. - """ - automaticAppDiscount: DiscountAutomaticAppInput! - - """ - The ID of the automatic discount to update. - """ - id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) - ): DiscountAutomaticAppUpdatePayload @requiredAccess(scope: "`write_discounts` access scope.") - - """ - 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 input data used to update the automatic amount off discount. - """ - automaticBasicDiscount: DiscountAutomaticBasicInput! - - """ - The ID of the automatic amount off discount to update. - """ - id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) - ): DiscountAutomaticBasicUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 IDs of the automatic discounts to delete. - """ - ids: [ID!] @gidTypes(types: ["DiscountAutomaticNode"]) - - """ - The ID of the saved search to use for filtering automatic discounts to delete. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - The search query for filtering automatic discounts to delete. - - For 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 - ): DiscountAutomaticBulkDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 input data used to update the automatic BXGY discount. - """ - automaticBxgyDiscount: DiscountAutomaticBxgyInput! - - """ - The ID of the automatic BXGY discount to update. - """ - id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) - ): DiscountAutomaticBxgyUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - Deactivates an automatic discount. - """ - discountAutomaticDeactivate( - """ - The ID of the automatic discount to deactivate. - """ - id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) - ): DiscountAutomaticDeactivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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! @gidTypes(types: ["DiscountAutomaticNode"]) - ): DiscountAutomaticDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 input data used to update the automatic free shipping discount. - """ - freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput! - - """ - The ID of the automatic free shipping discount to update. - """ - id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) - ): DiscountAutomaticFreeShippingUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - Adds tags to multiple - [discounts](https://help.shopify.com/manual/discounts/discount-types) - asynchronously using one of the following: - - A search query - - A saved search ID - - A list of discount IDs - - For example, you can add tags to price rules that match a search criteria, or add tags to a predefined set of price rules. - """ - discountBulkTagsAdd( - """ - The IDs of the discounts to tag. - """ - ids: [ID!] @gidTypes(types: ["DiscountNode"]) - - """ - The ID of the saved search for filtering discounts to tag. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - The search query for filtering discounts. -

- For more information on the list of supported fields and search syntax, refer to the [`discountNodes`](https://shopify.dev/docs/api/admin-graphql/latest/queries/discountNodes#query-arguments) query. - """ - search: String - - """ - The tags to add to the discounts. - """ - tags: [String!]! - ): DiscountBulkTagsAddPayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - Removes tags from multiple - [discounts](https://help.shopify.com/manual/discounts/discount-types) - asynchronously using one of the following: - - A search query - - A saved search ID - - A list of discount IDs - - For example, you can delete tags from price rules that match a search - criteria, or delete tags from a predefined set of price rules. - """ - discountBulkTagsRemove( - """ - The IDs of the discounts to untag. - """ - ids: [ID!] @gidTypes(types: ["DiscountNode"]) - - """ - The ID of the saved search for filtering discounts to remove tags from. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - The search query for filtering discounts. -

- For more information on the list of supported fields and search syntax, refer to the [`discountNodes`](https://shopify.dev/docs/api/admin-graphql/latest/queries/discountNodes#query-arguments) query. - """ - search: String - - """ - The tags to remove from the discounts. - """ - tags: [String!]! - ): DiscountBulkTagsRemovePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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! @gidTypes(types: ["DiscountCodeNode"]) - ): DiscountCodeActivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 @requiredAccess(scope: "`write_discounts` access scope.") - - """ - 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 input fields required to update the discount. - """ - codeAppDiscount: DiscountCodeAppInput! - - """ - The ID of the discount to update. - """ - id: ID! @gidTypes(types: ["DiscountCodeNode"]) - ): DiscountCodeAppUpdatePayload @requiredAccess(scope: "`write_discounts` access scope.") - - """ - 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 input data used to update the discount code. - """ - basicCodeDiscount: DiscountCodeBasicInput! - - """ - The ID of the discount code to update. - """ - id: ID! @gidTypes(types: ["DiscountCodeNode"]) - ): DiscountCodeBasicUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 IDs of the discounts to activate. - """ - ids: [ID!] @gidTypes(types: ["DiscountCodeNode"]) - - """ - 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 @gidTypes(types: ["SavedSearch"]) - - """ - The search query for filtering discounts. -

- For 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 - ): DiscountCodeBulkActivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 IDs of the discounts to deactivate. - """ - ids: [ID!] @gidTypes(types: ["DiscountCodeNode"]) - - """ - 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 @gidTypes(types: ["SavedSearch"]) - - """ - The search query for filtering discounts. -

- For 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 - ): DiscountCodeBulkDeactivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 IDs of the discounts to delete. - """ - ids: [ID!] @gidTypes(types: ["DiscountCodeNode"]) - - """ - 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 @gidTypes(types: ["SavedSearch"]) - - """ - The search query for filtering discounts. -

- For 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 - ): DiscountCodeBulkDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 input data used to update the BXGY code discount. - """ - bxgyCodeDiscount: DiscountCodeBxgyInput! - - """ - The ID of the BXGY code discount to update. - """ - id: ID! @gidTypes(types: ["DiscountCodeNode"]) - ): DiscountCodeBxgyUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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! @gidTypes(types: ["DiscountCodeNode"]) - ): DiscountCodeDeactivatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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! @gidTypes(types: ["DiscountCodeNode"]) - ): DiscountCodeDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 input data used to update the discount code. - """ - freeShippingCodeDiscount: DiscountCodeFreeShippingInput! - - """ - The ID of the discount code to update. - """ - id: ID! @gidTypes(types: ["DiscountCodeNode"]) - ): DiscountCodeFreeShippingUpdatePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - Publish a discount code to channels of the sales app making this request. - """ - discountCodePublish( - """ - The input data used to publish a discount code to a channel. - """ - input: DiscountCodePublishInput! - ): DiscountCodePublishPayload @requiredAccess(scope: "`write_discount_to_channel_publications` access scope. Also: Access only available to authorized apps.") @privatelyDocumented - - """ - 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 - [`DiscountCodeNode`](https://help.shopify.com/docs/api/admin-graphql/latest/objects/DiscountCodeNode#field-id) - object that the codes will be removed from. For example, `gid://shopify/DiscountCodeNode/123`. - You can use the - [`codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes) - to retrieve the ID. - """ - discountId: ID! @gidTypes(types: ["DiscountCodeNode"]) - - """ - The IDs of the - [`DiscountRedeemCode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/discountredeemcode#field-id) - objects to delete. - For example, `gid://shopify/DiscountRedeemCode/123`. - You can use the - [`codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes) - to retrieve the ID. - """ - ids: [ID!] @gidTypes(types: ["DiscountRedeemCode"]) - - """ - The ID of a - [saved search](https://shopify.dev/docs/api/admin-graphql/latest/objects/savedsearch#field-id). - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - A filter made up of terms, connectives, modifiers, and comparators that you can use to - search for code discounts. You can apply one or more filters to a query. Learn more about - [Shopify API search syntax](https://shopify.dev/docs/api/usage/search-syntax). - - For a list of accepted values for the `search` field, refer to the - [`query` argument on the `codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes#argument-query). - """ - search: String - ): DiscountCodeRedeemCodeBulkDeletePayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - 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 list of codes to associate with the - [code discount](https://help.shopify.com/manual/discounts/discount-types#discount-codes). - Maximum: 250 codes. - """ - codes: [DiscountRedeemCodeInput!]! - - """ - The ID of the - [`DiscountCodeNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountCodeNode#field-id) - object that the codes will be added to. For example, `gid://shopify/DiscountCodeNode/123`. - You can use the - [`codeDiscountNodes` query](https://shopify.dev/docs/api/admin-graphql/latest/queries/codeDiscountNodes) - to retrieve the ID. - """ - discountId: ID! @gidTypes(types: ["DiscountCodeNode"]) - ): DiscountRedeemCodeBulkAddPayload @requiredAccess(scope: "Apps must have `write_discounts` access scope.") - - """ - Registers a discounts allocator function. - """ - discountsAllocatorFunctionRegister( - """ - The function extension id of the discounts allocator function. - """ - functionExtensionId: String! - ): DiscountsAllocatorFunctionRegisterPayload @requiredAccess(scope: "`write_discounts_allocator_functions` access scope.") - - """ - Unregisters a discounts allocator function. - """ - discountsAllocatorFunctionUnregister( - """ - The function extension id of the discounts allocator function. - """ - functionExtensionId: String! - ): DiscountsAllocatorFunctionUnregisterPayload @requiredAccess(scope: "`write_discounts_allocator_functions` access scope.") - - """ - 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! @gidTypes(types: ["DisputeEvidence"]) - - """ - The updated properties for a dispute evidence. - """ - input: ShopifyPaymentsDisputeEvidenceUpdateInput! - ): DisputeEvidenceUpdatePayload @requiredAccess(scope: "`write_shopify_payments_dispute_evidences` access scope. Also: The user must have `manage_orders_information` permission or the `manage_disputes` permission.") - - """ - Injects a Meta tag into the online store for a given shop, for verifying the - domains of merchants onboarding to the marketplace. - """ - domainVerificationTagInject( - """ - The name of the marketplace, as it appears on the online store. - """ - name: String! - - """ - The code, as it appears on the online store, for verifying merchant domains. - """ - verificationCode: String! - ): DomainVerificationTagInjectPayload - - """ - Removes a Meta tag from the online store for a given shop. The tag is used for - verifying merchant domains during marketplace onboarding. - """ - domainVerificationTagRemove( - """ - The name of the Meta tag, as it appears on the online store. - """ - name: String! - ): DomainVerificationTagRemovePayload - - """ - Adds tags to multiple draft orders. - """ - draftOrderBulkAddTags( - """ - The IDs of the draft orders to add tags to. - """ - ids: [ID!] @gidTypes(types: ["DraftOrder"]) - - """ - The ID of the draft order saved search for filtering draft orders on. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - The conditions for filtering draft orders on. - See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). - """ - search: String - - """ - List of tags to be added. - """ - tags: [String!]! - ): DraftOrderBulkAddTagsPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") - - """ - Deletes multiple draft orders. - """ - draftOrderBulkDelete( - """ - The IDs of the draft orders to delete. - """ - ids: [ID!] @gidTypes(types: ["DraftOrder"]) - - """ - The ID of the draft order saved search for filtering draft orders on. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - The conditions for filtering draft orders on. - See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). - """ - search: String - ): DraftOrderBulkDeletePayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to delete multiple draft orders.") - - """ - Removes tags from multiple draft orders. - """ - draftOrderBulkRemoveTags( - """ - The IDs of the draft orders to remove tags from. - """ - ids: [ID!] @gidTypes(types: ["DraftOrder"]) - - """ - The ID of the draft order saved search for filtering draft orders on. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - The conditions for filtering draft orders on. - See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax). - """ - search: String - - """ - List of tags to be removed. - """ - tags: [String!]! - ): DraftOrderBulkRemoveTagsPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") - - """ - 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 @requiredAccess(scope: "`write_draft_orders` access scope.") - - """ - 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( - """ - Whether to bypass cart and checkout validations. - This will ignore any validations added by apps during completion. - """ - bypassCartValidations: Boolean = false - - """ - The draft order to complete. - """ - id: ID! @gidTypes(types: ["DraftOrder"]) - - """ - The gateway for the completed draft order. - """ - paymentGatewayId: ID @gidTypes(types: ["PaymentGateway"]) - - """ - Whether the payment is pending. - """ - paymentPending: Boolean = false @deprecated(reason: "Create a draft with payment terms rather than marking the draft as pending.") - - """ - A channel definition handle used for sales channel attribution. - """ - sourceName: String - ): DraftOrderCompletePayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to mark as paid, or set payment terms.") - - """ - 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 @requiredAccess(scope: "`write_draft_orders` access scope or `write_quick_sale` access scope. Also: The user must have access to manage draft orders.") - - """ - Creates a draft order from order. - """ - draftOrderCreateFromOrder( - """ - Specifies the order's id that we create the draft order from. - """ - orderId: ID! @gidTypes(types: ["Order"]) - ): DraftOrderCreateFromOrderPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: Requires `write_orders` access scope.") - - """ - Creates a merchant checkout for the given draft order. - """ - draftOrderCreateMerchantCheckout( - """ - Specifies the Draft order's id that we create the checkout for. - """ - id: ID! @gidTypes(types: ["DraftOrder"]) - ): DraftOrderCreateMerchantCheckoutPayload @deprecated(reason: "This mutation is no longer supported.") @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to pay draft orders by credit card. Requires `write_checkouts` access scope.") - - """ - Deletes a draft order. - """ - draftOrderDelete( - """ - Specify the draft order to delete by its ID. - """ - input: DraftOrderDeleteInput! - ): DraftOrderDeletePayload @requiredAccess(scope: "`write_draft_orders` access scope or `write_quick_sale` access scope. Also: The user must have access to delete draft orders.") - - """ - Duplicates a draft order. - """ - draftOrderDuplicate( - """ - The ID of the draft order to duplicate. - """ - draftOrderId: ID @deprecated(reason: "Use `id` instead.") @gidTypes(types: ["DraftOrder"]) - - """ - The ID of the draft order to duplicate. - """ - id: ID @gidTypes(types: ["DraftOrder"]) - ): DraftOrderDuplicatePayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") - - """ - Previews a draft order invoice email. - """ - draftOrderInvoicePreview( - """ - Specifies the draft order invoice email fields. - """ - email: EmailInput - - """ - Specifies the draft order invoice email to preview. - """ - id: ID! @gidTypes(types: ["DraftOrder"]) - ): DraftOrderInvoicePreviewPayload @requiredAccess(scope: "`write_draft_orders` access scope.") - - """ - 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 invoice email fields. - """ - email: EmailInput - - """ - Specifies the draft order to send the invoice for. - """ - id: ID! @gidTypes(types: ["DraftOrder"]) - ): DraftOrderInvoiceSendPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") - - """ - Updates a draft order before sending the invoice to the buyer by configuring settings relevant to the draft order. - """ - draftOrderPrepareForBuyerCheckout( - """ - Whether discount codes are allowed during checkout of this draft order. - """ - allowDiscountCodesInCheckout: Boolean - - """ - Whether to bypass cart validations on this draft order. - """ - bypassCartValidations: Boolean - - """ - The draft order to prepare for buyer checkout. - """ - id: ID! @gidTypes(types: ["DraftOrder"]) - - """ - Whether to create price locks when preparing this draft for buyer checkout. - """ - lockPricesForBuyer: LockDraftOrderPricesForBuyer - ): DraftOrderPrepareForBuyerCheckoutPayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") - - """ - 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! @gidTypes(types: ["DraftOrder"]) - - """ - The draft order properties to update. - """ - input: DraftOrderInput! - ): DraftOrderUpdatePayload @requiredAccess(scope: "`write_draft_orders` access scope. Also: The user must have access to manage draft orders.") - - """ - 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 @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the read_customer_events and write_server_pixels access scopes.") - - """ - 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! @gidTypes(types: ["WebhookSubscription"]) - - """ - 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!]! @gidTypes(types: ["File"]) - ): FileAcknowledgeUpdateFailedPayload @requiredAccess(scope: "`write_files` access scope.") - - """ - 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 @requiredAccess(scope: "`write_files` access scope, `write_themes` access scope or `write_images` access scope. Also: Users must have create files permissions.") - - """ - 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!]! @gidTypes(types: ["File"]) - ): FileDeletePayload @requiredAccess(scope: "`write_files` access scope. Also: Users must have delete files permissions.") - - """ - 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 @requiredAccess(scope: "`write_files` access scope or `write_themes` access scope. Also: Users must have edit files permissions.") - - """ - Generates a signature for a Flow action payload. - """ - flowGenerateSignature( - """ - The unique identifier of the Flow action definition. - """ - id: ID! @gidTypes(types: ["FlowActionDefinition"]) - - """ - The request payload used to generate the signature. - """ - payload: String! - - """ - The schema used to validate the payload. Defaults to ACTION if none is provided. - """ - payloadSchema: FlowGenerateSignaturePayloadSchema - ): FlowGenerateSignaturePayload @privatelyDocumented - - """ - 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! @gidTypes(types: ["Fulfillment"]) - ): FulfillmentCancelPayload - - """ - Creates a fulfillment constraint rule and its metafield. - """ - fulfillmentConstraintRuleCreate( - """ - Associate the function with one or multiple delivery method types. - """ - deliveryMethodTypes: [DeliveryMethodType!]! - - """ - The handle of the function providing the constraint rule. - """ - functionHandle: String - - """ - The identifier of the function providing the constraint rule. - """ - functionId: String @deprecated(reason: "Use `functionHandle` instead.") - - """ - Metafields to associate to the fulfillment constraint rule. - """ - metafields: [MetafieldInput!] = [] - ): FulfillmentConstraintRuleCreatePayload @requiredAccess(scope: "`write_fulfillment_constraint_rules` access scope.") - - """ - Deletes a fulfillment constraint rule and its metafields. - """ - fulfillmentConstraintRuleDelete( - """ - A globally-unique identifier for the fulfillment constraint rule. - """ - id: ID! @gidTypes(types: ["FulfillmentConstraintRule"]) - ): FulfillmentConstraintRuleDeletePayload @requiredAccess(scope: "`write_fulfillment_constraint_rules` access scope.") - - """ - Update a fulfillment constraint rule. - """ - fulfillmentConstraintRuleUpdate( - """ - Specifies the delivery method types to be updated. - If not provided or providing an empty list will associate the function with all delivery methods. - """ - deliveryMethodTypes: [DeliveryMethodType!]! - - """ - A globally-unique identifier for the fulfillment constraint rule. - """ - id: ID! @gidTypes(types: ["FulfillmentConstraintRule"]) - ): FulfillmentConstraintRuleUpdatePayload @requiredAccess(scope: "`write_fulfillment_constraint_rules` access scope.") - - """ - 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 @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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.") @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 @requiredAccess(scope: "`write_fulfillments` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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! @gidTypes(types: ["FulfillmentOrder"]) - - """ - An optional reason for accepting the cancellation request. - """ - message: String - ): FulfillmentOrderAcceptCancellationRequestPayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 estimated date and time when the fulfillment order will be shipped. - """ - estimatedShippedAt: DateTime - - """ - The ID of the fulfillment order associated with the fulfillment request. - """ - id: ID! @gidTypes(types: ["FulfillmentOrder"]) - - """ - An optional reason for accepting the fulfillment request. - """ - message: String - ): FulfillmentOrderAcceptFulfillmentRequestPayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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! @gidTypes(types: ["FulfillmentOrder"]) - ): FulfillmentOrderCancelPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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! @gidTypes(types: ["FulfillmentOrder"]) - - """ - An optional reason for marking the fulfillment order as incomplete. - """ - message: String - ): FulfillmentOrderClosePayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 details of the fulfillment hold applied on the fulfillment order. - """ - fulfillmentHold: FulfillmentOrderHoldInput! - - """ - The ID of the fulfillment order on which a fulfillment hold is applied. - """ - id: ID! @gidTypes(types: ["FulfillmentOrder"]) - ): FulfillmentOrderHoldPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 fulfillment order line items to be moved. - If left blank, all unfulfilled line items belonging to the fulfillment order are moved. - """ - fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] - - """ - The ID of the fulfillment order to be moved. - """ - id: ID! @gidTypes(types: ["FulfillmentOrder"]) - - """ - The ID of the location where the fulfillment order will be moved. - """ - newLocationId: ID! @gidTypes(types: ["Location"]) - ): FulfillmentOrderMovePayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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! @gidTypes(types: ["FulfillmentOrder"]) - ): FulfillmentOrderOpenPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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! @gidTypes(types: ["FulfillmentOrder"]) - - """ - An optional reason for rejecting the cancellation request. - """ - message: String - ): FulfillmentOrderRejectCancellationRequestPayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have `fulfill_and_ship_orders` permission.") - - """ - 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! @gidTypes(types: ["FulfillmentOrder"]) - - """ - An optional array of line item rejection details. If none are provided, all - line items will be assumed to be unfulfillable. - - **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!] - - """ - An optional reason for rejecting the fulfillment request. - """ - message: String - - """ - The reason for the fulfillment order rejection. - """ - reason: FulfillmentOrderRejectionReason - ): FulfillmentOrderRejectFulfillmentRequestPayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - Releases the fulfillment hold on a fulfillment order. - """ - fulfillmentOrderReleaseHold( - """ - A configurable ID used to track the automation system releasing this hold. - """ - externalId: String - - """ - The IDs of the fulfillment holds to release.
-
- Holds will only be released if they belong to the fulfillment order specified by the `id` argument.
-
- NOTE: If not supplied, all holds for the fulfillment order will be released. - It is highly recommended that apps supply the ids of the holds that they intend to release. - Releasing all holds on a fulfillment order will result in the fulfillment order being released prematurely - and items being incorrectly fulfilled. - """ - holdIds: [ID!] @gidTypes(types: ["FulfillmentHold"]) - - """ - The ID of the fulfillment order for which to release the fulfillment hold. - """ - id: ID! @gidTypes(types: ["FulfillmentOrder"]) - ): FulfillmentOrderReleaseHoldPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope, `write_third_party_fulfillment_orders` access scope or `write_marketplace_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - Reports the progress of an open or in-progress fulfillment order. - """ - fulfillmentOrderReportProgress( - """ - The ID of the fulfillment order for which the progress report is targetting. - """ - id: ID! @gidTypes(types: ["FulfillmentOrder"]) - - """ - The details of the progress report for the fulfillment order. - """ - progressReport: FulfillmentOrderReportProgressInput - ): FulfillmentOrderReportProgressPayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_assigned_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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( - """ - A future date and time when the fulfillment order will be marked as ready for fulfillment. - """ - fulfillAt: DateTime! - - """ - The ID of the fulfillment order to reschedule. - """ - id: ID! @gidTypes(types: ["FulfillmentOrder"]) - ): FulfillmentOrderReschedulePayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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! @gidTypes(types: ["FulfillmentOrder"]) - - """ - An optional reason for the cancellation request. - """ - message: String - ): FulfillmentOrderSubmitCancellationRequestPayload @requiredAccess(scope: "`write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 fulfillment order line items to be requested for fulfillment. - If left blank, all line items of the fulfillment order are requested for fulfillment. - """ - fulfillmentOrderLineItems: [FulfillmentOrderLineItemInput!] - - """ - The ID of the fulfillment order associated with fulfillment request. - """ - id: ID! @gidTypes(types: ["FulfillmentOrder"]) - - """ - 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 - ): FulfillmentOrderSubmitFulfillmentRequestPayload @requiredAccess(scope: "`write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 locations to exclude for rerouting. Excluded - locations specified here take precedence over included locations provided - through included_location_ids. - """ - excludedLocationIds: [ID!] @gidTypes(types: ["Location"]) - - """ - The list of IDs of the fulfillment orders. - """ - fulfillmentOrderIds: [ID!]! @gidTypes(types: ["FulfillmentOrder"]) - - """ - The list of IDs of the locations to include for rerouting. By default, all locations are included. - """ - includedLocationIds: [ID!] @gidTypes(types: ["Location"]) - ): FulfillmentOrdersReroutePayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have the fulfill_and_ship_orders permission or the calling API client must be Shopify POS.") - - """ - Sets the latest date and time by which the fulfillment orders need to be fulfilled. - """ - fulfillmentOrdersSetFulfillmentDeadline( - """ - The new fulfillment deadline of the fulfillment orders. - """ - fulfillmentDeadline: DateTime! - - """ - The IDs of the fulfillment orders for which the deadline is being set. - """ - fulfillmentOrderIds: [ID!]! @gidTypes(types: ["FulfillmentOrder"]) - ): FulfillmentOrdersSetFulfillmentDeadlinePayload @requiredAccess(scope: "`write_merchant_managed_fulfillment_orders` access scope, `write_third_party_fulfillment_orders` access scope or `write_marketplace_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 URL to send requests for the fulfillment service. - - If `callbackUrl` is provided: - - Shopify queries the callback_url/fetch_tracking_numbers endpoint to retrieve tracking numbers - for orders, if `trackingSupport` is set to `true`. - - Shopify queries the callback_url/fetch_stock endpoint to retrieve inventory levels, - if `inventoryManagement` is set to `true`. - - Shopify uses the callback_url/fulfillment_order_notification endpoint to send - [fulfillment and cancellation requests](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-2-receive-fulfillment-requests-and-cancellations). - - Otherwise, if no `callbackUrl` is provided you need to submit this information via the api: - - 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). - - 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 uses the [fulfillment order based workflow]( - https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments - ) for managing fulfillments. - - [As of 2022-07 API version](https://shopify.dev/changelog/legacy-fulfillment-api-deprecation), - the fulfillment order based workflow is the only way to manage fulfillments. - As the migration is now finished, the `fulfillmentOrdersOptIn` property is deprecated - and is always set to `true` on correctly functioning fulfillment services. - - The `fulfillmentOrdersOptIn` input field is [deprecated and will be removed in the next API version]( - https://shopify.dev/changelog/deprecation-of-the-fulfillmentservice-fulfillmentordersoptin-field). - This API version makes it optional and defaults to `true` for a smooth migration experience. - Do 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 manages product inventory and provides updates to Shopify. - - If `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. - - If 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 - - """ - The name of the fulfillment service. - """ - name: String! - - """ - Whether the fulfillment service requires products to be physically shipped. - """ - requiresShippingMethod: Boolean = true - - """ - Whether the fulfillment service provides tracking numbers for packages. - - If `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. - - If 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 - ): FulfillmentServiceCreatePayload @requiredAccess(scope: "`write_fulfillments` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - Deletes a fulfillment service. - """ - fulfillmentServiceDelete( - """ - The ID of an active merchant managed location where inventory and commitments will be relocated - after the fulfillment service is deleted. - - Inventory will only be transferred if the - [`TRANSFER`](https://shopify.dev/api/admin-graphql/latest/enums/FulfillmentServiceDeleteInventoryAction#value-transfer) - inventory action has been chosen. - """ - destinationLocationId: ID @gidTypes(types: ["Location"]) - - """ - The ID of the fulfillment service to delete. - """ - id: ID! @gidTypes(types: ["FulfillmentService"]) - - """ - The action to take with the location after the fulfillment service is deleted. - """ - inventoryAction: FulfillmentServiceDeleteInventoryAction = TRANSFER - ): FulfillmentServiceDeletePayload @requiredAccess(scope: "`write_fulfillments` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 URL to send requests for the fulfillment service. - - If `callbackUrl` is provided: - - Shopify queries the callback_url/fetch_tracking_numbers endpoint to retrieve tracking numbers - for orders, if `trackingSupport` is set to `true`. - - Shopify queries the callback_url/fetch_stock endpoint to retrieve inventory levels, - if `inventoryManagement` is set to `true`. - - Shopify uses the callback_url/fulfillment_order_notification endpoint to send - [fulfillment and cancellation requests](https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-2-receive-fulfillment-requests-and-cancellations). - - Otherwise, if no `callbackUrl` is provided you need to submit this information via the api: - - 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). - - 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 - - """ - The id of the fulfillment service. - """ - id: ID! @gidTypes(types: ["FulfillmentService"]) - - """ - Whether the fulfillment service manages product inventory and provides updates to Shopify. - - If `callbackUrl` is provided, Shopify will periodically fetch inventory levels via the callback endpoint. - - If 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 - - """ - The name of the fulfillment service. - """ - name: String - - """ - Whether the fulfillment service requires products to be physically shipped. - """ - requiresShippingMethod: Boolean = true - - """ - Whether the fulfillment service provides tracking numbers for packages. - - If `callbackUrl` is provided, Shopify will periodically fetch tracking numbers via the callback endpoint. - - If 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 - ): FulfillmentServiceUpdatePayload @requiredAccess(scope: "`write_fulfillments` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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! @gidTypes(types: ["Fulfillment"]) - - """ - Whether the customer will be notified of this update and future updates for the fulfillment. - If this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated. - """ - notifyCustomer: Boolean - - """ - The tracking input for the mutation, including tracking URL, number, and company. - """ - trackingInfoInput: FulfillmentTrackingInput! - ): FulfillmentTrackingInfoUpdatePayload @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - Updates tracking information for a fulfillment. - """ - fulfillmentTrackingInfoUpdateV2( - """ - The ID of the fulfillment. - """ - fulfillmentId: ID! @gidTypes(types: ["Fulfillment"]) - - """ - Whether the customer will be notified of this update and future updates for the fulfillment. - If this field is left blank, then notifications won't be sent to the customer when the fulfillment is updated. - """ - notifyCustomer: Boolean - - """ - The tracking input for the mutation, including tracking URL, number, and company. - """ - trackingInfoInput: FulfillmentTrackingInput! - ): FulfillmentTrackingInfoUpdateV2Payload @deprecated(reason: "Use `fulfillmentTrackingInfoUpdate` instead.") @requiredAccess(scope: "`write_assigned_fulfillment_orders` access scope, `write_merchant_managed_fulfillment_orders` access scope or `write_third_party_fulfillment_orders` access scope. Also: The user must have fulfill_and_ship_orders permission.") - - """ - 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 @requiredAccess(scope: "`write_gift_cards` access scope.") - - """ - 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 input fields to credit a gift card. - """ - creditInput: GiftCardCreditInput! - - """ - The ID of the gift card to be credited. - """ - id: ID! @gidTypes(types: ["GiftCard"]) - ): GiftCardCreditPayload @requiredAccess(scope: "`write_gift_card_transactions` access scope.") - - """ - 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! @gidTypes(types: ["GiftCard"]) - ): GiftCardDeactivatePayload @requiredAccess(scope: "`write_gift_cards` access scope.") - - """ - 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 input fields to debit a gift card. - """ - debitInput: GiftCardDebitInput! - - """ - The ID of the gift card to be debited. - """ - id: ID! @gidTypes(types: ["GiftCard"]) - ): GiftCardDebitPayload @requiredAccess(scope: "`write_gift_card_transactions` access scope.") - - """ - Creates or updates a - [`gift card`](https://shopify.dev/docs/api/admin-graphql/latest/objects/GiftCard) - product. This mutation is specifically designed for gift card products and automatically sets - the `giftCard` field to `true`, applies gift card variant defaults (non-taxable, no shipping - required, inventory untracked), and omits fields that aren't relevant to gift cards. - - For list fields like - [`variants`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-input.fields.variants), - the mutation performs a full replacement: it creates new entries, updates existing ones, and - removes any entries not included in the input. For all other fields, only included fields - change and omitted fields remain unchanged. - - You can run the mutation synchronously to receive the updated product immediately, or - asynchronously by setting - [`synchronous`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-synchronous)`: false` - to receive a - [`ProductSetOperation`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductSetOperation) - object instead. Use the - [`productOperation`](https://shopify.dev/docs/api/admin-graphql/latest/queries/productOperation) - query to check the status and retrieve the product details when running asynchronously. - - > Note: - > The - [`issuanceCurrency`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-input.fields.issuanceCurrency) - and [`crossCurrencyRedeemable`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet#arguments-input.fields.crossCurrencyRedeemable) fields can only be set during product creation. They can't be changed after - the product is created. - """ - giftCardProductSet( - """ - Specifies the identifier that will be used to lookup the resource. - """ - identifier: ProductSetIdentifiers - - """ - The properties of the gift card product to create or update. - """ - input: GiftCardProductSetInput! - - """ - Whether the mutation should be run synchronously or asynchronously. - - If `true`, the mutation will return the updated `product`. - If `false`, the mutation will return a `productSetOperation`. - - Defaults to `true`. - """ - synchronous: Boolean = true - ): GiftCardProductSetPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create products.") - - """ - 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! @gidTypes(types: ["GiftCard"]) - ): GiftCardSendNotificationToCustomerPayload @requiredAccess(scope: "`write_gift_cards` access scope.") - - """ - 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! @gidTypes(types: ["GiftCard"]) - ): GiftCardSendNotificationToRecipientPayload @requiredAccess(scope: "`write_gift_cards` access scope.") - - """ - 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! @gidTypes(types: ["GiftCard"]) - - """ - The input fields to update the gift card. - """ - input: GiftCardUpdateInput! - ): GiftCardUpdatePayload @requiredAccess(scope: "`write_gift_cards` access scope.") - - """ - Updates the server pixel to connect to an HTTP endpoint. - Running this mutation deletes any previous subscriptions for the server pixel. - """ - httpServerPixelUpdate( - """ - The HTTP endpoint to which customer events are to be sent. - """ - httpEndpoint: String! - ): HttpServerPixelUpdatePayload @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the `read_customer_events` access scope and the `write_server_pixels` and `write_http_server_pixels` Shopify approval access scopes.") @privatelyDocumented - - """ - Sets up a new Hydrogen storefront to power your headless commerce experience. - This mutation kicks off the provisioning process in the background and gives - you a job ID to track progress. - - For example, when launching a new headless commerce experience, developers use - this mutation to provision the storefront environment. - - Use `hydrogenStorefrontCreate` to: - - Provision new Hydrogen storefront instances - - Track creation progress through background jobs - - Handle setup validation and error reporting - - The mutation returns immediately with a job ID that can be used to monitor the - creation progress, as storefront provisioning runs asynchronously. User errors - provide feedback if the creation request contains invalid parameters or - conflicts with existing resources. - - Learn more about [creating Hydrogen storefronts](https://shopify.dev/docs/custom-storefronts/hydrogen/getting-started). - """ - hydrogenStorefrontCreate( - """ - The title for the Hydrogen storefront. - """ - title: String! - ): HydrogenStorefrontCreatePayload @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") - - """ - Updates the customer account application URLs for a Hydrogen storefront, - configuring the authentication and redirect endpoints used by Shopify's - Customer Account API integration. This mutation validates URL formats and - security requirements. - - For example, when setting up customer login functionality, developers - configure the JavaScript origin for client-side authentication, logout - redirect URIs for post-signout navigation, and the primary redirect URI for - successful authentication flows. - - Use `hydrogenStorefrontCustomerApplicationUrlsReplace` to: - - Configure customer authentication endpoints - - Update redirect URLs for login and logout flows - - Modify JavaScript origins for client-side integration - - Validate URL security and format requirements - - The mutation replaces all existing URLs with the new configuration, ensuring - consistent authentication behavior across the storefront. Detailed error - reporting helps developers verify the configuration meets Shopify's security standards. - - Learn more about [Customer Account API integration](https://shopify.dev/docs/storefronts/headless/building-with-the-customer-account-api/getting-started). - """ - hydrogenStorefrontCustomerApplicationUrlsReplace( - """ - The ID of the storefront. - """ - storefrontId: ID! - - """ - An object of fields to update on the customer oauth application. - """ - urlsReplaceInput: HydrogenStorefrontCustomerApplicationUrlsReplaceInput! - ): HydrogenStorefrontCustomerApplicationUrlsReplacePayload @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") - - """ - Replaces all environment variables for a specific Hydrogen storefront - environment in a single atomic operation. This mutation provides a complete - replacement strategy rather than individual variable updates, ensuring - consistent environment configuration. - - For example, when deploying a new version of your Hydrogen storefront that - requires a different set of API keys, database URLs, and feature flags, you - can replace the entire environment configuration at once rather than updating - variables individually. - - Use `HydrogenStorefrontEnvironmentVariableBulkReplace` to: - - Deploy complete environment configurations during releases - - Synchronize development and production environment settings - - Reset environment variables to a known baseline state - - Migrate between different configuration schemas - - This bulk replacement approach helps prevent configuration drift and ensures - all related variables are updated together, reducing the risk of partial - updates that could break your storefront functionality. - - Learn more about [Hydrogen deployment](https://shopify.dev/docs/custom-storefronts/hydrogen/deployment). - """ - hydrogenStorefrontEnvironmentVariableBulkReplace( - """ - The environment ID for which the variables will be set. - """ - environmentId: ID! - - """ - An array of objects, each representing an environment variable to be created. - """ - environmentVariablesInput: [HydrogenStorefrontEnvironmentVariableInput!]! - - """ - The ID of the storefront. - """ - storefrontId: ID! - ): HydrogenStorefrontEnvironmentVariableBulkReplacePayload @requiredAccess(scope: "Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.") - - """ - 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 initial available quantity of the inventory item being activated at the location. - """ - available: Int - - """ - The ID of the inventory item to activate. - """ - inventoryItemId: ID! @gidTypes(types: ["InventoryItem"]) - - """ - The ID of the location of the inventory item being activated. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - 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 @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to activate an inventory item.") - - """ - 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 @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to apply changes to inventory quantities.") - - """ - 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! @gidTypes(types: ["InventoryItem"]) - - """ - A list of pairs of locations and activate status to update for the specified inventory item. - """ - inventoryItemUpdates: [InventoryBulkToggleActivationInput!]! - ): InventoryBulkToggleActivationPayload @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to update the activation status of an inventory.") - - """ - 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! @gidTypes(types: ["InventoryLevel"]) - ): InventoryDeactivatePayload @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to deactivate an inventory.") - - """ - 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! @gidTypes(types: ["InventoryItem"]) - - """ - The input fields that update an - [`inventoryItem`](https://shopify.dev/api/admin-graphql/latest/queries/inventoryitem). - """ - input: InventoryItemInput! - ): InventoryItemUpdatePayload @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to update an inventory item.") - - """ - 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 @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to move an inventory.") - - """ - 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.") @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to update an inventory.") - - """ - 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 @requiredAccess(scope: "`write_inventory` access scope. Also: The user must have a permission to update an inventory.") - - """ - 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! @gidTypes(types: ["InventoryShipment"]) - - """ - The list of line items to add to the inventory shipment. - """ - lineItems: [InventoryShipmentLineItemInput!]! - ): InventoryShipmentAddItemsPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") - - """ - 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 @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") - - """ - 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 @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") - - """ - Deletes an inventory shipment. Only draft shipments can be deleted. - """ - inventoryShipmentDelete( - """ - The ID of the inventory shipment to be deleted. - """ - id: ID! @gidTypes(types: ["InventoryShipment"]) - ): InventoryShipmentDeletePayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") - - """ - Marks a draft inventory shipment as in transit. - """ - inventoryShipmentMarkInTransit( - """ - The date the shipment was shipped. - """ - dateShipped: DateTime - - """ - The ID of the inventory shipment to mark in transit. - """ - id: ID! @gidTypes(types: ["InventoryShipment"]) - ): InventoryShipmentMarkInTransitPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") - - """ - 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 bulk receive action for the inventory shipment. - """ - bulkReceiveAction: InventoryShipmentReceiveLineItemReason - - """ - The date the inventory shipment was initially received. - """ - dateReceived: DateTime - - """ - The ID of the inventory shipment to receive. - """ - id: ID! @gidTypes(types: ["InventoryShipment"]) - - """ - The list of receive line items for the inventory shipment. - """ - lineItems: [InventoryShipmentReceiveItemInput!] - ): InventoryShipmentReceivePayload @requiredAccess(scope: "`write_inventory_shipments_received_items` access scope. Also: The user must have permission to manage inventory.") - - """ - Remove items from an inventory shipment. - """ - inventoryShipmentRemoveItems( - """ - The ID of the inventory shipment to remove items from. - """ - id: ID! @gidTypes(types: ["InventoryShipment"]) - - """ - A list of inventory shipment line item ids representing the items to be removed from the shipment. - """ - lineItems: [ID!]! @gidTypes(types: ["InventoryShipmentLineItem"]) - ): InventoryShipmentRemoveItemsPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") - - """ - Sets the barcode on an inventory shipment. - """ - inventoryShipmentSetBarcode( - """ - A unique barcode for the shipment. - """ - barcode: String! - - """ - The ID of the inventory shipment to set the barcode on. - """ - id: ID! @gidTypes(types: ["InventoryShipment"]) - ): InventoryShipmentSetBarcodePayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory shipments.") - - """ - Edits the tracking info on an inventory shipment. - """ - inventoryShipmentSetTracking( - """ - The ID of the inventory shipment whose tracking info is being edited. - """ - id: ID! @gidTypes(types: ["InventoryShipment"]) - - """ - The tracking info to edit on the inventory shipment. - """ - tracking: InventoryShipmentTrackingInput! - ): InventoryShipmentSetTrackingPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") - - """ - Updates items on an inventory shipment. - """ - inventoryShipmentUpdateItemQuantities( - """ - The ID of the inventory shipment to update item quantities. - """ - id: ID! @gidTypes(types: ["InventoryShipment"]) - - """ - The list of line items to be updated to the shipment. - """ - items: [InventoryShipmentUpdateItemQuantitiesInput!] = [] - ): InventoryShipmentUpdateItemQuantitiesPayload @requiredAccess(scope: "`write_inventory_shipments` access scope. Also: The user must have permission to manage inventory.") - - """ - Cancels an inventory transfer. - """ - inventoryTransferCancel( - """ - The ID of the inventory transfer to cancel. - """ - id: ID! @gidTypes(types: ["InventoryTransfer"]) - ): InventoryTransferCancelPayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") - - """ - 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 @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") - - """ - 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 @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") - - """ - Deletes an inventory transfer. - """ - inventoryTransferDelete( - """ - The ID of the inventory transfer to delete. - """ - id: ID! @gidTypes(types: ["InventoryTransfer"]) - ): InventoryTransferDeletePayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") - - """ - 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! @gidTypes(types: ["InventoryTransfer"]) - ): InventoryTransferDuplicatePayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") - - """ - Edits an inventory transfer. - """ - inventoryTransferEdit( - """ - The ID of the inventory Transfer to be edited. - """ - id: ID! @gidTypes(types: ["InventoryTransfer"]) - - """ - The input fields to edit the inventory transfer. - """ - input: InventoryTransferEditInput! - ): InventoryTransferEditPayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") - - """ - Sets an inventory transfer to ready to ship. - """ - inventoryTransferMarkAsReadyToShip( - """ - The ID of the inventory transfer to mark as ready to ship. - """ - id: ID! @gidTypes(types: ["InventoryTransfer"]) - ): InventoryTransferMarkAsReadyToShipPayload @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") - - """ - 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 @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") - - """ - 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 @requiredAccess(scope: "`write_inventory_transfers` access scope. Also: The user must have permission to manage inventory.") - - """ - Creates a discount code in exchange for a customer's email address. - """ - leadCaptureForDiscount( - """ - The discount to create. - """ - basicCodeDiscount: LeadCaptureDiscountInput! - - """ - The customer to create a discount for. - """ - customer: LeadCaptureCustomerInput! - ): LeadCaptureForDiscountPayload @requiredAccess(scope: "Access only available to authorized apps.") @privatelyDocumented - - """ - 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! @gidTypes(types: ["Location"]) - ): LocationActivatePayload @requiredAccess(scope: "`write_locations` access scope.") - - """ - 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 @requiredAccess(scope: "`write_locations` access scope.") - - """ - 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 destination location to which inventory, pending orders and - moving transfers will be moved from the location to deactivate. - """ - destinationLocationId: ID @gidTypes(types: ["Location"]) - - """ - The ID of a location to deactivate. - """ - locationId: ID! @gidTypes(types: ["Location"]) - ): LocationDeactivatePayload @requiredAccess(scope: "`write_locations` access scope.") - - """ - Deletes a location. - """ - locationDelete( - """ - The ID of a location to delete. - """ - locationId: ID! @gidTypes(types: ["Location"]) - ): LocationDeletePayload @requiredAccess(scope: "`write_locations` access scope.") - - """ - 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! @gidTypes(types: ["Location"]) - - """ - The updated properties for the location. - """ - input: LocationEditInput! - ): LocationEditPayload @requiredAccess(scope: "`write_locations` access scope or `write_fulfillments` access scope. Also: `write_locations`: access scope is required to modify merchant-managed locations. `write_fulfillments`: apps can edit the locations associated with their fulfillment services if they have this scope. Only the app that created the fulfillment service can edit its associated location.") - - """ - Disables local pickup for a location. - """ - locationLocalPickupDisable( - """ - The ID of the location to disable local pickup for. - """ - locationId: ID! @gidTypes(types: ["Location"]) - ): LocationLocalPickupDisablePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") - - """ - 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 @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") - - """ - 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Updates currency settings of a market. - """ - marketCurrencySettingsUpdate( - """ - Properties to update for the market currency settings. - """ - input: MarketCurrencySettingsUpdateInput! - - """ - The ID of the market definition to target. - """ - marketId: ID! @gidTypes(types: ["Market"]) - ): MarketCurrencySettingsUpdatePayload @deprecated(reason: "This will be removed in a future version. Use `marketCreate` and `marketUpdate` for creating and updating\nmarket currency settings, respectively.\n") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Deletes a market definition. - """ - marketDelete( - """ - The ID of the market to delete. - """ - id: ID! @gidTypes(types: ["Market"]) - ): MarketDeletePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Creates or updates market localizations. - """ - marketLocalizationsRegister( - """ - The input fields for a market localization. - """ - marketLocalizations: [MarketLocalizationRegisterInput!]! - - """ - The ID of the resource that is being localized within the context of a market. - """ - resourceId: ID! @gidTypes(types: ["TranslatableMetafieldProxy", "Metaobject"]) - ): MarketLocalizationsRegisterPayload @requiredAccess(scope: "`write_translations` access scope.") - - """ - Deletes market localizations. - """ - marketLocalizationsRemove( - """ - The list of market IDs. - """ - marketIds: [ID!]! @gidTypes(types: ["Market"]) - - """ - The list of market localization keys. - """ - marketLocalizationKeys: [String!]! - - """ - The ID of the resource for which market localizations are being deleted. - """ - resourceId: ID! @gidTypes(types: ["TranslatableMetafieldProxy", "Metaobject"]) - ): MarketLocalizationsRemovePayload @requiredAccess(scope: "`write_translations` access scope.") - - """ - Deletes a market region. - """ - marketRegionDelete( - """ - The ID of the market region to delete. - """ - id: ID! @gidTypes(types: ["Region"]) - ): MarketRegionDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Creates regions that belong to an existing market. - """ - marketRegionsCreate( - """ - The ID of the market to add the regions to. - """ - marketId: ID! @gidTypes(types: ["Market"]) - - """ - 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.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Deletes a list of market regions. - """ - marketRegionsDelete( - """ - A list of IDs of the market regions to delete. - """ - ids: [ID!]! @gidTypes(types: ["Region"]) - ): MarketRegionsDeletePayload @deprecated(reason: "Use `marketUpdate` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Updates the properties of a market. - """ - marketUpdate( - """ - The ID of the market to update. - """ - id: ID! @gidTypes(types: ["Market"]) - - """ - The properties to update. - """ - input: MarketUpdateInput! - ): MarketUpdatePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Creates a web presence for a market. - """ - marketWebPresenceCreate( - """ - The ID of the market for which to create a web presence. - """ - marketId: ID! @gidTypes(types: ["Market"]) - - """ - The details of the web presence to be created. - """ - webPresence: MarketWebPresenceCreateInput! - ): MarketWebPresenceCreatePayload @deprecated(reason: "Use `webPresenceCreate` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Deletes a market web presence. - """ - marketWebPresenceDelete( - """ - The ID of the web presence to delete. - """ - webPresenceId: ID! @gidTypes(types: ["WebPresence"]) - ): MarketWebPresenceDeletePayload @deprecated(reason: "Use `webPresenceDelete` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Updates a market web presence. - """ - marketWebPresenceUpdate( - """ - The web_presence fields used to update the market's web presence. - """ - webPresence: MarketWebPresenceUpdateInput! - - """ - The ID of the web presence to update. - """ - webPresenceId: ID! @gidTypes(types: ["WebPresence"]) - ): MarketWebPresenceUpdatePayload @deprecated(reason: "Use `webPresenceUpdate` instead.") @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - 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 @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - 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 @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - Creates a new external marketing activity. - """ - marketingActivityCreateExternal( - """ - The input field for creating an external marketing activity. - """ - input: MarketingActivityCreateExternalInput! - ): MarketingActivityCreateExternalPayload @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - Deletes an external marketing activity. - """ - marketingActivityDeleteExternal( - """ - The ID of the marketing activity. A marketing activity ID or remote ID must be provided. - """ - marketingActivityId: ID @gidTypes(types: ["MarketingActivity"]) - - """ - 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 @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - 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 @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - 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 @gidTypes(types: ["MarketingActivity"]) - - """ - 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 @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - 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 @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - Creates a new marketing engagement for a marketing activity or a marketing channel. - """ - marketingEngagementCreate( - """ - 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 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 @gidTypes(types: ["MarketingActivity"]) - - """ - The marketing engagement's attributes. - """ - marketingEngagement: MarketingEngagementInput! - - """ - 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 - ): MarketingEngagementCreatePayload @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - 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 @requiredAccess(scope: "`write_marketing_events` access scope.") - - """ - Creates or updates a payment configuration for a shop on a marketplace. - """ - marketplacePaymentsConfigurationUpdate( - """ - The features requested to onboard onto a marketplace. - """ - requestedFeatures: [MarketplacePaymentsFeatureInput!]! - ): MarketplacePaymentsConfigurationUpdatePayload @requiredAccess(scope: "`write_marketplace_payments_configurations` access scope.") @privatelyDocumented - - """ - 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 handle. - """ - handle: String! - - """ - List of the menu's items. - """ - items: [MenuItemCreateInput!]! - - """ - The menu's title. - """ - title: String! - ): MenuCreatePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") - - """ - Deletes a menu. - """ - menuDelete( - """ - The ID of the menu to be deleted. - """ - id: ID! @gidTypes(types: ["Menu"]) - ): MenuDeletePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") - - """ - 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( - """ - The menu's handle. - """ - handle: String - - """ - ID of the menu to be updated. - """ - id: ID! @gidTypes(types: ["Menu"]) - - """ - List of the menu's items. - """ - items: [MenuItemUpdateInput!]! - - """ - The menu's title. - """ - title: String! - ): MenuUpdatePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") - - """ - 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 @requiredAccess(scope: "API client to have access to the namespace and the resource type associated with the metafield definition.\n") - - """ - 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( - """ - Whether to delete all associated metafields. - """ - deleteAllAssociatedMetafields: Boolean = false - - """ - The id of the metafield definition to delete. Using `identifier` is preferred. - """ - id: ID @gidTypes(types: ["MetafieldDefinition"]) - - """ - The identifier of the metafield definition to delete. - """ - identifier: MetafieldDefinitionIdentifierInput - ): MetafieldDefinitionDeletePayload @requiredAccess(scope: "API client to have access to the resource type associated with the metafield definition.\n") - - """ - 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 @gidTypes(types: ["MetafieldDefinition"]) - - """ - The identifier of the metafield definition to pin. - """ - identifier: MetafieldDefinitionIdentifierInput - ): MetafieldDefinitionPinPayload @requiredAccess(scope: "API client to have access to the namespace and the resource type associated with the metafield definition.\n") - - """ - 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 @gidTypes(types: ["MetafieldDefinition"]) - - """ - The identifier of the metafield definition to unpin. - """ - identifier: MetafieldDefinitionIdentifierInput - ): MetafieldDefinitionUnpinPayload @requiredAccess(scope: "API client to have access to the namespace and the resource type associated with the metafield definition.\n") - - """ - 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 @requiredAccess(scope: "API client to have access to the namespace and the resource type associated with the metafield definition.\n") - - """ - 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 @requiredAccess(scope: "access defined by each metafield input `ownerId` scalar's type in a `MetafieldsSetInput` field.\nFor example, setting a metafield on a `PRODUCT` requires the same access as mutating a `PRODUCT`.\n") - - """ - 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 @requiredAccess(scope: "the same access level needed to mutate the owner resource. For instance, if you want to set\na metafield on a product, you need the same permissions as you would need to mutate a product.\n") - - """ - Asynchronously delete metaobjects and their associated metafields in bulk. - """ - metaobjectBulkDelete( - """ - Specifies the condition by which metaobjects are deleted. - Exactly one field of input is required. - """ - where: MetaobjectBulkDeleteWhereCondition! - ): MetaobjectBulkDeletePayload @requiredAccess(scope: "`write_metaobjects` access scope.") - - """ - 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 @requiredAccess(scope: "`write_metaobjects` access scope.") - - """ - 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 @requiredAccess(scope: "`write_metaobject_definitions` access scope.") - - """ - 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! @gidTypes(types: ["MetaobjectDefinition"]) - ): MetaobjectDefinitionDeletePayload @requiredAccess(scope: "`write_metaobject_definitions` access scope.") - - """ - 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 input fields for updating a metaobject definition. - """ - definition: MetaobjectDefinitionUpdateInput! - - """ - The ID of the metaobject definition to update. - """ - id: ID! @gidTypes(types: ["MetaobjectDefinition"]) - ): MetaobjectDefinitionUpdatePayload @requiredAccess(scope: "`write_metaobject_definitions` access scope.") - - """ - Deletes the specified metaobject and its associated metafields. - """ - metaobjectDelete( - """ - The ID of the metaobject to delete. - """ - id: ID! @gidTypes(types: ["Metaobject"]) - ): MetaobjectDeletePayload @requiredAccess(scope: "`write_metaobjects` access scope.") - - """ - 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! @gidTypes(types: ["Metaobject"]) - - """ - Specifies parameters to update on the metaobject. - """ - metaobject: MetaobjectUpdateInput! - ): MetaobjectUpdatePayload @requiredAccess(scope: "`write_metaobjects` access scope.") - - """ - 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. Only the fields you provide are - updated. Cannot be used in conjunction with `values`. - """ - metaobject: MetaobjectUpsertInput - - """ - The values of the metaobject as a JSON object keyed by field definition key. - This is a full replacement — omitted keys are cleared on an existing record. - Cannot be used in conjunction with `metaobject`. - """ - values: JSON - ): MetaobjectUpsertPayload @requiredAccess(scope: "`write_metaobjects` access scope.") - - """ - Creates up to 25 metaobjects of the same type. - """ - metaobjectsCreate( - """ - The parameters for the metaobjects to create. - """ - input: MetaobjectsCreateInput! - ): MetaobjectsCreatePayload @requiredAccess(scope: "`write_metaobjects` access scope.") - - """ - Create a mobile platform application. - """ - mobilePlatformApplicationCreate( - """ - The input to create a mobile platform application. - """ - input: MobilePlatformApplicationCreateInput! - ): MobilePlatformApplicationCreatePayload @requiredAccess(scope: "`write_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") - - """ - Delete a mobile platform application. - """ - mobilePlatformApplicationDelete( - """ - The ID of the Mobile Platform Application to be deleted. - """ - id: ID! @gidTypes(types: ["AndroidApplication", "AppleApplication"]) - ): MobilePlatformApplicationDeletePayload @requiredAccess(scope: "`write_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") - - """ - Update a mobile platform application. - """ - mobilePlatformApplicationUpdate( - """ - The ID of the Mobile Platform Application to be updated. - """ - id: ID! @gidTypes(types: ["AndroidApplication", "AppleApplication"]) - - """ - The input to updat a Mobile Platform Application. - """ - input: MobilePlatformApplicationUpdateInput! - ): MobilePlatformApplicationUpdatePayload @requiredAccess(scope: "`write_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") - - """ - 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( - """ - Whether to send a notification to the customer about the order cancellation. - """ - notifyCustomer: Boolean = false - - """ - The ID of the order to be canceled. - """ - orderId: ID! @gidTypes(types: ["Order"]) - - """ - The reason for canceling the order. - """ - reason: OrderCancelReason! - - """ - 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! - - """ - A staff-facing note about the order cancellation. This is not visible to the customer. Maximum length of 255 characters. - """ - staffNote: String = null - ): OrderCancelPayload @requiredAccess(scope: "`write_orders` access scope or `write_marketplace_orders` access scope. Also: This action cannot be reversed.") - - """ - 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 @requiredAccess(scope: "`write_orders` access scope or `write_marketplace_orders` access scope. Also: The user must have capture_payments_for_orders permission.") - - """ - 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 @requiredAccess(scope: "`write_orders` access scope. Also: User needs manage_orders_information permission.") - - """ - 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 strategies for updating inventory and whether to send shipping and order confirmations to customers. - """ - options: OrderCreateOptionsInput - - """ - The attributes of the new order. - """ - order: OrderCreateOrderInput! - ): OrderCreatePayload @requiredAccess(scope: "`write_orders` access scope. Also: This mutation is only accessible to apps authenticated using [offline tokens](https:\/\/shopify.dev\/docs\/apps\/build\/authentication-authorization\/access-tokens\/offline-access-tokens).") - - """ - 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 payment amount to collect. - """ - amount: MoneyInput - - """ - Whether the payment should be authorized or captured. If `false`, then the authorization of - the payment is triggered. - """ - autoCapture: Boolean = true - - """ - The ID of the order to collect the balance for. - """ - id: ID! @gidTypes(types: ["Order"]) - - """ - A unique key to identify the payment request. - """ - idempotencyKey: String! - - """ - The mandate ID used for payment. - """ - mandateId: ID! @gidTypes(types: ["PaymentMandate"]) - - """ - The ID of the payment schedule to collect the balance for. - """ - paymentScheduleId: ID @gidTypes(types: ["PaymentSchedule"]) - ): OrderCreateMandatePaymentPayload @requiredAccess(scope: "`write_payment_mandate` access scope. Also: The user must have `pay_orders_by_vaulted_card` permission. The API client must be installed on a Shopify Plus store to use the amount field.") - - """ - 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 manual payment amount to be created. - """ - amount: MoneyInput - - """ - The ID of the order to create a manual payment for. - """ - id: ID! @gidTypes(types: ["Order"]) - - """ - 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 @requiredAccess(scope: "`write_orders` access scope. Also: The user must have mark_orders_as_paid permission. The API client must be installed on a Shopify Plus store to use the amount field.") - - """ - Removes customer from an order. - """ - orderCustomerRemove( - """ - The ID of the order having its customer removed. - """ - orderId: ID! @gidTypes(types: ["Order"]) - ): OrderCustomerRemovePayload @requiredAccess(scope: "`write_orders` access scope. Also: The user must have permission to manage the order.") - - """ - Sets a customer on an order. - """ - orderCustomerSet( - """ - The ID of the customer being set on the order. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - The ID of the order having a customer set. - """ - orderId: ID! @gidTypes(types: ["Order"]) - ): OrderCustomerSetPayload @requiredAccess(scope: "`write_orders` access scope or `write_quick_sale` access scope. Also: The user must have permission to manage the order.") - - """ - 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! @gidTypes(types: ["Order"]) - ): OrderDeletePayload @requiredAccess(scope: "`write_orders` access scope. Also: The user must have delete_orders permission.") - - """ - 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) - or the order edit session to edit. This is the edit to which the custom item is added. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - - """ - The ID of the retail [location](https://shopify.dev/api/admin-graphql/latest/objects/location) - (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 @gidTypes(types: ["Location"]) - - """ - 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 requires shipping. Defaults to `false`. - """ - requiresShipping: Boolean - - """ - The optional SKU for the custom item to add. - """ - sku: String - - """ - Whether the custom item is taxable. Defaults to `true`. - """ - taxable: Boolean - - """ - The name of the custom item to add. - """ - title: String! - - """ - Specifies the weight unit and value inputs. - """ - weight: WeightInput - ): OrderEditAddCustomItemPayload @requiredAccess(scope: "`write_order_edits` access scope. Also: To use the GraphQL Admin API to edit orders, your app needs to request the `write_order_edits` access scope for a Shopify store.") - - """ - 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 discount to add to the line item. - """ - discount: OrderEditAppliedDiscountInput! - - """ - The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) - or the order edit session to edit. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - - """ - The ID of the calculated line item to add the discount to. - """ - lineItemId: ID! @gidTypes(types: ["CalculatedLineItem"]) - ): OrderEditAddLineItemDiscountPayload @requiredAccess(scope: "`write_order_edits` access scope. Also: The user must have apply_discounts_to_orders permission.") - - """ - 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) - or the order edit session to edit. This is the edit to which the shipping line is added. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - - """ - The shipping line to be added. - """ - shippingLine: OrderEditAddShippingLineInput! - ): OrderEditAddShippingLinePayload @requiredAccess(scope: "`write_order_edits` access scope.") - - """ - 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( - """ - Whether the mutation can create a line item for a variant that's already on the calculated order. - """ - allowDuplicates: Boolean = false - - """ - The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) - or the order edit session to edit. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - - """ - The ID of the [location](https://shopify.dev/api/admin-graphql/latest/objects/location) - to check for inventory availability. Used for tax calculations. A default - location ID is chosen automatically if none is provided. - """ - locationId: ID @gidTypes(types: ["Location"]) - - """ - The quantity of the item to add to the order. Must be a positive value. - """ - quantity: Int! - - """ - The ID of the variant to add. - """ - variantId: ID! @gidTypes(types: ["ProductVariant"]) - ): OrderEditAddVariantPayload @requiredAccess(scope: "`write_order_edits` access scope.") - - """ - 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! @gidTypes(types: ["Order"]) - ): OrderEditBeginPayload @requiredAccess(scope: "Requires `write_order_edits` access scope. Also: User needs either `manage_orders_information`, `edit_orders`, or `fulfill_and_ship_orders` permission.") - - """ - 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) - or the order edit session that will have its changes applied to the order. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - - """ - Whether to notify the customer or not. - """ - notifyCustomer: Boolean - - """ - Note for staff members. - """ - staffNote: String - ): OrderEditCommitPayload @requiredAccess(scope: "Requires `write_order_edits` access scope. Also: User needs either `manage_orders_information`, `edit_orders`, or `fulfill_and_ship_orders` permission.") - - """ - 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 discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) - to remove. - """ - discountApplicationId: ID! @gidTypes(types: ["CalculatedDiscountApplication"]) - - """ - The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) - or the order edit session to edit. This is the edit from which the discount is removed. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - ): OrderEditRemoveDiscountPayload @requiredAccess(scope: "`write_order_edits` access scope. Also: The user must have apply_discounts_to_orders permission.") - - """ - Removes a line item discount that was applied as part of an order edit. - """ - orderEditRemoveLineItemDiscount( - """ - The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) - to remove. - """ - discountApplicationId: ID! @gidTypes(types: ["CalculatedDiscountApplication"]) - - """ - The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) - or the order edit session to edit. This is the edit from which the line item discount is removed. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - ): OrderEditRemoveLineItemDiscountPayload @deprecated(reason: "Use `orderEditRemoveDiscount` instead.") @requiredAccess(scope: "`write_order_edits` access scope. Also: The user must have apply_discounts_to_orders permission.") - - """ - 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) - or the order edit session to edit. This is the edit from which the shipping line is removed. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - - """ - The ID of the calculated shipping line to remove. - """ - shippingLineId: ID! @gidTypes(types: ["CalculatedShippingLine"]) - ): OrderEditRemoveShippingLinePayload @requiredAccess(scope: "`write_order_edits` access scope.") - - """ - 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) - or the order edit session to edit. The edit changes the quantity on the line item. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - - """ - The ID of the calculated line item to edit. - """ - lineItemId: ID! @gidTypes(types: ["CalculatedLineItem"]) - - """ - The ID of the location. If 'restock' is set to true, the restocked item will be made available - at the specified location. - """ - locationId: ID @deprecated(reason: "No longer supported.") @gidTypes(types: ["Location"]) - - """ - 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 - ): OrderEditSetQuantityPayload @requiredAccess(scope: "`write_order_edits` access scope.") - - """ - 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 updated discount. - """ - discount: OrderEditAppliedDiscountInput! - - """ - The ID of the [calculated discount application](https://shopify.dev/api/admin-graphql/latest/interfaces/calculateddiscountapplication) - to update. - """ - discountApplicationId: ID! @gidTypes(types: ["CalculatedDiscountApplication"]) - - """ - The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) - or the order edit session to edit. This is the edit used to update the discount. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - ): OrderEditUpdateDiscountPayload @requiredAccess(scope: "`write_order_edits` access scope. Also: The user must have apply_discounts_to_orders permission.") - - """ - 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) - or the order edit session to edit. This is the edit used to update the shipping line. - """ - id: ID! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - - """ - The updated shipping line. - """ - shippingLine: OrderEditUpdateShippingLineInput! - - """ - The ID of the calculated shipping line to update. - """ - shippingLineId: ID! @gidTypes(types: ["CalculatedShippingLine"]) - ): OrderEditUpdateShippingLinePayload @requiredAccess(scope: "`write_order_edits` access scope.") - - """ - 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 email input fields for the order invoice. The `bcc` and `from` fields should be store or staff account emails. - """ - email: EmailInput - - """ - The order associated with the invoice. - """ - id: ID! @gidTypes(types: ["Order"]) - ): OrderInvoiceSendPayload @requiredAccess(scope: "`write_orders` access scope. Also: The user must have access to orders and manage orders information.") - - """ - 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 @requiredAccess(scope: "`write_orders` access scope. Also: The user must have mark_orders_as_paid permission.") - - """ - Opens a closed order. - """ - orderOpen( - """ - The input for the mutation. - """ - input: OrderOpenInput! - ): OrderOpenPayload @requiredAccess(scope: "`write_orders` access scope. Also: User needs manage_orders_information permission.") - - """ - 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 @requiredAccess(scope: "`write_orders` access scope. Also: This mutation is only accessible to apps authenticated using [offline tokens](https:\/\/shopify.dev\/docs\/apps\/build\/authentication-authorization\/access-tokens\/offline-access-tokens).") - - """ - 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 @requiredAccess(scope: "`write_orders` access scope, `write_marketplace_orders` access scope or `write_quick_sale` access scope. Also: The app must have the `write_pos_staff_member_event_attribution_overrides` access scope to assign events to another staff member.") - - """ - 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 @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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! @gidTypes(types: ["Page"]) - ): PageDeletePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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! @gidTypes(types: ["Page"]) - - """ - The properties of the page to be updated. - """ - page: PageUpdateInput! - ): PageUpdatePayload @requiredAccess(scope: "Any of `write_content`, `write_online_store_pages` access scopes.") - - """ - 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 enabled status of the payment customizations. - """ - enabled: Boolean! - - """ - The global IDs of the payment customizations. - """ - ids: [ID!]! @gidTypes(types: ["PaymentCustomization"]) - ): PaymentCustomizationActivationPayload @requiredAccess(scope: "`write_payment_customizations` access scope.") - - """ - 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 @requiredAccess(scope: "`write_payment_customizations` access scope.") - - """ - 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! @gidTypes(types: ["PaymentCustomization"]) - ): PaymentCustomizationDeletePayload @requiredAccess(scope: "`write_payment_customizations` access scope.") - - """ - 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! @gidTypes(types: ["PaymentCustomization"]) - - """ - The input data used to update the payment customization. - """ - paymentCustomization: PaymentCustomizationInput! - ): PaymentCustomizationUpdatePayload @requiredAccess(scope: "`write_payment_customizations` access scope.") - - """ - Sends an email payment reminder for a payment schedule. - """ - paymentReminderSend( - """ - The payment schedule id associated with the reminder. - """ - paymentScheduleId: ID! @gidTypes(types: ["PaymentSchedule"]) - ): PaymentReminderSendPayload @requiredAccess(scope: "`write_orders` access scope.") - - """ - 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( - """ - The attributes used to create the payment terms. - """ - paymentTermsAttributes: PaymentTermsCreateInput! - - """ - Specifies the reference orderId to add the payment terms for. - """ - referenceId: ID! @gidTypes(types: ["Order", "DraftOrder"]) - ): PaymentTermsCreatePayload @requiredAccess(scope: "`write_payment_terms` access scope. Also: The user must have access to orders or draft orders.") - - """ - 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 @requiredAccess(scope: "`write_payment_terms` access scope. Also: User must have either orders or draft orders access according to the reference.") - - """ - 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 @requiredAccess(scope: "`write_payment_terms` access scope. Also: User must have either orders or draft orders access according to the reference.") - - """ - Assigns a point of sale device to a cash drawer, removing any prior assignment. - """ - pointOfSaleDeviceAssignToCashDrawer( - """ - The cash drawer to assign the device to. - """ - cashDrawerId: ID! @gidTypes(types: ["CashDrawer"]) - - """ - The point of sale device to assign. - """ - pointOfSaleDeviceId: ID! @gidTypes(types: ["PointOfSaleDevice"]) - ): PointOfSaleDeviceAssignToCashDrawerPayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - Adds an adjustment to a point of sale device payment session. - """ - pointOfSaleDevicePaymentSessionAdjust( - """ - The amount of cash being added or removed. - """ - cash: MoneyInput! - - """ - The note entered when the adjustment was made. - """ - note: String - - """ - The point of sale device payment session to be adjusted. - """ - pointOfSaleDevicePaymentSessionId: ID! @gidTypes(types: ["PointOfSaleDevicePaymentSession"]) - - """ - The reason code for the adjustment. - """ - reasonCodeId: ID @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) - - """ - The staff member who made the adjustment. - """ - staffMemberId: ID! @gidTypes(types: ["StaffMember"]) - - """ - The time when the adjustment was made. Defaults to the current time. - """ - time: DateTime - ): PointOfSaleDevicePaymentSessionAdjustPayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - Closes a point of sale device payment session. - """ - pointOfSaleDevicePaymentSessionClose( - """ - The counted cash drawer balance when the session was closed. - """ - balance: MoneyInput! - - """ - The note entered when the session was closed. - """ - note: String - - """ - The point of sale device payment session to be closed. - """ - pointOfSaleDevicePaymentSessionId: ID! @gidTypes(types: ["PointOfSaleDevicePaymentSession"]) - - """ - The reason code for closing the session. - """ - reasonCodeId: ID @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) - - """ - The staff member who closed the session. - """ - staffMemberId: ID! @gidTypes(types: ["StaffMember"]) - - """ - When the session was closed. Defaults to the current time. - """ - time: DateTime - ): PointOfSaleDevicePaymentSessionClosePayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - Records a mid-session cash count for a point of sale device payment session. - """ - pointOfSaleDevicePaymentSessionCount( - """ - The counted cash drawer balance. - """ - balance: MoneyInput! - - """ - The note entered when the count was performed. - """ - note: String - - """ - The point of sale device payment session to record a count for. - """ - pointOfSaleDevicePaymentSessionId: ID! @gidTypes(types: ["PointOfSaleDevicePaymentSession"]) - - """ - The reason code for the count. - """ - reasonCodeId: ID @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) - - """ - The staff member who performed the count. - """ - staffMemberId: ID! @gidTypes(types: ["StaffMember"]) - - """ - When the count was performed. Defaults to the current time. - """ - time: DateTime - ): PointOfSaleDevicePaymentSessionCountPayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - Opens a point of sale device payment session. - """ - pointOfSaleDevicePaymentSessionOpen( - """ - The counted cash drawer balance when the session was opened. - """ - balance: MoneyInput - - """ - The note entered when the session was opened. - """ - note: String - - """ - The point of sale device to which this session belongs. - """ - pointOfSaleDeviceId: ID! @gidTypes(types: ["PointOfSaleDevice"]) - - """ - The reason code for the session opening. - """ - reasonCodeId: ID @gidTypes(types: ["CashManagementDefaultReasonCode", "CashManagementCustomReasonCode", "CashManagementSystemReasonCode"]) - - """ - The staff member who opened the session. - """ - staffMemberId: ID! @gidTypes(types: ["StaffMember"]) - - """ - The time the session was opened. Defaults to the current time. - """ - time: DateTime - ): PointOfSaleDevicePaymentSessionOpenPayload @requiredAccess(scope: "`write_cash_tracking` access scope.") - - """ - Installs storefront generation preview for shop. - """ - previewInstall( - """ - The UUID of the storefront_generation_preview to install. - """ - storefrontGenerationPreviewUuid: String! - ): PreviewInstallPayload @requiredAccess(scope: "`write_online_store` access scope or (`write_themes` access scope and `write_products` access scope).") @privatelyDocumented - - """ - 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 @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") - - """ - 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! @gidTypes(types: ["PriceList"]) - ): PriceListDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to delete catalogs.") - - """ - 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! @gidTypes(types: ["PriceList"]) - - """ - The list of fixed prices to add or update in the price list. - """ - prices: [PriceListPriceInput!]! - ): PriceListFixedPricesAddPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") - - """ - Updates the fixed prices for all variants for a product on a price list. You - can use the `priceListFixedPricesByProductBulkUpdate` mutation to set or - remove a fixed price for all variants of a product associated with the price list. - """ - priceListFixedPricesByProductBulkUpdate( - """ - The price list to update the prices for. - """ - priceListId: ID! @gidTypes(types: ["PriceList"]) - - """ - 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!] @gidTypes(types: ["Product"]) - ): PriceListFixedPricesByProductBulkUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") - - """ - 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( - """ - The price list to update the prices for. - """ - priceListId: ID! @gidTypes(types: ["PriceList"]) - - """ - 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!] @gidTypes(types: ["Product"]) - ): PriceListFixedPricesByProductUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") - - """ - 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! @gidTypes(types: ["PriceList"]) - - """ - A list of product variant IDs whose fixed prices will be removed from the price list. - """ - variantIds: [ID!]! @gidTypes(types: ["ProductVariant"]) - ): PriceListFixedPricesDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to delete catalogs.") - - """ - 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! @gidTypes(types: ["PriceList"]) - - """ - The fixed prices to add. - """ - pricesToAdd: [PriceListPriceInput!]! - - """ - A list of product variant IDs to remove from the price list. - """ - variantIdsToDelete: [ID!]! @gidTypes(types: ["ProductVariant"]) - ): PriceListFixedPricesUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") - - """ - 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! @gidTypes(types: ["PriceList"]) - - """ - The input data used to update the price list. - """ - input: PriceListUpdateInput! - ): PriceListUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs.") - - """ - Disable a shop's privacy features. - """ - privacyFeaturesDisable( - """ - The list of privacy features to disable. - """ - featuresToDisable: [PrivacyFeaturesEnum!]! - ): PrivacyFeaturesDisablePayload @requiredAccess(scope: "`write_privacy_settings` access scope.") - - """ - 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 @requiredAccess(scope: "`write_products` access scope. Also: The shop must have access to bundles feature.") - - """ - Updates a product bundle or componentized product. - """ - productBundleUpdate( - """ - Input for updating a product bundle or componentized product. - """ - input: ProductBundleUpdateInput! - ): ProductBundleUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The shop must have access to bundles feature.") - - """ - 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! @gidTypes(types: ["Product"]) - - """ - The status to be assigned to the product. - """ - status: ProductStatus! - ): ProductChangeStatusPayload @deprecated(reason: "Use `productUpdate` instead.") @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to change products status.") - - """ - 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 media to add to the product. - """ - media: [CreateMediaInput!] - - """ - The attributes of the new product. - """ - product: ProductCreateInput - - """ - The default preferences in the product create form. - """ - productPreferences: ProductPreferencesInput - ): ProductCreatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create products.") - - """ - 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( - """ - List of new media to be added to a product. - """ - media: [CreateMediaInput!]! - - """ - Specifies the product associated with the media. - """ - productId: ID! @gidTypes(types: ["Product"]) - ): ProductCreateMediaPayload @deprecated(reason: "Use `productUpdate` or `productSet` instead.") @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create media for a product.") - - """ - 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 @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to delete products.") - - """ - 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( - """ - The media IDs to be deleted. - """ - mediaIds: [ID!]! @gidTypes(types: ["Media"]) - - """ - Specifies the product ID from which the media will be deleted. - """ - productId: ID! @gidTypes(types: ["Product"]) - ): ProductDeleteMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to delete media from a product.") - - """ - 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( - """ - Specifies whether or not to duplicate images. - """ - includeImages: Boolean = false - - """ - Specifies whether or not to duplicate translations. - """ - includeTranslations: Boolean = false - - """ - The new status of the product. If no value is provided the status will be inherited from the original product. - """ - newStatus: ProductStatus - - """ - The new title of the product. - """ - newTitle: String! - - """ - The ID of the product to be duplicated. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - Specifies whether or not to run the mutation synchronously. - """ - synchronous: Boolean = true - ): ProductDuplicatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to duplicate a product.") - - """ - Creates a product feed for a specific publication. - """ - productFeedCreate( - """ - The properties of the new product feed. - """ - input: ProductFeedInput - ): ProductFeedCreatePayload @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") - - """ - Deletes a product feed for a specific publication. - """ - productFeedDelete( - """ - The ID of the product feed to be deleted. - """ - id: ID! @gidTypes(types: ["ProductFeed"]) - ): ProductFeedDeletePayload @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") - - """ - 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! @gidTypes(types: ["ProductFeed"]) - - """ - Syncs only products that have changed since the specified timestamp. - """ - updatedAtSince: DateTime - ): ProductFullSyncPayload @requiredAccess(scope: "Access allowed for apps with `read_product_listings` scope.") - - """ - Adds multiple selling plan groups to a product. - """ - productJoinSellingPlanGroups( - """ - The ID of the product. - """ - id: ID! @gidTypes(types: ["Product"]) - - """ - The IDs of the selling plan groups to add. - """ - sellingPlanGroupIds: [ID!]! @gidTypes(types: ["SellingPlanGroup"]) - ): ProductJoinSellingPlanGroupsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - Removes multiple groups from a product. - """ - productLeaveSellingPlanGroups( - """ - The ID of the product. - """ - id: ID! @gidTypes(types: ["Product"]) - - """ - The IDs of the selling plan groups to add. - """ - sellingPlanGroupIds: [ID!]! @gidTypes(types: ["SellingPlanGroup"]) - ): ProductLeaveSellingPlanGroupsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - 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! - - """ - New option values to create. - """ - optionValuesToAdd: [OptionValueCreateInput!] - - """ - IDs of the existing option values to delete. - """ - optionValuesToDelete: [ID!] @gidTypes(types: ["ProductOptionValue"]) - - """ - Existing option values to update. - """ - optionValuesToUpdate: [OptionValueUpdateInput!] - - """ - The ID of the Product the Option belongs to. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - The strategy defines which behavior the mutation should observe regarding variants, - such as creating variants or deleting them in response to option values to add or to delete. - If not provided or set to null, the strategy `LEAVE_AS_IS` will be used. - """ - variantStrategy: ProductOptionUpdateVariantStrategy - ): ProductOptionUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to edit products and manage product variants.") - - """ - 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( - """ - Options to add to the product. - """ - options: [OptionCreateInput!]! - - """ - The ID of the product to update. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - The strategy defines which behavior the mutation should observe regarding variants. - If not provided or set to null, the strategy `LEAVE_AS_IS` will be used. - """ - variantStrategy: ProductOptionCreateVariantStrategy = LEAVE_AS_IS - ): ProductOptionsCreatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create product variants.") - - """ - 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( - """ - IDs of the options to delete from the product. - """ - options: [ID!]! @gidTypes(types: ["ProductOption"]) - - """ - ID of the product from which to delete the options. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - 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 @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to edit products and delete product variants.") - - """ - 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( - """ - Options to reorder on the product. - """ - options: [OptionReorderInput!]! - - """ - The ID of the product to update. - """ - productId: ID! @gidTypes(types: ["Product"]) - ): ProductOptionsReorderPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to update product variants.") - - """ - 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.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to publish a product.") - - """ - 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! @gidTypes(types: ["Product"]) - - """ - A list of moves to perform which will be evaluated in order. - """ - moves: [MoveInput!]! - ): ProductReorderMediaPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to reorder the media attached to a product.") - - """ - 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( - """ - Specifies the identifier that will be used to lookup the resource. - """ - identifier: ProductSetIdentifiers - - """ - The properties of the newly created or updated product. - """ - input: ProductSetInput! - - """ - The default preferences in the product create form. - """ - productPreferences: ProductPreferencesInput - - """ - Whether the mutation should be run synchronously or asynchronously. - - If `true`, the mutation will return the updated `product`. - - If `false`, the mutation will return a `productSetOperation`. - - Defaults to `true`. - - Setting `synchronous: false` may be desirable depending on the input - complexity/size, and should be used if you are experiencing timeouts. - - **Note**: When run in the context of a - [bulk operation](https://shopify.dev/api/usage/bulk-operations/imports), the mutation will - always run synchronously and this argument will be ignored. - """ - synchronous: Boolean = true - ): ProductSetPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create products.") - - """ - Unpublishes a product. - """ - productUnpublish( - """ - Specifies the product to unpublish and the channel to unpublish it from. - """ - input: ProductUnpublishInput! - ): ProductUnpublishPayload @deprecated(reason: "Use `publishableUnpublish` instead.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to unpublish a product.") - - """ - 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( - """ - Specifies the identifier that will be used to lookup the resource. - """ - identifier: ProductUpdateIdentifiers - - """ - The updated properties for a product. - """ - input: ProductInput @deprecated(reason: "Use `product` instead.") - - """ - List of new media to be added to the product. - """ - media: [CreateMediaInput!] - - """ - The updated properties for a product. - """ - product: ProductUpdateInput - - """ - User product configuration settings. - """ - productPreferences: ProductPreferencesInput - ): ProductUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to update products.") - - """ - 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( - """ - A list of media updates. - """ - media: [UpdateMediaInput!]! - - """ - Specifies the product on which media will be updated. - """ - productId: ID! @gidTypes(types: ["Product"]) - ): ProductUpdateMediaPayload @deprecated(reason: "Use `fileUpdate` instead.") @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to update media for a product.") - - """ - 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! @gidTypes(types: ["Product"]) - - """ - A list of pairs of variants and media to be attached to the variants. - """ - variantMedia: [ProductVariantAppendMediaInput!]! - ): ProductVariantAppendMediaPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to append media to variants.") - - """ - Detaches media from product variants. - """ - productVariantDetachMedia( - """ - Specifies the product to which the variants and media are associated. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - A list of pairs of variants and media to be deleted from the variants. - """ - variantMedia: [ProductVariantDetachMediaInput!]! - ): ProductVariantDetachMediaPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to detach media from product variants.") - - """ - Adds multiple selling plan groups to a product variant. - """ - productVariantJoinSellingPlanGroups( - """ - The ID of the product variant. - """ - id: ID! @gidTypes(types: ["ProductVariant"]) - - """ - The IDs of the selling plan groups to add. - """ - sellingPlanGroupIds: [ID!]! @gidTypes(types: ["SellingPlanGroup"]) - ): ProductVariantJoinSellingPlanGroupsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - Remove multiple groups from a product variant. - """ - productVariantLeaveSellingPlanGroups( - """ - The ID of the product variant. - """ - id: ID! @gidTypes(types: ["ProductVariant"]) - - """ - The IDs of the selling plan groups to leave. - """ - sellingPlanGroupIds: [ID!]! @gidTypes(types: ["SellingPlanGroup"]) - ): ProductVariantLeaveSellingPlanGroupsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - 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 @requiredAccess(scope: "`write_products` access scope. Also: The shop must have access to bundles feature.") - - """ - 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( - """ - List of new media to be added to the product. - """ - media: [CreateMediaInput!] - - """ - The ID of the product on which to create the variants. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - 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 - - """ - An array of product variants to be created. - """ - variants: [ProductVariantsBulkInput!]! - ): ProductVariantsBulkCreatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to create product variants.") - - """ - 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( - """ - The ID of the product with the variants to update. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - An array of product variants IDs to delete. - """ - variantsIds: [ID!]! @gidTypes(types: ["ProductVariant"]) - ): ProductVariantsBulkDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to delete product variants.") - - """ - Reorders multiple variants in a single product. This mutation can be called directly or via the bulkOperation. - """ - productVariantsBulkReorder( - """ - An array of variant positions. - """ - positions: [ProductVariantPositionInput!]! - - """ - The product ID of the variants to be reordered. - """ - productId: ID! @gidTypes(types: ["Product"]) - ): ProductVariantsBulkReorderPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to reorder product variants.") - - """ - 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( - """ - When partial updates are allowed, valid variant changes may be persisted even if some of - the variants updated have invalid data and cannot be persisted. - When partial updates are not allowed, any error will prevent all variants from updating. - """ - allowPartialUpdates: Boolean = false - - """ - List of new media to be added to the product. - """ - media: [CreateMediaInput!] - - """ - The ID of the product associated with the variants to update. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - An array of product variants to update. - """ - variants: [ProductVariantsBulkInput!]! - ): ProductVariantsBulkUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have a permission to update product variants.") - - """ - 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 @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the read_customer_events and write_server_pixels access scopes.") - - """ - 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! @gidTypes(types: ["WebhookSubscription"]) - - """ - 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 @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit catalogs.") - - """ - Deletes a publication. - """ - publicationDelete( - """ - The ID of the publication to delete. - """ - id: ID! @gidTypes(types: ["Publication"]) - ): PublicationDeletePayload @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit catalogs.") - - """ - 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! @gidTypes(types: ["Publication"]) - - """ - The input fields to use when updating the publication. - """ - input: PublicationUpdateInput! - ): PublicationUpdatePayload @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit catalogs.") - - """ - 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! @gidTypes(types: ["Product", "Collection", "ProductVariant"]) - - """ - Specifies the input fields required to publish a resource. - """ - input: [PublicationInput!]! - ): PublishablePublishPayload @requiredAccess(scope: "`write_publications` access scope. Also: The user must have permission to create and edit products or create and edit catalogs.") - - """ - 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! @gidTypes(types: ["Product", "Collection", "ProductVariant"]) - ): PublishablePublishToCurrentChannelPayload @deprecated(reason: "Use `publishablePublish` instead.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit products.") - - """ - 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! @gidTypes(types: ["Product", "Collection", "ProductVariant"]) - - """ - Specifies the input fields required to unpublish a resource. - """ - input: [PublicationInput!]! - ): PublishableUnpublishPayload @requiredAccess(scope: "`write_publications` access scope. Also: The user must have permission to create and edit products or create and edit catalogs.") - - """ - 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! @gidTypes(types: ["Product", "Collection", "ProductVariant"]) - ): PublishableUnpublishToCurrentChannelPayload @deprecated(reason: "Use `publishableUnpublish` instead.") @requiredAccess(scope: "`write_publications` access scope. Also: The user must have a permission to create and edit products.") - - """ - 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 input data used to update the quantity pricing in the price list. - """ - input: QuantityPricingByVariantUpdateInput! - - """ - The ID of the price list for which quantity pricing will be updated. - """ - priceListId: ID! @gidTypes(types: ["PriceList"]) - ): QuantityPricingByVariantUpdatePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs, and the shop requires B2B features enabled.") - - """ - 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! @gidTypes(types: ["PriceList"]) - - """ - The list of quantity rules to add or update in the price list. - """ - quantityRules: [QuantityRuleInput!]! - ): QuantityRulesAddPayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs, and the shop requires B2B features enabled.") - - """ - 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! @gidTypes(types: ["PriceList"]) - - """ - A list of product variant IDs whose quantity rules will be removed from the price list. - """ - variantIds: [ID!]! @gidTypes(types: ["ProductVariant"]) - ): QuantityRulesDeletePayload @requiredAccess(scope: "`write_products` access scope. Also: The user must have permission to create and edit catalogs, and the shop requires B2B features enabled.") - - """ - 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 @requiredAccess(scope: "`orders` access scope, `marketplace_orders` access scope or `buyer_membership_orders` access scope.") - - """ - Removes return and/or exchange lines from a return. - """ - removeFromReturn( - """ - The exchange line items to remove from the return. - """ - exchangeLineItems: [ExchangeLineItemRemoveFromReturnInput!] - - """ - The ID of the return for line item removal. - """ - returnId: ID! @gidTypes(types: ["Return"]) - - """ - The return line items to remove from the return. - """ - returnLineItems: [ReturnLineItemRemoveFromReturnInput!] - ): RemoveFromReturnPayload @requiredAccess(scope: "`write_returns` access scope. Also: The user must have `return_orders` permission.") - - """ - 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - 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! @gidTypes(types: ["Return"]) - - """ - 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - 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! @gidTypes(types: ["Return"]) - ): ReturnClosePayload @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - Removes return lines from a return. - """ - returnLineItemRemoveFromReturn( - """ - The ID of the return for line item removal. - """ - returnId: ID! @gidTypes(types: ["Return"]) - - """ - The return line items to remove from the return. - """ - returnLineItems: [ReturnLineItemRemoveFromReturnInput!]! - ): ReturnLineItemRemoveFromReturnPayload @deprecated(reason: "Use `removeFromReturn` instead.") @requiredAccess(scope: "`write_returns` access scope. Also: The user must have `return_orders` permission.") - - """ - 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - 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.") @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope. Also: The user must have `refund_orders` permission.") - - """ - Reopens a closed return. - """ - returnReopen( - """ - The ID of the return to reopen. - """ - id: ID! @gidTypes(types: ["Return"]) - ): ReturnReopenPayload @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - 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 @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - Creates a new reverse delivery with associated external shipping information. - """ - reverseDeliveryCreateWithShipping( - """ - 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 - - """ - The reverse delivery line items to be created. If an empty array is provided, then this mutation - will create a reverse delivery line item for each reverse fulfillment order line item, with its quantity equal - to the reverse fulfillment order line item total quantity. - """ - reverseDeliveryLineItems: [ReverseDeliveryLineItemInput!]! - - """ - The ID of the reverse fulfillment order that's associated to the reverse delivery. - """ - reverseFulfillmentOrderId: ID! @gidTypes(types: ["ReverseFulfillmentOrder"]) - - """ - The tracking information for the reverse delivery. - """ - trackingInput: ReverseDeliveryTrackingInput = null - ): ReverseDeliveryCreateWithShippingPayload @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - Updates a reverse delivery with associated external shipping information. - """ - reverseDeliveryShippingUpdate( - """ - 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 - - """ - The ID of the reverse delivery to update. - """ - reverseDeliveryId: ID! @gidTypes(types: ["ReverseDelivery"]) - - """ - The tracking information for the reverse delivery. - """ - trackingInput: ReverseDeliveryTrackingInput = null - ): ReverseDeliveryShippingUpdatePayload @requiredAccess(scope: "`write_returns` access scope.") - - """ - Disposes reverse fulfillment order line items. - """ - reverseFulfillmentOrderDispose( - """ - The input parameters required to dispose reverse fulfillment order line items. - """ - dispositionInputs: [ReverseFulfillmentOrderDisposeInput!]! - ): ReverseFulfillmentOrderDisposePayload @requiredAccess(scope: "`write_returns` access scope or `write_marketplace_returns` access scope.") - - """ - 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 @requiredAccess(scope: "`write_script_tags` access scope. Also: Requires access to script tags.") - - """ -

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! @gidTypes(types: ["ScriptTag"]) - ): ScriptTagDeletePayload @requiredAccess(scope: "`write_script_tags` access scope. Also: Requires access to script tags.") - - """ -

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! @gidTypes(types: ["ScriptTag"]) - - """ - Specifies the input fields for a script tag. - """ - input: ScriptTagInput! - ): ScriptTagUpdatePayload @requiredAccess(scope: "`write_script_tags` access scope. Also: Requires access to script tags.") - - """ - 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 @requiredAccess(scope: "`write_customers` access scope. Also: The user must not have restricted access.") - - """ - Deletes a segment. - """ - segmentDelete( - """ - Specifies the segment to delete. - """ - id: ID! @gidTypes(types: ["Segment"]) - ): SegmentDeletePayload @requiredAccess(scope: "`write_customers` access scope. Also: The user must not have restricted access.") - - """ - Updates a segment. - """ - segmentUpdate( - """ - Specifies the segment to be updated. - """ - id: ID! @gidTypes(types: ["Segment"]) - - """ - 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 @requiredAccess(scope: "`write_customers` access scope. Also: The user must not have restricted access.") - - """ - Adds multiple product variants to a selling plan group. - """ - sellingPlanGroupAddProductVariants( - """ - The ID of the selling plan group. - """ - id: ID! @gidTypes(types: ["SellingPlanGroup"]) - - """ - The IDs of the product variants to add. - """ - productVariantIds: [ID!]! @gidTypes(types: ["ProductVariant"]) - ): SellingPlanGroupAddProductVariantsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - Adds multiple products to a selling plan group. - """ - sellingPlanGroupAddProducts( - """ - The ID of the selling plan group. - """ - id: ID! @gidTypes(types: ["SellingPlanGroup"]) - - """ - The IDs of the products to add. - """ - productIds: [ID!]! @gidTypes(types: ["Product"]) - ): SellingPlanGroupAddProductsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - 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 @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - Delete a Selling Plan Group. This does not affect subscription contracts. - """ - sellingPlanGroupDelete( - """ - The id of the selling plan group to delete. - """ - id: ID! @gidTypes(types: ["SellingPlanGroup"]) - ): SellingPlanGroupDeletePayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - Removes multiple product variants from a selling plan group. - """ - sellingPlanGroupRemoveProductVariants( - """ - The ID of the selling plan group. - """ - id: ID! @gidTypes(types: ["SellingPlanGroup"]) - - """ - The IDs of the product variants to remove. - """ - productVariantIds: [ID!]! @gidTypes(types: ["ProductVariant"]) - ): SellingPlanGroupRemoveProductVariantsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - Removes multiple products from a selling plan group. - """ - sellingPlanGroupRemoveProducts( - """ - The ID of the selling plan group. - """ - id: ID! @gidTypes(types: ["SellingPlanGroup"]) - - """ - The IDs of the products to remove. - """ - productIds: [ID!]! @gidTypes(types: ["Product"]) - ): SellingPlanGroupRemoveProductsPayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - Update a Selling Plan Group. - """ - sellingPlanGroupUpdate( - """ - The Selling Plan Group to update. - """ - id: ID! @gidTypes(types: ["SellingPlanGroup"]) - - """ - The properties of the Selling Plan Group to update. - """ - input: SellingPlanGroupInput! - ): SellingPlanGroupUpdatePayload @requiredAccess(scope: "`write_products` access scope as well as any of `write_own_subscription_contracts`, `write_purchase_options` access scopes. Also: The user must have `manage_orders_information` permissions.") - - """ - 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 @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the read_customer_events access scope, write_server_pixels access scope, and user access permission.") - - """ - Deletes the Server Pixel associated with the current app & shop. - """ - serverPixelDelete: ServerPixelDeletePayload @requiredAccess(scope: "`write_pixels` access scope. Also: The app must have the write_server_pixels access scope, and user access permission.") - - """ - Deletes a shipping package. - """ - shippingPackageDelete( - """ - The ID of the shipping package to remove. - """ - id: ID! @gidTypes(types: ["ShippingPackageV2"]) - ): ShippingPackageDeletePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") - - """ - 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! @gidTypes(types: ["ShippingPackageV2"]) - ): ShippingPackageMakeDefaultPayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") - - """ - Updates a shipping package. - """ - shippingPackageUpdate( - """ - The ID of the shipping package to update. - """ - id: ID! @gidTypes(types: ["ShippingPackageV2"]) - - """ - Specifies the input fields for a shipping package. - """ - shippingPackage: CustomShippingPackageInput! - ): ShippingPackageUpdatePayload @requiredAccess(scope: "Any of `shipping` access scopes or `manage_delivery_settings` user permission.") - - """ - 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 @requiredAccess(scope: "`write_locales` access scope.") - - """ - 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!] @gidTypes(types: ["WebPresence"]) - ): ShopLocaleEnablePayload @requiredAccess(scope: "`write_locales` access scope.") - - """ - 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 @requiredAccess(scope: "`write_locales` access scope.") - - """ - Updates a shop policy. - """ - shopPolicyUpdate( - """ - The properties to use when updating the shop policy. - """ - shopPolicy: ShopPolicyInput! - ): ShopPolicyUpdatePayload @requiredAccess(scope: "`write_legal_policies` access scope.") - - """ - 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 @requiredAccess(scope: "`write_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") - - """ - Creates a Shop Users API access token for a specific Shop user. - """ - shopUserAccessTokenCreate( - """ - The email address of the Shop account. - """ - email: String! - ): ShopUserAccessTokenCreatePayload - - """ - 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 @requiredAccess(scope: "`write_shopify_payments_tooling` access scope.") - - """ - 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 access settings that apply to each of the metafields that belong to the metafield definition. - """ - access: StandardMetafieldDefinitionAccessInput - - """ - The capabilities of the metafield definition. - """ - capabilities: MetafieldCapabilityCreateInput - - """ - The ID of the standard metafield definition template to enable. - """ - id: ID @gidTypes(types: ["StandardMetafieldDefinitionTemplate"]) - - """ - The key of the standard metafield to enable. Used in combination with `namespace`. - """ - key: String - - """ - The namespace of the standard metafield to enable. Used in combination with `key`. - """ - namespace: String - - """ - The resource type that the metafield definition is scoped to. - """ - ownerType: MetafieldOwnerType! - - """ - Whether to pin the metafield definition. - """ - pin: Boolean = null - - """ - Whether the metafield definition can be used as a collection condition. Defaults to false. - """ - useAsCollectionCondition: Boolean = null @deprecated(reason: "Use `capabilities.smartCollectionCondition` instead.") - - """ - Whether metafields for the definition are visible using the Storefront API. - """ - visibleToStorefrontApi: Boolean = null @deprecated(reason: "Use `access.storefront` instead.") - ): StandardMetafieldDefinitionEnablePayload @requiredAccess(scope: "API client to have access to the resource type associated with the metafield definition owner type.") - - """ - Enables multiple specified standard metafield definitions from their templates as a single transaction. - This API is idempotent so any previously-enabled standard definitions will not cause a failure. However, - invalid inputs or other user errors will prevent all of the requested definitions from being enabled. - - Refer to the [list of standard metafield definition templates](https://shopify.dev/apps/metafields/definitions/standard-definitions). - """ - standardMetafieldDefinitionsEnable( - """ - The list of standard definitions to enable. Maximum of 25. - """ - definitions: [StandardMetafieldDefinitionsEnableInput!]! - ): StandardMetafieldDefinitionsEnablePayload @requiredAccess(scope: "API client to have access to the resource type associated with the metafield definition owner type.") - - """ - Enables the specified standard metaobject definition from its template. - """ - standardMetaobjectDefinitionEnable( - """ - The type of the metaobject definition to enable. - """ - type: String! - ): StandardMetaobjectDefinitionEnablePayload @requiredAccess(scope: "`write_metaobject_definitions` access scope.") - - """ - 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 input fields for a store credit account credit transaction. - """ - creditInput: StoreCreditAccountCreditInput! - - """ - The ID of the store credit account or the ID of the account owner. - """ - id: ID! @gidTypes(types: ["StoreCreditAccount", "HasStoreCreditAccounts"]) - ): StoreCreditAccountCreditPayload @requiredAccess(scope: "`write_store_credit_account_transactions` access scope.") - - """ - Creates a debit transaction that decreases the store credit account balance by the given amount. - """ - storeCreditAccountDebit( - """ - The input fields for a store credit account debit transaction. - """ - debitInput: StoreCreditAccountDebitInput! - - """ - The ID of the store credit account or the ID of the account owner. - """ - id: ID! @gidTypes(types: ["StoreCreditAccount", "HasStoreCreditAccounts"]) - ): StoreCreditAccountDebitPayload @requiredAccess(scope: "`write_store_credit_account_transactions` access scope.") - - """ - 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 information to apply as a billing attempt. - """ - subscriptionBillingAttemptInput: SubscriptionBillingAttemptInput! - - """ - The ID of the subscription contract. - """ - subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) - ): SubscriptionBillingAttemptCreatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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( - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - 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 - - """ - Selected payment processing policy for the billing attempt. Defaults to FAIL_UNLESS_VALID_PAYMENT_METHOD. - """ - paymentProcessingPolicy: SubscriptionBillingAttemptPaymentProcessingPolicy = FAIL_UNLESS_VALID_PAYMENT_METHOD - ): SubscriptionBillingCycleBulkChargePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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 @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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 actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - Select the specific billing cycle to be billed. - If 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 - - """ - Select payment processing policy for the billing attempt. Defaults to FAIL_UNLESS_VALID_PAYMENT_METHOD. - """ - paymentProcessingPolicy: SubscriptionBillingAttemptPaymentProcessingPolicy - - """ - The ID of the subscription contract. - """ - subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) - ): SubscriptionBillingCycleChargePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Commits the updates of a Subscription Billing Cycle Contract draft. - """ - subscriptionBillingCycleContractDraftCommit( - """ - The gid of the Subscription Contract draft to commit. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - ): SubscriptionBillingCycleContractDraftCommitPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Concatenates a contract to a Subscription Draft. - """ - subscriptionBillingCycleContractDraftConcatenate( - """ - An array of Subscription Contracts with their selected billing cycles to concatenate to the subscription draft. - """ - concatenatedBillingCycleContracts: [SubscriptionBillingCycleInput!]! - - """ - The gid of the Subscription Contract draft to update. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - ): SubscriptionBillingCycleContractDraftConcatenatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Edit the contents of a subscription contract for the specified billing cycle. - """ - subscriptionBillingCycleContractEdit( - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - Input object for selecting and using billing cycles. - """ - billingCycleInput: SubscriptionBillingCycleInput! - ): SubscriptionBillingCycleContractEditPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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 @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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! @gidTypes(types: ["SubscriptionContract"]) - - """ - Select billing cycles to be deleted. - """ - targetSelection: SubscriptionBillingCyclesTargetSelection! - ): SubscriptionBillingCycleEditsDeletePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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 @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Skips a Subscription Billing Cycle. - """ - subscriptionBillingCycleSkip( - """ - Input object for selecting and using billing cycles. - """ - billingCycleInput: SubscriptionBillingCycleInput! - ): SubscriptionBillingCycleSkipPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Unskips a Subscription Billing Cycle. - """ - subscriptionBillingCycleUnskip( - """ - Input object for selecting and using billing cycles. - """ - billingCycleInput: SubscriptionBillingCycleInput! - ): SubscriptionBillingCycleUnskipPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Activates a Subscription Contract. Contract status must be either active, paused, or failed. - """ - subscriptionContractActivate( - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - The ID of the Subscription Contract. - """ - subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) - ): SubscriptionContractActivatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Creates a Subscription Contract. - """ - subscriptionContractAtomicCreate( - """ - The properties of the new Subscription Contract. - """ - input: SubscriptionContractAtomicCreateInput! - ): SubscriptionContractAtomicCreatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Cancels a Subscription Contract. - """ - subscriptionContractCancel( - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - The ID of the Subscription Contract. - """ - subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) - ): SubscriptionContractCancelPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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 @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Expires a Subscription Contract. - """ - subscriptionContractExpire( - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - The ID of the Subscription Contract. - """ - subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) - ): SubscriptionContractExpirePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Fails a Subscription Contract. - """ - subscriptionContractFail( - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - The ID of the Subscription Contract. - """ - subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) - ): SubscriptionContractFailPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Pauses a Subscription Contract. - """ - subscriptionContractPause( - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - The ID of the Subscription Contract. - """ - subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) - ): SubscriptionContractPausePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Allows for the easy change of a Product in a Contract or a Product price change. - """ - subscriptionContractProductChange( - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - The properties of the Product changes. - """ - input: SubscriptionContractProductChangeInput! - - """ - The gid of the Subscription Line to update. - """ - lineId: ID! @gidTypes(types: ["SubscriptionLine"]) - - """ - The ID of the subscription contract. - """ - subscriptionContractId: ID! @gidTypes(types: ["SubscriptionContract"]) - ): SubscriptionContractProductChangePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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! @gidTypes(types: ["SubscriptionContract"]) - - """ - The next billing date. - """ - date: DateTime! - ): SubscriptionContractSetNextBillingDatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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 actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - The gid of the Subscription Contract to update. - """ - contractId: ID! @gidTypes(types: ["SubscriptionContract"]) - ): SubscriptionContractUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Commits the updates of a Subscription Contract draft. - """ - subscriptionDraftCommit( - """ - The gid of the Subscription Contract draft to commit. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - ): SubscriptionDraftCommitPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Adds a subscription discount to a subscription draft. - """ - subscriptionDraftDiscountAdd( - """ - The ID of the Subscription Contract draft to add a subscription discount to. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - - """ - The properties of the new Subscription Discount. - """ - input: SubscriptionManualDiscountInput! - ): SubscriptionDraftDiscountAddPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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! @gidTypes(types: ["SubscriptionDraft"]) - - """ - Code discount redeem code. - """ - redeemCode: String! - ): SubscriptionDraftDiscountCodeApplyPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Removes a subscription discount from a subscription draft. - """ - subscriptionDraftDiscountRemove( - """ - The gid of the subscription draft discount to remove. - """ - discountId: ID! @gidTypes(types: ["SubscriptionManualDiscount", "SubscriptionAppliedCodeDiscount"]) - - """ - The gid of the subscription contract draft to remove a subscription discount from. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - ): SubscriptionDraftDiscountRemovePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Updates a subscription discount on a subscription draft. - """ - subscriptionDraftDiscountUpdate( - """ - The gid of the Subscription Discount to update. - """ - discountId: ID! @gidTypes(types: ["SubscriptionManualDiscount", "SubscriptionAppliedCodeDiscount"]) - - """ - The ID of the Subscription Contract draft to update a subscription discount on. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - - """ - The properties to update on the Subscription Discount. - """ - input: SubscriptionManualDiscountInput! - ): SubscriptionDraftDiscountUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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! @gidTypes(types: ["SubscriptionDraft"]) - - """ - The properties of the new subscription free shipping discount. - """ - input: SubscriptionFreeShippingDiscountInput! - ): SubscriptionDraftFreeShippingDiscountAddPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Updates a subscription free shipping discount on a subscription draft. - """ - subscriptionDraftFreeShippingDiscountUpdate( - """ - The gid of the Subscription Discount to update. - """ - discountId: ID! @gidTypes(types: ["SubscriptionManualDiscount", "SubscriptionAppliedCodeDiscount"]) - - """ - The ID of the Subscription Contract draft to update a subscription discount on. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - - """ - The properties to update on the Subscription Free Shipping Discount. - """ - input: SubscriptionFreeShippingDiscountInput! - ): SubscriptionDraftFreeShippingDiscountUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Adds a subscription line to a subscription draft. - """ - subscriptionDraftLineAdd( - """ - The gid of the Subscription Contract draft to add a subscription line to. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - - """ - The properties of the new Subscription Line. - """ - input: SubscriptionLineInput! - ): SubscriptionDraftLineAddPayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Removes a subscription line from a subscription draft. - """ - subscriptionDraftLineRemove( - """ - The gid of the Subscription Contract draft to remove a subscription line from. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - - """ - The gid of the Subscription Line to remove. - """ - lineId: ID! @gidTypes(types: ["SubscriptionLine"]) - ): SubscriptionDraftLineRemovePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Updates a subscription line on a subscription draft. - """ - subscriptionDraftLineUpdate( - """ - The gid of the Subscription Contract draft to update a subscription line from. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - - """ - The properties of the new Subscription Line. - """ - input: SubscriptionLineUpdateInput! - - """ - The gid of the Subscription Line to update. - """ - lineId: ID! @gidTypes(types: ["SubscriptionLine"]) - ): SubscriptionDraftLineUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - Updates a Subscription Draft. - """ - subscriptionDraftUpdate( - """ - The gid of the Subscription Draft to update. - """ - draftId: ID! @gidTypes(types: ["SubscriptionDraft"]) - - """ - The properties of the new Subscription Contract. - """ - input: SubscriptionDraftInput! - ): SubscriptionDraftUpdatePayload @requiredAccess(scope: "`write_own_subscription_contracts` access scope. Also: The user must have manage_orders_information permission.") - - """ - 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), [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article), and [`DiscountNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountNode). - """ - id: ID! @gidTypes(types: ["Order", "Customer", "Product", "DraftOrder", "Article", "Article", "DiscountNode"]) - - """ - 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), [`Article`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Article), and [`DiscountNode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountNode). - """ - id: ID! @gidTypes(types: ["Order", "Customer", "Product", "DraftOrder", "Article", "Article", "DiscountNode"]) - - """ - 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 @requiredAccess(scope: "`write_taxes` access scope. Also: The caller must be a tax calculations app.") - - """ - 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 end time of the range of orders to create the tax summary for. - """ - endTime: DateTime - - """ - The ID of the order to create the tax summary for. - """ - orderId: ID @gidTypes(types: ["Order"]) - - """ - The start time of the range of orders to create the tax summary for. - """ - startTime: DateTime - ): TaxSummaryCreatePayload @requiredAccess(scope: "`write_taxes` access scope. Also: The caller must be a tax calculations app and the relevant feature must be on.") - - """ - 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( - """ - 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 - - """ - An external URL or a - [staged upload URL](https://shopify.dev/api/admin-graphql/latest/mutations/stageduploadscreate) - of the theme to import. - """ - source: URL! - ): ThemeCreatePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") - - """ - Deletes a theme. - """ - themeDelete( - """ - The ID of the theme to be deleted. - """ - id: ID! @gidTypes(types: ["ThemeType"]) - ): ThemeDeletePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") - - """ - Duplicates a theme. - """ - themeDuplicate( - """ - ID of the theme to be duplicated. - """ - id: ID! @gidTypes(types: ["ThemeType"]) - - """ - Name of the new theme. - """ - name: String - ): ThemeDuplicatePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") - - """ - Copy theme files. Copying to existing theme files will overwrite them. - """ - themeFilesCopy( - """ - The files to update. - """ - files: [ThemeFilesCopyFileInput!]! - - """ - The theme to update. - """ - themeId: ID! @gidTypes(types: ["ThemeType"]) - ): ThemeFilesCopyPayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify theme files.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") - - """ - Deletes a theme's files. - """ - themeFilesDelete( - """ - The files to delete. - """ - files: [String!]! - - """ - Specifies the theme to deleted. - """ - themeId: ID! @gidTypes(types: ["ThemeType"]) - ): ThemeFilesDeletePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify theme files.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") - - """ - 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 files to update. - """ - files: [OnlineStoreThemeFilesUpsertFileInput!]! - - """ - The theme to update. - """ - themeId: ID! @gidTypes(types: ["ThemeType"]) - ): ThemeFilesUpsertPayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify theme files.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") - - """ - Publishes a theme. - """ - themePublish( - """ - ID of the theme to be published. - """ - id: ID! @gidTypes(types: ["ThemeType"]) - ): ThemePublishPayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") - - """ - Updates a theme. - """ - themeUpdate( - """ - The ID of the theme to be updated. - """ - id: ID! @gidTypes(types: ["ThemeType"]) - - """ - The attributes of the theme to be updated. - """ - input: OnlineStoreThemeInput! - ): ThemeUpdatePayload @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify themes.\n If you think that your app is eligible for an exemption and should have access to this API,\n then you can [submit an exception request](https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLSfZTB1vxFC5d1-GPdqYunWRGUoDcOheHQzfK2RoEFEHrknt5g\/viewform).") - - """ - Trigger the voiding of an uncaptured authorization transaction. - """ - transactionVoid( - """ - An uncaptured authorization transaction. - """ - parentTransactionId: ID! @gidTypes(types: ["OrderTransaction"]) - ): TransactionVoidPayload @requiredAccess(scope: "`write_orders` access scope. Also: The user must have permission to cancel orders.") - - """ - 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! @gidTypes(types: ["Article", "ArticleImage", "Blog", "Brand", "Collection", "CollectionImage", "CookieBanner", "MethodDefinition", "EmailTemplate", "FilterSetting", "FilterSettingGroup", "Link", "MediaImage", "Menu", "TranslatableMetafieldProxy", "Metaobject", "Article", "OnlineStoreBlog", "Menu", "OnlineStorePage", "ThemeType", "AppEmbed", "JsonTemplate", "ThemeLocaleContent", "SectionGroup", "ThemeSettingsCategory", "ThemeSettingsDataSections", "PackingSlipTemplate", "Page", "PaymentGateway", "Product", "ProductOption", "ProductOptionValue", "SellingPlan", "SellingPlanGroup", "Shop", "ShopPolicy", "SmsTemplate"]) - - """ - Specifies the input fields for a translation. - """ - translations: [TranslationInput!]! - ): TranslationsRegisterPayload @requiredAccess(scope: "`write_translations` access scope.") - - """ - Deletes translations. - """ - translationsRemove( - """ - The list of translation locales. Only locales returned in `shopLocales` are valid. - """ - locales: [String!]! - - """ - The list of market IDs. - """ - marketIds: [ID!] @gidTypes(types: ["Market"]) - - """ - ID of the translatable resource for which translations are being deleted. - """ - resourceId: ID! @gidTypes(types: ["Article", "ArticleImage", "Blog", "Brand", "Collection", "CollectionImage", "CookieBanner", "MethodDefinition", "EmailTemplate", "FilterSetting", "FilterSettingGroup", "Link", "MediaImage", "Menu", "TranslatableMetafieldProxy", "Metaobject", "Article", "OnlineStoreBlog", "Menu", "OnlineStorePage", "ThemeType", "AppEmbed", "JsonTemplate", "ThemeLocaleContent", "SectionGroup", "ThemeSettingsCategory", "ThemeSettingsDataSections", "PackingSlipTemplate", "Page", "PaymentGateway", "Product", "ProductOption", "ProductOptionValue", "SellingPlan", "SellingPlanGroup", "Shop", "ShopPolicy", "SmsTemplate"]) - - """ - The list of translation keys. - """ - translationKeys: [String!]! - ): TranslationsRemovePayload @requiredAccess(scope: "`write_translations` access scope.") - - """ - Asynchronously delete [URL redirects](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) in bulk. - """ - urlRedirectBulkDeleteAll: UrlRedirectBulkDeleteAllPayload @requiredAccess(scope: "`write_online_store_navigation` access scope. Also: Requires an active user.") - - """ - 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`]( - https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect - ) object IDs to delete. - """ - ids: [ID!]! @gidTypes(types: ["UrlRedirect"]) - ): UrlRedirectBulkDeleteByIdsPayload @requiredAccess(scope: "`write_online_store_navigation` access scope. Also: Requires an active user.") - - """ - Asynchronously delete redirects in bulk. - """ - urlRedirectBulkDeleteBySavedSearch( - """ - The ID of the URL redirect saved search for filtering. - """ - savedSearchId: ID! @gidTypes(types: ["SavedSearch"]) - ): UrlRedirectBulkDeleteBySavedSearchPayload @requiredAccess(scope: "`write_online_store_navigation` access scope. Also: Requires an active user.") - - """ - Asynchronously delete redirects in bulk. - """ - urlRedirectBulkDeleteBySearch( - """ - Search query for filtering redirects on (both Redirect from and Redirect to fields). - """ - search: String! - ): UrlRedirectBulkDeleteBySearchPayload @requiredAccess(scope: "`write_online_store_navigation` access scope. Also: Requires an active user.") - - """ - 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 @requiredAccess(scope: "`write_online_store_navigation` access scope.") - - """ - Deletes a [`UrlRedirect`](https://shopify.dev/api/admin-graphql/latest/objects/UrlRedirect) object. - """ - urlRedirectDelete( - """ - The ID of the redirect to delete. - """ - id: ID! @gidTypes(types: ["UrlRedirect"]) - ): UrlRedirectDeletePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") - - """ - 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. - You can download [a sample URL redirect CSV file](https://help.shopify.com/csv/sample-redirect-template.csv). - """ - url: URL! - ): UrlRedirectImportCreatePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") - - """ - 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! @gidTypes(types: ["UrlRedirectImport"]) - ): UrlRedirectImportSubmitPayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") - - """ - Updates a URL redirect. - """ - urlRedirectUpdate( - """ - The ID of the URL redirect to update. - """ - id: ID! @gidTypes(types: ["UrlRedirect"]) - - """ - The input fields required to update the URL redirect. - """ - urlRedirect: UrlRedirectInput! - ): UrlRedirectUpdatePayload @requiredAccess(scope: "`write_online_store_navigation` access scope.") - - """ - Creates a validation. - """ - validationCreate( - """ - The input fields for a new validation. - """ - validation: ValidationCreateInput! - ): ValidationCreatePayload @requiredAccess(scope: "`write_validations` access scope.") - - """ - Deletes a validation. - """ - validationDelete( - """ - The ID representing the installed validation. - """ - id: ID! - ): ValidationDeletePayload @requiredAccess(scope: "`write_validations` access scope.") - - """ - Update a validation. - """ - validationUpdate( - """ - The ID representing the validation to update. - """ - id: ID! - - """ - The input fields to update a validation. - """ - validation: ValidationUpdateInput! - ): ValidationUpdatePayload @requiredAccess(scope: "`write_validations` access scope.") - - """ - 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 @requiredAccess(scope: "`write_pixels` access scope. Also: The app requires read_customer_events access scope and user access permission.") - - """ - Deletes the web pixel shop settings. - """ - webPixelDelete( - """ - The ID of the web pixel to delete. - """ - id: ID! @gidTypes(types: ["WebPixel"]) - ): WebPixelDeletePayload @requiredAccess(scope: "`write_pixels` access scope. Also: The app requires user access permission.") - - """ - 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! @gidTypes(types: ["WebPixel"]) - - """ - The web pixel settings in JSON format. - """ - webPixel: WebPixelInput! - ): WebPixelUpdatePayload @requiredAccess(scope: "`write_pixels` access scope. Also: The app requires read_customer_events access scope and user access permission.") - - """ - Creates a web presence. - """ - webPresenceCreate( - """ - The details of the web presence to be created. - """ - input: WebPresenceCreateInput! - ): WebPresenceCreatePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Deletes a web presence. - """ - webPresenceDelete( - """ - The ID of the web presence to delete. - """ - id: ID! @gidTypes(types: ["WebPresence"]) - ): WebPresenceDeletePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - Updates a web presence. - """ - webPresenceUpdate( - """ - The ID of the web presence to update. - """ - id: ID! @gidTypes(types: ["WebPresence"]) - - """ - The web presence properties to update. - """ - input: WebPresenceUpdateInput! - ): WebPresenceUpdatePayload @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - 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! @gidTypes(types: ["WebhookSubscription"]) - ): 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! @gidTypes(types: ["WebhookSubscription"]) - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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! -} - -""" -Information on shop's eligibility to sell NFTs. -""" -type NftSalesEligibilityResult @componentName(name: "apps") { - """ - Whether shop is eligible to gift token gated products e.g. NFTs. - """ - giftingApproved: Boolean! - - """ - The date and time when the shop can reappy for attestation. - """ - reapplyDate: DateTime - - """ - Whether shop is eligible to sell token gated products e.g. NFTs. - """ - sellApproved: Boolean! -} - -""" -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 @componentName(name: "platform") { - """ - A globally-unique ID. - """ - id: ID! -} - -""" -The valid values for the notification usage, specifying the intended notification environment usage for certain operations. -""" -enum NotificationUsage @componentName(name: "sales") { - """ - The notification environment is sms. - """ - SMS - - """ - The notification environment is web. - """ - WEB -} - -""" -The input fields for dimensions of an object. -""" -input ObjectDimensionsInput @componentName(name: "platform") { - """ - The height in `unit`s. - """ - height: Float! - - """ - The length in `unit`s. - """ - length: Float! - - """ - Unit of measurement for `length`, `width`, and `height`. - """ - unit: LengthUnit! - - """ - The width in `unit`s. - """ - width: Float! -} - -""" -A score that represents the shop's ability to deliver on time to a particular country. The score is a value between 0 and 1. -""" -type OnTimeDeliveryScore @requiredAccess(scope: "`read_merchant_approval_signals` access scope.") @componentName(name: "merchant_risk") { - """ - Destination country code. - """ - countryCode: CountryCode! - - """ - A score that represents the shop's ability to deliver on time to a particular - country. The score is a float value between 0 and 1. - """ - score: Float! -} - -""" -The shop's online store channel. -""" -type OnlineStore @componentName(name: "online_store") { - """ - Storefront password information. - """ - passwordProtection: OnlineStorePasswordProtection! -} - -""" -Storefront password information. -""" -type OnlineStorePasswordProtection @componentName(name: "online_store") { - """ - Whether the storefront password is enabled. - """ - enabled: Boolean! -} - -""" -Online Store preview URL of the object. -""" -interface OnlineStorePreviewable @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { - """ - The date and time when the theme was created. - """ - createdAt: DateTime! - - """ - The files in the theme. - """ - files( - """ - A cursor for use in pagination. - """ - after: String - - """ - 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 - ): 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 @gidTypes(types: ["Market"]) - ): [Translation!]! - - """ - The date and time when the theme was last updated. - """ - updatedAt: DateTime! -} - -""" -An auto-generated type for paginating through multiple OnlineStoreThemes. -""" -type OnlineStoreThemeConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { - """ - 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") = OnlineStoreThemeFileBodyBase64 | OnlineStoreThemeFileBodyText | OnlineStoreThemeFileBodyUrl - -""" -Represents the base64 encoded body of a theme file. -""" -type OnlineStoreThemeFileBodyBase64 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { - """ - The body of the theme file, base64 encoded. - """ - contentBase64: String! -} - -""" -The input fields for the theme file body. -""" -input OnlineStoreThemeFileBodyInput @componentName(name: "online_store") { - """ - 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 @componentName(name: "online_store") { - """ - The base64 encoded body of a theme file. - """ - BASE64 - - """ - The text body of the theme file. - """ - TEXT - - """ - The url of the body of a theme file. - """ - URL -} - -""" -Represents the body of a theme file. -""" -type OnlineStoreThemeFileBodyText @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { - """ - The body of the theme file. - """ - content: String! -} - -""" -Represents the url of the body of a theme file. -""" -type OnlineStoreThemeFileBodyUrl @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { - """ - The short lived url for the body of the theme file. - """ - url: URL! -} - -""" -An auto-generated type for paginating through multiple OnlineStoreThemeFiles. -""" -type OnlineStoreThemeFileConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { - """ - 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 @requiredAccess(scope: "`read_themes` access scope.") @componentName(name: "online_store") { - """ - 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 @componentName(name: "online_store") { - """ - Operation was malformed or invalid. - """ - BAD_REQUEST - - """ - Operation faced a conflict with the current state of the file. - """ - CONFLICT - - """ - Operation encountered an error. - """ - ERROR - - """ - Operation file could not be found. - """ - NOT_FOUND - - """ - Operation was successful. - """ - SUCCESS - - """ - Operation timed out. - """ - TIMEOUT - - """ - Operation could not be processed due to issues with input data. - """ - UNPROCESSABLE_ENTITY -} - -""" -The input fields for the file to create or update. -""" -input OnlineStoreThemeFilesUpsertFileInput @componentName(name: "online_store") { - """ - The body of the theme file. - """ - body: OnlineStoreThemeFileBodyInput! - - """ - The filename of the theme file. - """ - filename: String! -} - -""" -User errors for theme file operations. -""" -type OnlineStoreThemeFilesUserErrors implements DisplayableError @requiredAccess(scope: "The user needs write_themes and an exemption from Shopify to modify theme files.") @componentName(name: "online_store") { - """ - 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 @componentName(name: "platform") { - """ - Access denied. - """ - ACCESS_DENIED - - """ - There are files with the same filename. - """ - DUPLICATE_FILE_INPUT - - """ - Error. - """ - ERROR - - """ - The file is invalid. - """ - FILE_VALIDATION_ERROR - - """ - The input value should be less than or equal to the maximum value allowed. - """ - LESS_THAN_OR_EQUAL_TO - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND - - """ - There are theme files with conflicts. - """ - THEME_FILES_CONFLICT - - """ - This action is not available on your current plan. Please upgrade to access theme editing features. - """ - THEME_LIMITED_PLAN - - """ - Too many updates in a short period. Please try again later. - """ - THROTTLED -} - -""" -The input fields for Theme attributes to update. -""" -input OnlineStoreThemeInput @componentName(name: "online_store") { - """ - The new name of the theme. - """ - name: String -} - -""" -The input fields for the options and values of the combined listing. -""" -input OptionAndValueInput @componentName(name: "merchandising") { - """ - The linked metafield for the product's option. - """ - linkedMetafield: LinkedMetafieldInput - - """ - The name of the Product's Option. - """ - name: String! - - """ - The ID of the option to update. If not present, the option will be created. - """ - optionId: ID @gidTypes(types: ["ProductOption"]) - - """ - The ordered values of the Product's Option. - """ - values: [String!]! -} - -""" -The input fields for creating a product option. -""" -input OptionCreateInput @componentName(name: "merchandising") { - """ - Specifies the metafield the option is linked to. - """ - linkedMetafield: LinkedMetafieldCreateInput - - """ - Name of the option. - """ - name: String - - """ - Position of the option. - """ - position: Int - - """ - Values associated with the option. - """ - values: [OptionValueCreateInput!] -} - -""" -The input fields for reordering a product option and/or its values. -""" -input OptionReorderInput @componentName(name: "merchandising") { - """ - Specifies the product option to reorder by ID. - """ - id: ID @gidTypes(types: ["ProductOption"]) - - """ - 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 @componentName(name: "merchandising") { - """ - Specifies the product option to update. - """ - id: ID @gidTypes(types: ["ProductOption"]) - - """ - Specifies the metafield the option is linked to. - """ - linkedMetafield: LinkedMetafieldCreateInput - - """ - Name of the option. - """ - name: String - - """ - Position of the option. - """ - position: Int - - """ - Value associated with an option. - """ - values: [OptionValueSetInput!] -} - -""" -The input fields for updating a product option. -""" -input OptionUpdateInput @componentName(name: "merchandising") { - """ - Specifies the product option to update. - """ - id: ID! @gidTypes(types: ["ProductOption"]) - - """ - Specifies the metafield the option is linked to. - """ - linkedMetafield: LinkedMetafieldUpdateInput - - """ - Name of the option. - """ - name: String - - """ - Position of the option. - """ - position: Int -} - -""" -The input fields required to create a product option value. -""" -input OptionValueCreateInput @componentName(name: "merchandising") { - """ - Metafield value associated with an option. - """ - linkedMetafieldValue: String - - """ - Value associated with an option. - """ - name: String -} - -""" -The input fields for reordering a product option value. -""" -input OptionValueReorderInput @componentName(name: "merchandising") { - """ - Specifies the product option value by ID. - """ - id: ID @gidTypes(types: ["ProductOptionValue"]) - - """ - Specifies the product option value by name. - """ - name: String -} - -""" -The input fields for creating or updating a product option value. -""" -input OptionValueSetInput @componentName(name: "merchandising") { - """ - Specifies the product option value. - """ - id: ID @gidTypes(types: ["ProductOptionValue"]) - - """ - Value associated with an option. - """ - name: String -} - -""" -The input fields for updating a product option value. -""" -input OptionValueUpdateInput @componentName(name: "merchandising") { - """ - Specifies the product option value. - """ - id: ID! @gidTypes(types: ["ProductOptionValue"]) - - """ - Metafield value associated with an option. - """ - linkedMetafieldValue: String - - """ - Value associated with an option. - """ - name: 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 @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope or `read_quick_sale` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | happened_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): 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 token associated with the cart that was used to create the order. - """ - cartToken: String - - """ - 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 - - """ - The token associated with the checkout that was used to create the order. - Useful for correlating an order with the checkout it originated from, - including in web pixels and analytics workflows. - """ - checkoutToken: String - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! - - """ - The status of the refund(s) that can be shown to the merchant. Mostly used when a refund is in a deferred - state (for example, it was not yet sent to the payments provider). - """ - displayRefundStatus: OrderDisplayRefundStatus - - """ - 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 @protectedField(subject: "customer", content: "email") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): EventConnection! - - """ - A list of ExchangeV2s for the order. - """ - exchangeV2s( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | completed_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | include_mirrored_exchanges | boolean | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - If false, all fulfillment orders will be returned. If true, fulfillment - orders that are normally hidden from the merchant will be excluded. - For 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | assigned_location_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | status | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): 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: - `created_at:>='2024-05-07T08:37:00Z' updated_at:<'2025-05-07T08:37:00Z'`, - `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! - - """ - Information about the incoterm used for the order. - """ - incotermInformation: IncotermInformation - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): LineItemConnection! - - """ - List of localization extensions for the resource. - """ - localizationExtensions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The country codes of the extensions. - """ - countryCodes: [CountryCode!] - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The purpose of the extensions. - """ - purposes: [LocalizationExtensionPurpose!] - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The country codes of the extensions. - """ - countryCodes: [CountryCode!] - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The purpose of the extensions. - """ - purposes: [LocalizedFieldPurpose!] - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @protectedField(subject: "customer", content: "phone") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | status | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Whether results should contain removed shipping lines. - """ - includeRemovals: Boolean = false - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @protectedField(subject: "customer", content: "name") - - """ - 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 additional fees from the order to include in the refund. - """ - refundAdditionalFees: [RefundAdditionalFeeInput!] - - """ - The duties from the order to include in the refund. - """ - refundDuties: [RefundDutyInput!] - - """ - The line items from the order to include in the refund. - """ - refundLineItems: [RefundLineItemInput!] - - """ - Specifies which refund methods to allocate the suggested refund amount to. - """ - refundMethodAllocation: RefundMethodAllocation = ORIGINAL_PAYMENT_METHODS - - """ - Whether to refund the full shipping amount. - """ - refundShipping: Boolean - - """ - The amount to refund for shipping. Overrides the `refundShipping` argument. - """ - shippingAmount: Money - - """ - Whether the suggested refund should be created from all refundable line items on the order. - If `true`, the `refundLineItems` argument will be ignored. - """ - suggestFullRefund: Boolean = false - ): 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( - """ - Filter transactions by whether they are capturable. - """ - capturable: Boolean - - """ - Truncate the array result to this size. - """ - first: Int - - """ - Filter transactions by whether they can be resolved manually. - For 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { - """ - The amount of the order adjustment in shop and presentment currencies. - """ - amountSet: MoneyBag! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The order adjustment type. - """ - kind: OrderAdjustmentKind! @deprecated(reason: "`OrderAdjustmentKind` will be removed from unstable. Use `Refund.refundShippingLines` to query for refunded shipping costs.") - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - The discrepancy reason is customer. - """ - CUSTOMER - - """ - The discrepancy reason is damage. - """ - DAMAGE - - """ - The discrepancy reason is balance adjustment. - """ - FULL_RETURN_BALANCING_ADJUSTMENT - - """ - The discrepancy reason is pending refund. - """ - PENDING_REFUND_DISCREPANCY - - """ - The discrepancy reason is not one of the predefined reasons. - """ - REFUND_DISCREPANCY - - """ - The discrepancy reason is restocking. - """ - RESTOCK -} - -""" -An auto-generated type which holds one OrderAdjustment and a cursor during pagination. -""" -type OrderAdjustmentEdge @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - The discrepancy reason is customer. - """ - CUSTOMER - - """ - The discrepancy reason is damage. - """ - DAMAGE - - """ - The discrepancy reason is not one of the predefined reasons. - """ - OTHER - - """ - The discrepancy reason is restocking. - """ - RESTOCK -} - -""" -The different kinds of order adjustments. -This enum is deprecated and will be removed from unstable. -""" -enum OrderAdjustmentKind @componentName(name: "sales") { - """ - An order adjustment that represents discrepancy between calculated and actual refund. - """ - REFUND_DISCREPANCY @deprecated(reason: "`REFUND_DISCREPANCY` is deprecated.") - - """ - An order adjustment that represents shipping charges refunded to the customer. - """ - SHIPPING_REFUND @deprecated(reason: "`SHIPPING_REFUND` is deprecated. Use `Refund.refundShippingLines` instead.") -} - -""" -An agreement associated with an order placement. -""" -type OrderAgreement implements SalesAgreement @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - The application icon. - """ - icon: Image! - - """ - The application ID. - """ - id: ID! - - """ - The name of the application. - """ - name: String! -} - -""" -A job to determine the result of an order cancellation request. -""" -type OrderCancelJobResult implements JobResult & Node @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope. Also: The user requires `cancel_orders` access scope.") @componentName(name: "sales") { - """ - This indicates if the job is still queued or has been run. - """ - done: Boolean! - - """ - Returns any error that occurred during order cancellation. - """ - errors: [OrderCancelUserError!]! - - """ - A globally-unique ID that's returned when running an asynchronous mutation. - """ - id: ID! - - """ - The order associated with the cancellation request. - """ - order: Order - - """ - The current status of the order cancellation request. - """ - status: OrderCancelStatus! -} - -""" -Return type for `orderCancel` mutation. -""" -type OrderCancelPayload @componentName(name: "platform") { - """ - The job that asynchronously cancels the order. - """ - job: Job - - """ - The job that asynchronously cancels the order. - """ - jobResult: OrderCancelJobResult - - """ - 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 @componentName(name: "sales") { - """ - The customer wanted to cancel the order. - """ - CUSTOMER - - """ - Payment was declined. - """ - DECLINED - - """ - The order was fraudulent. - """ - FRAUD - - """ - There was insufficient inventory. - """ - INVENTORY - - """ - The order was canceled for an unlisted reason. - """ - OTHER - - """ - Staff made an error. - """ - STAFF -} - -""" -The input fields used to specify the refund method for an order cancellation. -""" -input OrderCancelRefundMethodInput @oneOf @componentName(name: "sales") { - """ - Whether to refund to the original payment method. - """ - originalPaymentMethodsRefund: Boolean - - """ - Whether to refund to store credit. - """ - storeCreditRefund: OrderCancelStoreCreditRefundInput -} - -""" -Represents the status of the order's cancellation request. -""" -enum OrderCancelStatus @componentName(name: "sales") { - """ - The order cancellation has failed. - """ - FAILED - - """ - The order cancellation has been initiated. - """ - STARTED - - """ - The order cancellation has been completed successfully. - """ - SUCCEEDED -} - -""" -The input fields used to refund to store credit. -""" -input OrderCancelStoreCreditRefundInput @componentName(name: "sales") { - """ - The expiration date of the store credit. - """ - expiresAt: DateTime -} - -""" -Errors related to order cancellation. -""" -type OrderCancelUserError implements DisplayableError @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND - - """ - 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 order is a B2B order. - """ - STORE_CREDIT_REFUND_B2B_NOT_SUPPORTED - - """ - 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 -} - -""" -Details about the order cancellation. -""" -type OrderCancellation @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "payment_processing") { - """ - 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 - - """ - The ID of the order to capture. - """ - id: ID! @gidTypes(types: ["Order"]) - - """ - The ID of the authorized transaction to capture. - """ - parentTransactionId: ID! @gidTypes(types: ["OrderTransaction"]) -} - -""" -Return type for `orderCapture` mutation. -""" -type OrderCapturePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - The ID of the order to close. - """ - id: ID! @gidTypes(types: ["Order"]) -} - -""" -Return type for `orderClose` mutation. -""" -type OrderClosePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 customer to associate to the order. - """ - id: ID @gidTypes(types: ["Customer"]) -} - -""" -The input fields for a note attribute for an order. -""" -input OrderCreateCustomAttributeInput @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - A free shipping discount code applied to the shipping on an order. - """ - freeShippingDiscountCode: OrderCreateFreeShippingDiscountCodeAttributesInput - - """ - A fixed amount discount code applied to the line items on the order. - """ - itemFixedDiscountCode: OrderCreateFixedDiscountCodeAttributesInput - - """ - A percentage discount code applied to the line items on the order. - """ - itemPercentageDiscountCode: OrderCreatePercentageDiscountCodeAttributesInput -} - -""" -The status of payments associated with the order. Can only be set when the order is created. -""" -enum OrderCreateFinancialStatus @componentName(name: "sales") { - """ - The payments have been authorized. - """ - AUTHORIZED - - """ - The payments have been expired. - """ - EXPIRED - - """ - The payments have been paid. - """ - PAID - - """ - The order has been partially paid. - """ - PARTIALLY_PAID - - """ - The payments have been partially refunded. - """ - PARTIALLY_REFUNDED - - """ - 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 refunded. - """ - REFUNDED - - """ - The payments have been voided. - """ - VOIDED -} - -""" -The input fields for a fixed amount discount code to apply to an order. -""" -input OrderCreateFixedDiscountCodeAttributesInput @componentName(name: "sales") { - """ - 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 discount code that was entered at checkout. - """ - code: String! -} - -""" -The input fields for a free shipping discount code to apply to an order. -""" -input OrderCreateFreeShippingDiscountCodeAttributesInput @componentName(name: "sales") { - """ - The discount code that was entered at checkout. - """ - code: String! -} - -""" -The input fields for a fulfillment to create for an order. -""" -input OrderCreateFulfillmentInput @componentName(name: "sales") { - """ - The ID of the location to fulfill the order from. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - Whether the customer should be notified of changes with the fulfillment. - """ - notifyCustomer: Boolean = false - - """ - The address at which the fulfillment occurred. - """ - originAddress: FulfillmentOriginAddressInput - - """ - The status of the shipment. - """ - shipmentStatus: FulfillmentEventStatus - - """ - 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 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 order's status in terms of fulfilled line items. -""" -enum OrderCreateFulfillmentStatus @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @gidTypes(types: ["Product"]) - - """ - 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 @gidTypes(types: ["ProductVariant"]) - - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope. Also: The user must have mark_orders_as_paid permission.") @componentName(name: "payment_processing") { - """ - 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 @componentName(name: "platform") { - """ - Amount exceeds the remaining balance. - """ - AMOUNT_EXCEEDS_BALANCE - - """ - Amount must be positive. - """ - AMOUNT_NOT_POSITIVE - - """ - The currency of the amount doesn't match the presentment currency of the order. - """ - CURRENCY_MISMATCH - - """ - Payment gateway is not found. - """ - GATEWAY_NOT_FOUND - - """ - Order is temporarily unavailable. - """ - ORDER_IS_TEMPORARILY_UNAVAILABLE - - """ - Order is not found. - """ - ORDER_NOT_FOUND - - """ - Indicates that the processedAt field is invalid, such as when it references a future date. - """ - PROCESSED_AT_INVALID -} - -""" -Return type for `orderCreateManualPayment` mutation. -""" -type OrderCreateManualPaymentPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 a shipping confirmation to the customer. - """ - sendFulfillmentReceipt: Boolean = false - - """ - Whether to send an order confirmation to the customer. - """ - sendReceipt: Boolean = false -} - -""" -The input fields for creating an order. -""" -input OrderCreateOrderInput @componentName(name: "sales") { - """ - 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 @gidTypes(types: ["CompanyLocation"]) - - """ - 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. - """ - customer: OrderCreateCustomerInput - - """ - The customer to associate to the order. - """ - customerId: ID @deprecated(reason: "This is replaced by the `customer` field in a future version.") @gidTypes(types: ["Customer"]) - - """ - 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 of the checkout. To use this field for sales attribution, you must - register the channels that your app is managing. You can register the channels - that your app is managing by completing [this Google Form](https://docs.google.com/forms/d/e/1FAIpQLScmVTZRQNjOJ7RD738mL1lGeFjqKVe_FM2tO9xsm21QEo5Ozg/viewform?usp=sf_link). - After you've submited your request, you need to wait for your request to be - processed by Shopify. You can find a list of your channels in the Partner - Dashboard, in your app's Marketplace extension. You can specify a handle as - the source_name value in your request. - """ - 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!] - - """ - 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 taxes are included in the order subtotal. - """ - taxesIncluded: Boolean = false - - """ - 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 @gidTypes(types: ["StaffMember"]) -} - -""" -The input fields for a transaction to create for an order. -""" -input OrderCreateOrderTransactionInput @componentName(name: "sales") { - """ - 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 @gidTypes(types: ["PointOfSaleDevice"]) - - """ - The name of the gateway the transaction was issued through. - """ - gateway: String - - """ - The ID of the gift card used for this transaction. - """ - giftCardId: ID @gidTypes(types: ["GiftCard"]) - - """ - The kind of transaction. - """ - kind: OrderTransactionKind = SALE - - """ - The ID of the location where the transaction was processed. - """ - locationId: ID @gidTypes(types: ["Location"]) - - """ - 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 @gidTypes(types: ["StaffMember"]) -} - -""" -Return type for `orderCreate` mutation. -""" -type OrderCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @gidTypes(types: ["Customer"]) - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Indicates that the line item fulfillment service handle is invalid. - """ - FULFILLMENT_SERVICE_INVALID - - """ - The input value is invalid. - """ - 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 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 - - """ - Indicates that the tax line rate is missing - only enforced for LineItem or ShippingLine-level tax lines. - """ - TAX_LINE_RATE_MISSING -} - -""" -Return type for `orderCustomerRemove` mutation. -""" -type OrderCustomerRemovePayload @componentName(name: "platform") { - """ - The order that had its customer removed. - """ - order: Order - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `orderCustomerSet` mutation. -""" -type OrderCustomerSetPayload @componentName(name: "platform") { - """ - The order that had a customer set. - """ - order: Order - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `orderDelete` mutation. -""" -type OrderDeletePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -Represents the order's current financial status. -""" -enum OrderDisplayFinancialStatus @componentName(name: "sales") { - """ - 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 **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 - - """ - Displayed as **Paid**. Payment was automatically or manually captured, or the order was marked as paid. - """ - PAID - - """ - 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 **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 **Refunded**. The full amount paid for an order was refunded to the customer. - """ - REFUNDED - - """ - Displayed as **Voided**. An unpaid (payment authorized but not captured) order was manually - canceled. - """ - VOIDED -} - -""" -Represents the order's aggregated fulfillment status for display purposes. -""" -enum OrderDisplayFulfillmentStatus @componentName(name: "fulfillments") { - """ - Displayed as **Fulfilled**. All the items in the order have been fulfilled. - """ - FULFILLED - - """ - 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 **Open**. None of the items in the order have been fulfilled. Replaced by "UNFULFILLED" status. - """ - OPEN - - """ - Displayed as **Partially fulfilled**. Some of the items in the order have been fulfilled. - """ - PARTIALLY_FULFILLED - - """ - 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 **Request declined**. Some of the items in the order have been - rejected for fulfillment by the fulfillment service. - """ - REQUEST_DECLINED - - """ - Displayed as **Restocked**. All the items in the order have been restocked. Replaced by the "UNFULFILLED" status. - """ - RESTOCKED - - """ - Displayed as **Scheduled**. All of the unfulfilled items in this order are scheduled for fulfillment at later time. - """ - SCHEDULED - - """ - Displayed as **Unfulfilled**. None of the items in the order have been fulfilled. - """ - UNFULFILLED -} - -""" -Represents the order's refund status for display purposes. -""" -enum OrderDisplayRefundStatus @componentName(name: "shopify_payments") { - """ - Displayed as **Refund pending**. Means that the refund has not yet been submitted to the payments processor. - """ - DEFERRED -} - -""" -A summary of the important details for a dispute on an order. -""" -type OrderDisputeSummary implements Node @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "shopify_payments") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - The price of the shipping line. - """ - price: MoneyInput! - - """ - The title of the shipping line. - """ - title: String! -} - -""" -Return type for `orderEditAddShippingLine` mutation. -""" -type OrderEditAddShippingLinePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -Return type for `orderEditAddVariant` mutation. -""" -type OrderEditAddVariantPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -Return type for `orderEditRemoveLineItemDiscount` mutation. -""" -type OrderEditRemoveLineItemDiscountPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -An edit session for an order. -""" -type OrderEditSession implements Node @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - The unique ID of the order edit session. - """ - id: ID! -} - -""" -Return type for `orderEditSetQuantity` mutation. -""" -type OrderEditSetQuantityPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -The input fields used to update a shipping line. -""" -input OrderEditUpdateShippingLineInput @componentName(name: "sales") { - """ - The price of the shipping line. - """ - price: MoneyInput - - """ - The title of the shipping line. - """ - title: String -} - -""" -Return type for `orderEditUpdateShippingLine` mutation. -""" -type OrderEditUpdateShippingLinePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -The input fields for identifying a order. -""" -input OrderIdentifierInput @oneOf @componentName(name: "sales") { - """ - The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the order. - """ - customId: UniqueMetafieldValueInput - - """ - The ID of the order. - """ - id: ID -} - -""" -The input fields for specifying the information to be updated on an order when using the orderUpdate mutation. -""" -input OrderInput @componentName(name: "sales") { - """ - A new list of custom attributes for the order. Overwrites the existing custom attributes. - """ - customAttributes: [AttributeInput!] - - """ - A new customer email address for the order. Overwrites the existing email address. - """ - email: String - - """ - The ID of the order to update. - """ - id: ID! @gidTypes(types: ["Order"]) - - """ - 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!] - - """ - A list of new metafields to add to the existing metafields for the order. - """ - metafields: [MetafieldInput!] - - """ - The new contents for the note associated with the order. Overwrites the existing note. - """ - note: String - - """ - A new customer phone number for the order. Overwrites the existing phone number. - """ - phone: String - - """ - The new purchase order number for the order. - """ - poNumber: String - - """ - The new shipping address for the order. Overwrites the existing shipping address. - """ - shippingAddress: MailingAddressInput - - """ - A new list of tags for the order. Overwrites the existing tags. - """ - tags: [String!] -} - -""" -Return type for `orderInvoiceSend` mutation. -""" -type OrderInvoiceSendPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - An error occurred while sending the invoice. - """ - ORDER_INVOICE_SEND_UNSUCCESSFUL -} - -""" -The input fields for specifying the order to mark as paid. -""" -input OrderMarkAsPaidInput @componentName(name: "payment_processing") { - """ - The ID of the order to mark as paid. - """ - id: ID! @gidTypes(types: ["Order"]) -} - -""" -Return type for `orderMarkAsPaid` mutation. -""" -type OrderMarkAsPaidPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - The ID of the order to open. - """ - id: ID! @gidTypes(types: ["Order"]) -} - -""" -Return type for `orderOpen` mutation. -""" -type OrderOpenPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payments") { - """ - 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 @componentName(name: "payments") { - """ - The payment is authorized. - """ - AUTHORIZED - - """ - The payment is captured. - """ - CAPTURED - - """ - There was an error initiating the payment. - """ - ERROR - - """ - The payment is awaiting processing. - """ - INITIATED - - """ - The payment partially succeeded. Some payment methods were charged but the primary payment method failed. - """ - PARTIAL_SUCCESS - - """ - The payment is pending with the provider, and may take a while. - """ - PENDING - - """ - The payment is still being processed. - """ - PROCESSING - - """ - The payment is in purchased status. - """ - PURCHASED - - """ - Redirect required. - """ - REDIRECT_REQUIRED - - """ - The payment is refunded. - """ - REFUNDED - - """ - Payment can be retried. - """ - RETRYABLE - - """ - The payment succeeded. - """ - SUCCESS - - """ - Status is unknown. - """ - UNKNOWN - - """ - The payment is voided. - """ - VOIDED -} - -""" -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 @componentName(name: "returns") { - """ - All return shipments from a return in this order were inspected. - """ - INSPECTION_COMPLETE - - """ - Some items in the order are being returned. - """ - IN_PROGRESS - - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { - """ - 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 @componentName(name: "reviews") { - """ - The list of facts used to determine the fraud assessment. - """ - facts: [OrderRiskAssessmentFactInput!]! - - """ - The ID of the order receiving the fraud assessment. - """ - orderId: ID! @gidTypes(types: ["Order"]) - - """ - The risk level of the fraud assessment. - """ - riskLevel: RiskAssessmentResult! -} - -""" -Return type for `orderRiskAssessmentCreate` mutation. -""" -type OrderRiskAssessmentCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND - - """ - The order is marked as fulfilled and can no longer accept new risk assessments. - """ - ORDER_ALREADY_FULFILLED - - """ - Too many facts were provided for the risk assessment. - """ - TOO_MANY_FACTS -} - -""" -The input fields to create a fact on an order risk assessment. -""" -input OrderRiskAssessmentFactInput @componentName(name: "reviews") { - """ - A description of the fact. Large values are truncated to 256 characters. - """ - description: String! - - """ - Indicates whether the fact is a negative, neutral or positive contributor with regards to risk. - """ - sentiment: RiskFactSentiment! -} - -""" -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 @componentName(name: "reviews") { - """ - There is a high level of risk that this order is fraudulent. - """ - HIGH - - """ - 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 -} - -""" -List of possible values for an OrderRiskRecommendation recommendation. -""" -enum OrderRiskRecommendationResult @componentName(name: "reviews") { - """ - Recommends fulfilling the order. - """ - ACCEPT - - """ - Recommends cancelling the order. - """ - CANCEL - - """ - Recommends investigating the order by contacting buyers. - """ - INVESTIGATE - - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") = 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - The phone number at the shipping address. - """ - phone: String @protectedField(subject: "customer", content: "phone") - - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - The number of items added. - """ - delta: Int! - - """ - The original line item. - """ - lineItem: LineItem! -} - -""" -A discount application removed during an order edit. -""" -type OrderStagedChangeRemoveDiscount @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - The removed discount application. - """ - discountApplication: DiscountApplication! -} - -""" -A shipping line removed during an order edit. -""" -type OrderStagedChangeRemoveShippingLine @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { - """ - 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( - """ - Crops the image according to the specified region. - """ - crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") - - """ - Image height in pixels between 1 and 2048. - """ - maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") - - """ - Image width in pixels between 1 and 2048. - """ - maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "payment_processing") { - """ - 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 @componentName(name: "payment_processing") { - """ - 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 transaction amount exceeds the maximum amount allowed. - """ - AMOUNT_TOO_LARGE - - """ - The transaction amount is below the minimum amount allowed. - """ - AMOUNT_TOO_SMALL - - """ - The 3D Secure authentication failed. - """ - AUTHENTICATION_FAILED - - """ - The transaction requires 3D Secure authentication but was attempted without authentication. - """ - AUTHENTICATION_REQUIRED - - """ - The authorization has expired. - """ - AUTHORIZATION_EXPIRED - - """ - The issuer declined the transaction, the customer should contact their issuer for more details. - """ - CALL_ISSUER - - """ - The transaction was cancelled. - """ - CANCELLED_PAYMENT - - """ - The card was declined. - """ - CARD_DECLINED - - """ - The transaction was declined due to suspected card testing activity. - """ - CARD_TESTING - - """ - There is an error in the gateway or merchant configuration. - """ - CONFIG_ERROR - - """ - The issuer declined the transaction without providing a specific reason. - """ - DO_NOT_HONOR - - """ - The card is expired. - """ - EXPIRED_CARD - - """ - The transaction was declined due to suspected fraudulent activity. - """ - FRAUD_SUSPECTED - - """ - There was an unknown error with processing the payment. - """ - GENERIC_ERROR - - """ - The address is incorrect. - """ - INCORRECT_ADDRESS - - """ - The card security code (CVC/CVV) is incorrect. - """ - INCORRECT_CVC - - """ - The card number is incorrect. - """ - INCORRECT_NUMBER - - """ - The PIN entered is incorrect. - """ - INCORRECT_PIN - - """ - The ZIP or postal code doesn't match the one on file. - """ - INCORRECT_ZIP - - """ - The payment instrument was declined. - """ - INSTRUMENT_DECLINED - - """ - There are insufficient funds available to complete the transaction. - """ - INSUFFICIENT_FUNDS - - """ - The amount is invalid. - """ - INVALID_AMOUNT - - """ - The payment method is not available in the customer's country. - """ - INVALID_COUNTRY - - """ - The currency isn't supported. - """ - INVALID_CURRENCY - - """ - The format of the CVC is incorrect. - """ - INVALID_CVC - - """ - The format of the expiry date is incorrect. - """ - INVALID_EXPIRY_DATE - - """ - The format of the card number is incorrect. - """ - INVALID_NUMBER - - """ - The payment method is invalid or not found. - """ - INVALID_PAYMENT_METHOD - - """ - This payment method doesn't support the requested transaction type. - """ - INVALID_PURCHASE_TYPE - - """ - The transaction couldn't be processed due to an issue with the merchant account. - """ - MERCHANT_ACCOUNT_ERROR - - """ - The transaction was blocked due to the merchant's custom payment risk rule. - """ - MERCHANT_RULE - - """ - The payment method is momentarily unavailable. - """ - PAYMENT_METHOD_UNAVAILABLE - - """ - The payment method isn't supported. - """ - PAYMENT_METHOD_UNSUPPORTED - - """ - The transaction couldn't be processed due to an unexpected error with the payment provider. - """ - PAYMENT_PROVIDER_ERROR - - """ - 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 was an error while processing the payment. - """ - PROCESSING_ERROR - - """ - The transaction retry attempt was declined. - """ - RETRY_DECLINED - - """ - A real card was used but the gateway was in test mode. - """ - TEST_MODE_LIVE_CARD - - """ - The payment instrument has exceeded the processing frequency limit. - """ - TRANSACTION_LIMIT_EXCEEDED - - """ - The gateway or merchant configuration doesn't support a feature, such as network tokenization. - """ - UNSUPPORTED_FEATURE -} - -""" -The input fields for the information needed to create an order transaction. -""" -input OrderTransactionInput @componentName(name: "payment_processing") { - """ - 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! @gidTypes(types: ["Order"]) - - """ - The ID of the optional parent transaction, for example the authorization of a capture. - """ - parentId: ID @gidTypes(types: ["OrderTransaction"]) -} - -""" -The different kinds of order transactions. -""" -enum OrderTransactionKind @componentName(name: "payment_processing") { - """ - An amount reserved against the cardholder's funding source. - Money does not change hands until the authorization is captured. - """ - AUTHORIZATION - - """ - A transfer of the money that was reserved by an authorization. - """ - CAPTURE - - """ - 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 partial or full return of captured funds to the cardholder. - A refund can happen only after a capture is processed. - """ - REFUND - - """ - An authorization and capture performed together in a single step. - """ - SALE - - """ - A suggested refund transaction that can be used to create a refund. - """ - SUGGESTED_REFUND - - """ - A cancelation of an authorization transaction. - """ - VOID -} - -""" -The different states that an `OrderTransaction` can have. -""" -enum OrderTransactionStatus @componentName(name: "payment_processing") { - """ - Awaiting a response. - """ - AWAITING_RESPONSE - - """ - There was an error while processing the transaction. - """ - ERROR - - """ - The transaction failed. - """ - FAILURE - - """ - The transaction is pending. - """ - PENDING - - """ - The transaction succeeded. - """ - SUCCESS - - """ - The transaction status is unknown. - """ - UNKNOWN -} - -""" -Return type for `orderUpdate` mutation. -""" -type OrderUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") @componentName(name: "online_store") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 @gidTypes(types: ["Market"]) - ): [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 @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - The text content of the page, complete with HTML markup. - """ - body: String - - """ - 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 - - """ - Whether or not the page should be visible. Defaults to `true` if no publish date is specified. - """ - isPublished: Boolean - - """ - The input fields to create or update a metafield. - """ - metafields: [MetafieldInput!] - - """ - 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 title of the page. - """ - title: String! -} - -""" -Return type for `pageCreate` mutation. -""" -type PageCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - The input value is invalid. - """ - INVALID - - """ - Can’t set isPublished to true and also set a future publish date. - """ - INVALID_PUBLISH_DATE - - """ - The metafield type is invalid. - """ - INVALID_TYPE - - """ - The value is invalid for the metafield type or for the definition options. - """ - INVALID_VALUE - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too big. - """ - TOO_BIG - - """ - The input value is too long. - """ - TOO_LONG -} - -""" -Return type for `pageDelete` mutation. -""" -type PageDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "online_store") { - """ - The text content of the page, complete with HTML markup. - """ - body: String - - """ - 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 - - """ - Whether or not the page should be visible. Defaults to `true` if no publish date is specified. - """ - isPublished: Boolean - - """ - The input fields to create or update a metafield. - """ - metafields: [MetafieldInput!] - - """ - The date and time (ISO 8601 format) when the page should become visible. - """ - publishDate: DateTime - - """ - 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 - - """ - 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 title of the page. - """ - title: String -} - -""" -Return type for `pageUpdate` mutation. -""" -type PageUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - The input value is invalid. - """ - INVALID - - """ - Can’t set isPublished to true and also set a future publish date. - """ - INVALID_PUBLISH_DATE - - """ - The metafield type is invalid. - """ - INVALID_TYPE - - """ - The value is invalid for the metafield type or for the definition options. - """ - INVALID_VALUE - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too big. - """ - TOO_BIG - - """ - The input value is too long. - """ - TOO_LONG -} - -""" -A payment customization. -""" -type PaymentCustomization implements HasMetafieldDefinitions & HasMetafields & Node @requiredAccess(scope: "`read_payment_customizations` access scope.") @componentName(name: "checkouts") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - The Shopify Function implementing the payment customization. - """ - shopifyFunction: ShopifyFunction! - - """ - The title of the payment customization. - """ - title: String! -} - -""" -Return type for `paymentCustomizationActivation` mutation. -""" -type PaymentCustomizationActivationPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @requiredAccess(scope: "`read_payment_customizations` access scope.") @componentName(name: "checkouts") { - """ - 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 @componentName(name: "platform") { - """ - 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 ID cannot be changed. - """ - FUNCTION_ID_CANNOT_BE_CHANGED - - """ - Function not found. - """ - FUNCTION_NOT_FOUND - - """ - Function is pending deletion. - """ - FUNCTION_PENDING_DELETION - - """ - The input value is invalid. - """ - INVALID - - """ - Could not create or update metafields. - """ - INVALID_METAFIELDS - - """ - Maximum payment customizations are already enabled. - """ - MAXIMUM_ACTIVE_PAYMENT_CUSTOMIZATIONS - - """ - 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 - - """ - Shop must be on a Shopify Plus plan to activate payment customizations from a custom app. - """ - PAYMENT_CUSTOMIZATION_FUNCTION_NOT_ELIGIBLE - - """ - Payment customization not found. - """ - PAYMENT_CUSTOMIZATION_NOT_FOUND - - """ - Required input field must be present. - """ - REQUIRED_INPUT_FIELD -} - -""" -The input fields to create and update a payment customization. -""" -input PaymentCustomizationInput @componentName(name: "checkouts") { - """ - The enabled status of the payment customization. - """ - enabled: Boolean - - """ - Function handle scoped to your app ID. - """ - functionHandle: String - - """ - The ID of the function providing the payment customization. - """ - functionId: String @deprecated(reason: "Use `functionHandle` instead.") - - """ - Additional metafields to associate to the payment customization. - """ - metafields: [MetafieldInput!] = [] - - """ - The title of the payment customization. - """ - title: String -} - -""" -Return type for `paymentCustomizationUpdate` mutation. -""" -type PaymentCustomizationUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") = CardPaymentDetails | LocalPaymentMethodsPaymentDetails | PaypalWalletPaymentDetails | ShopPayInstallmentsPaymentDetails - -""" -All possible instrument outputs for Payment Mandates. -""" -union PaymentInstrument @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") = 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 @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - 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 @requiredAccess(scope: "`read_payment_mandate` access scope or `read_customer_payment_methods` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - The unique ID of the payment mandate. Matches the corresponding - `CustomerPaymentMethod.id` token, so partners can identify which payment - method to use for a given mandate scope (e.g., SUBSCRIPTIONS). - """ - id: ID! - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "payments") { - """ - 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 @componentName(name: "payment_processing") { - AMERICAN_EXPRESS - - """ - The payment method for Bancontact payment. - """ - BANCONTACT - BITCOIN - BOGUS - - """ - The payment method for Cartes Bancaires payment. - """ - CARTES_BANCAIRES - DANKORT - DINERS_CLUB - DISCOVER - DOGECOIN - - """ - The payment method for eftpos_au payment. - """ - EFTPOS - - """ - The payment method for Elo payment. - """ - ELO - FORBRUGSFORENINGEN - - """ - The payment method for Interac payment. - """ - INTERAC - JCB - LITECOIN - MAESTRO - MASTERCARD - PAYPAL - - """ - The payment method for UnionPay payment. - """ - UNIONPAY - VISA -} - -""" -Return type for `paymentReminderSend` mutation. -""" -type PaymentReminderSendPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_payment_terms` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "payments") { - """ - 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 @componentName(name: "payments") { - """ - Specifies the date and time when the payment schedule is due. This field must be provided for fixed type payment terms. - """ - dueAt: DateTime - - """ - Specifies the date and time that the payment schedule was issued. This field must be provided for net type payment terms. - """ - issuedAt: DateTime -} - -""" -Settings related to payments. -""" -type PaymentSettings @componentName(name: "payment_processing") { - """ - Whether payments are automatically captured. - """ - autoCapture: Boolean! - - """ - 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 @requiredAccess(scope: "`read_payment_terms` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - Whether the payment can be made before the due date. When true, allows early - payment of the invoice. When false, the payment must be made according to the - payment schedule. - """ - canPayEarly: Boolean! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "payments") { - """ - Specifies the payment schedules for the payment terms. - """ - paymentSchedules: [PaymentScheduleInput!] - - """ - Specifies the payment terms template ID used to generate payment terms. - """ - paymentTermsTemplateId: ID! @gidTypes(types: ["PaymentTermsTemplate"]) -} - -""" -Return type for `paymentTermsCreate` mutation. -""" -type PaymentTermsCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - An error occurred while creating payment terms. - """ - PAYMENT_TERMS_CREATION_UNSUCCESSFUL -} - -""" -The input fields used to delete the payment terms. -""" -input PaymentTermsDeleteInput @componentName(name: "payments") { - """ - The ID of the payment terms being deleted. - """ - paymentTermsId: ID! @gidTypes(types: ["PaymentTerms"]) -} - -""" -Return type for `paymentTermsDelete` mutation. -""" -type PaymentTermsDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "payments") { - """ - Whether the payment can be made before the due date. - When true, allows early payment of the invoice. - When false, the payment must be made according to the payment schedule. - """ - canPayEarly: Boolean - - """ - Specifies the payment schedules for the payment terms. - """ - paymentSchedules: [PaymentScheduleInput!] - - """ - 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 @gidTypes(types: ["PaymentTermsTemplate"]) -} - -""" -Represents the payment terms template object. -""" -type PaymentTermsTemplate implements Node @componentName(name: "payments") { - """ - 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 @componentName(name: "payments") { - """ - 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 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 due on receipt. - """ - RECEIPT - - """ - The type of the payment terms or payment terms template is unknown. - """ - UNKNOWN -} - -""" -The input fields used to update the payment terms. -""" -input PaymentTermsUpdateInput @componentName(name: "payments") { - """ - The attributes used to update the payment terms. - """ - paymentTermsAttributes: PaymentTermsInput! - - """ - The ID of the payment terms being updated. - """ - paymentTermsId: ID! @gidTypes(types: ["PaymentTerms"]) -} - -""" -Return type for `paymentTermsUpdate` mutation. -""" -type PaymentTermsUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - An error occurred while updating payment terms. - """ - PAYMENT_TERMS_UPDATE_UNSUCCESSFUL -} - -""" -The set of valid sort keys for the Payout query. -""" -enum PayoutSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "shop_identity") { - """ - The status is disabled. - """ - DISABLED - - """ - The status is enabled. - """ - ENABLED - - """ - The status is pending. - """ - PENDING -} - -""" -PayPal Wallet payment details related to a transaction. -""" -type PaypalWalletPaymentDetails implements BasePaymentDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { - """ - The name of payment method used by the buyer. - """ - paymentMethodName: String -} - -""" -Performance aggregation level of RUM (Real User Monitoring) reports. -""" -enum PerformanceAggregationLevel @componentName(name: "online_store") { - """ - Aggregates metrics on a daily basis. - """ - DAILY - - """ - Aggregates metrics on a monthly basis. - """ - MONTHLY - - """ - Aggregates metrics for the rolling last 28 days. - """ - ROLLING28DAYS - - """ - Aggregates metrics on a weekly basis. - """ - WEEKLY -} - -""" -Specifies the device type for RUM (Real User Monitoring) reports. -""" -enum PerformanceDeviceType @componentName(name: "online_store") { - """ - Includes both desktop and mobile devices. - """ - ALL - - """ - Refers to desktop devices only. - """ - DESKTOP - - """ - Refers to mobile devices only. - """ - MOBILE -} - -""" -Represents an event that impacts storefront performance, measured via Real User Monitoring (RUM). -""" -type PerformanceEvent @requiredAccess(scope: "The user must have access to themes and reports.") @componentName(name: "online_store") { - """ - Additional metadata about the performance event. - """ - metadata: JSON! - - """ - The date and time when the performance event occurred. - """ - occurrence: DateTime! - - """ - Identifies the type of the performance event. - """ - type: PerformanceEventType! -} - -""" -Identifies the type of event that impacts the performance of the storefront. -""" -enum PerformanceEventType @componentName(name: "online_store") { - """ - Indicates that an app has been installed. - """ - APP_INSTALL - - """ - Indicates that an app has been uninstalled. - """ - APP_UNINSTALL - - """ - Indicates that a file in the live theme has been edited. - """ - THEME_LIVE_EDIT - - """ - Indicates that a new theme has been published. - """ - THEME_PUBLICATION -} - -""" -RUM (Real User Monitoring) performance metrics for a shop. -""" -type PerformanceMetrics @requiredAccess(scope: "The user must have access to themes and reports.") @componentName(name: "online_store") { - """ - Specifies the device type for which the RUM (Real User Monitoring) data is provided. - """ - deviceType: PerformanceDeviceType! - - """ - JSON blob with RUM (Real User Monitoring) data for a shop. - """ - metrics: [JSON!]! -} - -""" -A location for in-store pickup. -""" -type PickupInStoreLocation @requiredAccess(scope: "`read_draft_orders` access scope.") @componentName(name: "draft_orders") { - """ - 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! -} - -""" -Indicates whether the pixel can access events. The state may reflect event restrictions or modifications. -""" -enum PixelDataSharingState @componentName(name: "merchant_marketing") { - """ - The pixel can access all events. - """ - ALWAYS_ON - - """ - Optimization is enabled and the pixel can access all events. - """ - OPTIMIZED_ALLOW_ALL_EVENTS - - """ - Optimization is enabled and the pixel can access some events or partial event data. - """ - OPTIMIZED_ALLOW_LIMITED_EVENTS - - """ - Optimization is enabled and the pixel cannot access any events. - """ - OPTIMIZED_PAUSE_ALL_EVENTS - - """ - The pixel cannot access any events. - """ - PAUSED -} - -""" -Represents a mobile device that Shopify Point of Sale has been installed on. -""" -type PointOfSaleDevice implements Node @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope or `read_point_of_sale_devices` access scope.") @componentName(name: "retail") { - """ - The currently open payment session for this device. - """ - activePaymentSession: PointOfSaleDevicePaymentSession - - """ - The cash drawer that this device is currently assigned to. - """ - cashDrawer: CashDrawer - - """ - A globally-unique ID. - """ - id: ID! -} - -""" -Return type for `pointOfSaleDeviceAssignToCashDrawer` mutation. -""" -type PointOfSaleDeviceAssignToCashDrawerPayload @componentName(name: "platform") { - """ - The point of sale device. - """ - pointOfSaleDevice: PointOfSaleDevice - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [PointOfSaleDeviceAssignToCashDrawerUserError!]! -} - -""" -An error that occurs during the execution of `PointOfSaleDeviceAssignToCashDrawer`. -""" -type PointOfSaleDeviceAssignToCashDrawerUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: PointOfSaleDeviceAssignToCashDrawerUserErrorCode - - """ - 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 `PointOfSaleDeviceAssignToCashDrawerUserError`. -""" -enum PointOfSaleDeviceAssignToCashDrawerUserErrorCode @componentName(name: "platform") { - """ - The cash drawer was not found. - """ - CASH_DRAWER_NOT_FOUND - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The cash drawer and point of sale device must be in the same location. - """ - LOCATION_MISMATCH - - """ - The point of sale device was not found. - """ - POINT_OF_SALE_DEVICE_NOT_FOUND -} - -""" -An auto-generated type for paginating through multiple PointOfSaleDevices. -""" -type PointOfSaleDeviceConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [PointOfSaleDeviceEdge!]! - - """ - A list of nodes that are contained in PointOfSaleDeviceEdge. 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: [PointOfSaleDevice!]! - - """ - 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 PointOfSaleDevice and a cursor during pagination. -""" -type PointOfSaleDeviceEdge @componentName(name: "retail") { - """ - 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 PointOfSaleDeviceEdge. - """ - node: PointOfSaleDevice! -} - -""" -Tracks the payment activity for a point of sale device. -""" -type PointOfSaleDevicePaymentSession implements Node @requiredAccess(scope: "`read_cash_tracking` access scope.") @componentName(name: "retail") { - """ - The activities on the point of sale device payment session. - """ - cashActivities( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | type | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Filter activities by staff member. - """ - staffMemberId: ID @gidTypes(types: ["StaffMember"]) - ): CashActivityConnection! - - """ - The cash that was physically counted when the point of sale device payment session was closed. - """ - cashCountedAtClose: MoneyV2 - - """ - The cash that was physically counted when the point of sale device payment session was opened. - """ - cashCountedAtOpen: MoneyV2! - - """ - The cash drawer associated with the point of sale device payment session. The - session's sales andcash tracking activity will affect the cash drawer's balance. - """ - cashDrawer: CashDrawer! - - """ - The amount that the cash drawer balance was adjusted when the session was closed. - """ - closingAdjustment: MoneyV2 - - """ - The counted balance of the cash drawer when the point of sale device payment session was closed. - """ - closingBalance: MoneyV2 - - """ - The note associated with the point of sale device payment session closing. - """ - closingNote: String - - """ - The staff member who closed the point of sale device payment session. - """ - closingStaffMember: StaffMember - - """ - The time the point of sale device payment session was closed. - """ - closingTime: DateTime - - """ - The currency of the point of sale device payment session. - """ - currency: String! - - """ - The expected cash when the point of sale device payment session was closed. - """ - expectedCashAtClose: MoneyV2 - - """ - The expected balance of the cash drawer when the point of sale device payment session was opened. - """ - expectedCashAtOpen: MoneyV2! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The location associated with the point of sale device payment session. The - session's sales and cash tracking activity will contribute to the location's totals. - """ - location: Location! - - """ - The net cash sales for the point of sale device payment session. - """ - netCashSales: MoneyV2! - - """ - The net sales for the duration of this session. - """ - netSales: MoneyV2! - - """ - The note associated with the point of sale device payment session opening. - """ - openingNote: String - - """ - The staff member who opened the point of sale device payment session. - """ - openingStaffMember: StaffMember! - - """ - The time the point of sale device payment session was opened. - """ - openingTime: DateTime! - - """ - The point of sale device. - """ - pointOfSaleDevice: PointOfSaleDevice! - - """ - Whether the point of sale device payment session is open. Payments can't be - processed or refunded during a closed session, and the cash drawer balance - can't be adjusted or corrected. - """ - status: PointOfSaleDevicePaymentSessionStatus! - - """ - The total adjustments for the point of sale device payment session. - """ - totalAdjustments: MoneyV2! - - """ - The total cash refunds for the point of sale device payment session. - """ - totalCashRefunds: MoneyV2! - - """ - The total cash sales for the point of sale device payment session. - """ - totalCashSales: MoneyV2! - - """ - The total discrepancy for the point of sale device payment session. - """ - totalDiscrepancy: MoneyV2! - - """ - The sum of all refunds for the duration of this session. - """ - totalRefunds: MoneyV2! - - """ - The sum of all sales for the duration of this session. - """ - totalSales: MoneyV2! - - """ - Whether the point of sale device payment session totals are ready. - """ - totalsReady: Boolean! -} - -""" -Return type for `pointOfSaleDevicePaymentSessionAdjust` mutation. -""" -type PointOfSaleDevicePaymentSessionAdjustPayload @componentName(name: "platform") { - """ - The adjusted point of sale device payment session. - """ - pointOfSaleDevicePaymentSession: PointOfSaleDevicePaymentSession - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `pointOfSaleDevicePaymentSessionClose` mutation. -""" -type PointOfSaleDevicePaymentSessionClosePayload @componentName(name: "platform") { - """ - The closed point of sale device payment session. - """ - pointOfSaleDevicePaymentSession: PointOfSaleDevicePaymentSession - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [PointOfSaleDevicePaymentSessionCloseUserError!]! -} - -""" -An error that occurs during the execution of `PointOfSaleDevicePaymentSessionClose`. -""" -type PointOfSaleDevicePaymentSessionCloseUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: PointOfSaleDevicePaymentSessionCloseUserErrorCode - - """ - 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 `PointOfSaleDevicePaymentSessionCloseUserError`. -""" -enum PointOfSaleDevicePaymentSessionCloseUserErrorCode @componentName(name: "platform") { - """ - The currency code does not match the cash drawer currency. - """ - CURRENCY_MISMATCH - - """ - Point of sale device payment session not closed. - """ - FAILED_TO_CLOSE_SESSION - - """ - Point of sale device has no cash drawer associated with it. - """ - NO_CASH_DRAWER_ASSOCIATED - - """ - Point of sale device payment session not found. - """ - PAYMENT_SESSION_NOT_FOUND - - """ - Reason code not found. - """ - REASON_CODE_NOT_FOUND - - """ - Session is already closed. - """ - SESSION_ALREADY_CLOSED - - """ - Staff member not found. - """ - STAFF_MEMBER_NOT_FOUND - - """ - Time cannot be before session opening time. - """ - TIME_BEFORE_SESSION_OPEN -} - -""" -An auto-generated type for paginating through multiple PointOfSaleDevicePaymentSessions. -""" -type PointOfSaleDevicePaymentSessionConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [PointOfSaleDevicePaymentSessionEdge!]! - - """ - A list of nodes that are contained in PointOfSaleDevicePaymentSessionEdge. 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: [PointOfSaleDevicePaymentSession!]! - - """ - 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 `pointOfSaleDevicePaymentSessionCount` mutation. -""" -type PointOfSaleDevicePaymentSessionCountPayload @componentName(name: "platform") { - """ - The point of sale device payment session after recording the count. - """ - pointOfSaleDevicePaymentSession: PointOfSaleDevicePaymentSession - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [PointOfSaleDevicePaymentSessionCountUserError!]! -} - -""" -An error that occurs during the execution of `PointOfSaleDevicePaymentSessionCount`. -""" -type PointOfSaleDevicePaymentSessionCountUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: PointOfSaleDevicePaymentSessionCountUserErrorCode - - """ - 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 `PointOfSaleDevicePaymentSessionCountUserError`. -""" -enum PointOfSaleDevicePaymentSessionCountUserErrorCode @componentName(name: "platform") { - """ - The currency code does not match the cash drawer currency. - """ - CURRENCY_MISMATCH - - """ - Point of sale device payment session count not recorded. - """ - FAILED_TO_RECORD_COUNT - - """ - Point of sale device has no cash drawer associated with it. - """ - NO_CASH_DRAWER_ASSOCIATED - - """ - Point of sale device payment session not found. - """ - PAYMENT_SESSION_NOT_FOUND - - """ - Reason code not found. - """ - REASON_CODE_NOT_FOUND - - """ - Session is already closed. - """ - SESSION_ALREADY_CLOSED - - """ - Staff member not found. - """ - STAFF_MEMBER_NOT_FOUND - - """ - Time cannot be before session opening time. - """ - TIME_BEFORE_SESSION_OPEN -} - -""" -An auto-generated type which holds one PointOfSaleDevicePaymentSession and a cursor during pagination. -""" -type PointOfSaleDevicePaymentSessionEdge @componentName(name: "retail") { - """ - 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 PointOfSaleDevicePaymentSessionEdge. - """ - node: PointOfSaleDevicePaymentSession! -} - -""" -Return type for `pointOfSaleDevicePaymentSessionOpen` mutation. -""" -type PointOfSaleDevicePaymentSessionOpenPayload @componentName(name: "platform") { - """ - The created point of sale device payment session. - """ - pointOfSaleDevicePaymentSession: PointOfSaleDevicePaymentSession - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [PointOfSaleDevicePaymentSessionOpenUserError!]! -} - -""" -An error that occurs during the execution of `PointOfSaleDevicePaymentSessionOpen`. -""" -type PointOfSaleDevicePaymentSessionOpenUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: PointOfSaleDevicePaymentSessionOpenUserErrorCode - - """ - 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 `PointOfSaleDevicePaymentSessionOpenUserError`. -""" -enum PointOfSaleDevicePaymentSessionOpenUserErrorCode @componentName(name: "platform") { - """ - A point of sale device payment session is already open for this point of sale device. - """ - ALREADY_OPEN - - """ - The currency does not match the currency of the cash drawer. - """ - CURRENCY_MISMATCH - - """ - The point of sale device payment session was not created. - """ - NOT_SAVED - - """ - The point_of_sale_device has no cash drawer associated with it. - """ - NO_CASH_DRAWER_ASSOCIATED - - """ - The point of sale device was not found. - """ - POINT_OF_SALE_DEVICE_NOT_FOUND - - """ - The reason code was not found. - """ - REASON_CODE_NOT_FOUND - - """ - The staff member was not found. - """ - STAFF_MEMBER_NOT_FOUND -} - -""" -The set of valid sort keys for the PointOfSaleDevicePaymentSession query. -""" -enum PointOfSaleDevicePaymentSessionSortKeys @componentName(name: "platform") { - """ - Sort by the `closing_time` value. - """ - CLOSING_TIME - - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `opening_time` value. - """ - OPENING_TIME -} - -""" -The status of the point of sale device payment session. Payments can't be -processed or refunded during a closed session, and the cash drawer balance can't -be adjusted or corrected. -""" -enum PointOfSaleDevicePaymentSessionStatus @componentName(name: "retail") { - """ - The point of sale device payment session is closed. - """ - CLOSED - - """ - The point of sale device payment session is open. - """ - OPEN -} - -""" -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 @componentName(name: "fulfillments") { - """ - The ID of the fulfillment order. - """ - fulfillmentOrderId: ID! @gidTypes(types: ["FulfillmentOrder"]) -} - -""" -Return type for `previewInstall` mutation. -""" -type PreviewInstallPayload @componentName(name: "platform") @privatelyDocumented { - """ - The installed theme. - """ - newTheme: OnlineStoreTheme - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [PreviewInstallUserError!]! -} - -""" -An error that occurs during the execution of `PreviewInstall`. -""" -type PreviewInstallUserError implements DisplayableError @componentName(name: "platform") @privatelyDocumented { - """ - The error code. - """ - code: PreviewInstallUserErrorCode - - """ - 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 `PreviewInstallUserError`. -""" -enum PreviewInstallUserErrorCode @componentName(name: "platform") @privatelyDocumented { - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR -} - -""" -How to calculate the parent product variant's price while bulk updating variant relationships. -""" -enum PriceCalculationType @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have a permission to view catalogs.") @componentName(name: "merchandising") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The origin of this price, either fixed (defined on the price list) - or relative (calculated using an adjustment via a price list parent configuration). - """ - originType: PriceListPriceOriginType - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | product_id | id | - | variant_id | id | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): PriceListPriceConnection! - - """ - A list of quantity rules associated with the price list, ordered by product variants. - """ - quantityRules( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Whether the quantity rule is fixed (defined on the price list) or relative - (the default quantity rule for the shop). - """ - originType: QuantityRuleOriginType - - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The type of price adjustment, such as percentage increase or decrease. - """ - type: PriceListAdjustmentType! - - """ - The value of the price adjustment as specified by the `type`. - """ - value: Float! -} - -""" -Represents the settings of price list adjustments. -""" -type PriceListAdjustmentSettings @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Determines how adjustments are applied to compare at prices. - """ - compareAtMode: PriceListCompareAtMode! = ADJUSTED -} - -""" -Represents a percentage price adjustment type. -""" -enum PriceListAdjustmentType @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @gidTypes(types: ["Catalog"]) - - """ - Three letter currency code for fixed prices associated with this price list. - """ - currency: CurrencyCode! - - """ - The unique name of the price list, used as a human-readable identifier. - """ - name: String! - - """ - Relative adjustments to other prices. - """ - parent: PriceListParentCreateInput! -} - -""" -Return type for `priceListCreate` mutation. -""" -type PriceListCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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!]! -} - -""" -Return type for `priceListFixedPricesByProductBulkUpdate` mutation. -""" -type PriceListFixedPricesByProductBulkUpdatePayload @componentName(name: "platform") { - """ - The asynchronous job that will perform the bulk update. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [PriceListFixedPricesByProductBulkUpdateUserError!]! -} - -""" -Error codes for failed price list fixed prices by product bulk update operations. -""" -type PriceListFixedPricesByProductBulkUpdateUserError implements DisplayableError @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - Duplicate ID in input. - """ - DUPLICATE_ID_IN_INPUT - - """ - IDs must be mutually exclusive across add or delete operations. - """ - ID_MUST_BE_MUTUALLY_EXCLUSIVE - - """ - 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 - - """ - No update operations specified. - """ - NO_UPDATE_OPERATIONS_SPECIFIED - - """ - The currency specified does not match the price list's currency. - """ - PRICES_TO_ADD_CURRENCY_MISMATCH - - """ - Exceeded the 10000 prices to add limit. - """ - PRICE_LIMIT_EXCEEDED - - """ - Price list does not exist. - """ - PRICE_LIST_DOES_NOT_EXIST - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST -} - -""" -Return type for `priceListFixedPricesByProductUpdate` mutation. -""" -type PriceListFixedPricesByProductUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The compare-at price of the product variant on this price list. - """ - compareAtPrice: MoneyInput - - """ - The price of the product variant on this price list. - """ - price: MoneyInput! - - """ - The product variant ID associated with the price list price. - """ - variantId: ID! @gidTypes(types: ["ProductVariant"]) -} - -""" -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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - 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 - - """ - The specified currency doesn't match the price list's currency. - """ - PRICE_LIST_CURRENCY_MISMATCH - - """ - The price list doesn't exist. - """ - PRICE_LIST_NOT_FOUND - - """ - Only fixed prices can be deleted. - """ - PRICE_NOT_FIXED - - """ - A fixed price for the specified product variant doesn't exist. - """ - VARIANT_NOT_FOUND -} - -""" -The input fields representing the price for all variants of a product. -""" -input PriceListProductPriceInput @componentName(name: "merchandising") { - """ - Specifies the compare-at price and currency to apply to the product's variants on the price list. - """ - compareAtPrice: MoneyInput - - """ - Specifies the price and currency to apply to the product's variants on the price list. - """ - price: MoneyInput! - - """ - Specifies the ID of the product to update its variants for. - """ - productId: ID! @gidTypes(types: ["Product"]) -} - -""" -The set of valid sort keys for the PriceList query. -""" -enum PriceListSortKeys @componentName(name: "platform") { - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `name` value. - """ - NAME -} - -""" -The input fields used to update a price list. -""" -input PriceListUpdateInput @componentName(name: "merchandising") { - """ - The ID of the catalog to associate with this price list. - """ - catalogId: ID @gidTypes(types: ["Catalog"]) - - """ - The three-letter currency code for fixed prices associated with this price list. - """ - currency: CurrencyCode - - """ - The unique name of the price list, used as a human-readable identifier. - """ - name: String - - """ - Relative adjustments to other prices. - """ - parent: PriceListParentUpdateInput -} - -""" -Return type for `priceListUpdate` mutation. -""" -type PriceListUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - 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 - - """ - Quantity rules can be associated only with company location catalogs or catalogs associated with compatible markets. - """ - CATALOG_CONTEXT_DOES_NOT_SUPPORT_QUANTITY_RULES - - """ - 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 - - """ - The company location could not be found. - """ - COMPANY_LOCATION_NOT_FOUND - - """ - Only one context rule option may be specified. - """ - CONTEXT_RULE_LIMIT_ONE_OPTION - - """ - A country catalog cannot be assigned to a price list. - """ - COUNTRY_PRICE_LIST_ASSIGNMENT - - """ - A price list’s currency must be the market currency. - """ - CURRENCY_MARKET_MISMATCH - - """ - The price list currency is not supported by the shop's payment gateway. - """ - CURRENCY_NOT_SUPPORTED - - """ - Something went wrong when trying to save the price list. Please try again. - """ - GENERIC_ERROR - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - The adjustment value must not be greater than 1000% for `type` `PERCENTAGE_INCREASE`. - """ - INVALID_ADJUSTMENT_MAX_VALUE - - """ - The adjustment value must not be greater than 100% for `type` `PERCENTAGE_DECREASE`. - """ - INVALID_ADJUSTMENT_MIN_VALUE - - """ - 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 price list is currently being modified. Please try again later. - """ - PRICE_LIST_LOCKED - - """ - Cannot create price list for a primary market. - """ - PRICE_LIST_NOT_ALLOWED_FOR_PRIMARY_MARKET - - """ - The specified price list doesn't exist. - """ - PRICE_LIST_NOT_FOUND - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG -} - -""" -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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") @protectedObject(subject: "customer") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | times_used | integer | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): PriceRuleDiscountCodeConnection! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 @componentName(name: "pricing") { - """ - The value will be applied once across the entitled items. - """ - ACROSS - - """ - The value will be applied to each of the entitled items. - """ - EACH -} - -""" -A selection of customers for whom the price rule applies. -""" -type PriceRuleCustomerSelection @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - List of customers to whom the price rule applies. - """ - customers( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | accepts_marketing | boolean | Filter by whether a customer has consented - to receive marketing material. | | | - `accepts_marketing:true` | - | 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` | - | 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'` | - | 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:*` | - | first_name | string | Filter by the customer's first name. | | | - `first_name:Jane` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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'` | - | last_name | string | Filter by the customer's last name. | | | - `last_name:Reeves` | - | 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'` | - | orders_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` | - | 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:*` | - | 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` | - | 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'` | - | 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'` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - The price rule supports bulk discounts. - """ - BULK - - """ - 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 discounts that require a quantity. - """ - QUANTITY_DISCOUNTS - - """ - The price rule targets specific customers. - """ - SPECIFIC_CUSTOMERS -} - -""" -The value of a fixed amount price rule. -""" -type PriceRuleFixedAmountValue @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - The collections to which the price rule applies. - """ - collections( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CollectionConnection! - - """ - The product variants to which the price rule applies. - """ - productVariants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductVariantConnection! - - """ - The products to which the price rule applies. - """ - products( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - The collections required for the price rule to be applicable. - """ - collections( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CollectionConnection! - - """ - The product variants required for the price rule to be applicable. - """ - productVariants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductVariantConnection! - - """ - The products required for the price rule to be applicable. - """ - products( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductConnection! -} - -""" -A money range within which the price rule is applicable. -""" -type PriceRuleMoneyRange @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - The URL lands on a collection page. - """ - COLLECTION - - """ - The URL lands on a home page. - """ - HOME - - """ - The URL lands on a product page. - """ - PRODUCT -} - -""" -The shipping lines to which the price rule applies to. -""" -type PriceRuleShippingLineEntitlements @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") { - """ - The price rule supports bulk discounts. - """ - BULK - - """ - 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 discounts that require a quantity. - """ - QUANTITY_DISCOUNTS - - """ - The price rule targets specific customers. - """ - SPECIFIC_CUSTOMERS -} - -""" -A time period during which a price rule is applicable. -""" -type PriceRuleValidityPeriod @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") { - """ - 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 @requiredAccess(scope: "`read_price_rules` access scope.") @componentName(name: "pricing") = 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 @componentName(name: "pricing") { - """ - 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 @componentName(name: "pricing") = MoneyV2 | PricingPercentageValue - -""" -A country code from the `ISO 3166` standard. e.g. `CA` for Canada. -""" -enum PrivacyCountryCode @componentName(name: "privacy") { - """ - 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 `AN`. - """ - AN - - """ - 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 `XX`. - """ - XX - - """ - 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 -} - -""" -Return type for `privacyFeaturesDisable` mutation. -""" -type PrivacyFeaturesDisablePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Failed to disable privacy features. - """ - FAILED -} - -""" -The input fields for a shop's privacy settings. -""" -enum PrivacyFeaturesEnum @componentName(name: "privacy") { - """ - 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 @requiredAccess(scope: "`read_privacy_settings` access scope.") @componentName(name: "privacy") { - """ - Whether the policy is auto managed. - """ - autoManaged: Boolean! - - """ - Policy template supported locales. - """ - supportedLocales: [String!]! -} - -""" -A shop's privacy settings. -""" -type PrivacySettings @requiredAccess(scope: "`read_privacy_settings` access scope.") @componentName(name: "privacy") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | collection_type | string | | - `custom`
- `smart` | - | handle | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | product_id | id | Filter by collections containing a product by its ID. | - | 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` | - | 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` | - | published_at | time | Filter by the date and time when the collection was published to the Online Store. | - | 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` | - | title | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 gift card settings for this product. Only available on gift card products. - """ - giftCardSettings: GiftCardProductSettings - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - Crops the image according to the specified region. - """ - crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Image height in pixels between 1 and 2048. - """ - maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") - - """ - Image width in pixels between 1 and 2048. - """ - maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead.") - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - 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.") - - """ - 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! @gidTypes(types: ["Collection"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | media_type | string | | - `IMAGE`
- `VIDEO`
- `MODEL_3D`
- `EXTERNAL_VIDEO` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-1234` | - | 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` | - | 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` | - | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) - field. | | | - `collection_id:108179161409` | - | 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` | - | 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'` | - | 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` | - | error_feedback | string | Filter by products with publishing errors. | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | 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` | - | has_only_composites | boolean | Filter by products that have only - composite variants. | | | - `has_only_composites:true` | - | 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` | - | has_variant_with_components | boolean | Filter by products that have - variants with associated components. | | | - - `has_variant_with_components:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_total | integer | Filter by inventory count. | | | - - `inventory_total:0`
- `inventory_total:>150`
- - `inventory_total:>=200` | - | 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` | - | 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"` | - | out_of_stock_somewhere | boolean | Filter by products that are out of - stock in at least one location. | | | - `out_of_stock_somewhere:true` | - | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) - field. | | | - `price:100.57` | - | 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` | - | 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` | - | product_type | string | Filter by a comma-separated list of [product - types](https://help.shopify.com/manual/products/details/product-type). | | | - - `product_type:snowboard` | - | publication_ids | string | Filter by a comma-separated list of publication - IDs that are associated with the product. | | | - - `publication_ids:184111530305,184111694145` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | `active` | - - `status:active,draft` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) - field. | | | - `title:The Minimal Snowboard` | - | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) - enabled. | | | - `tracks_inventory:true` | - | 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'` | - | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) - field. | | | - `variant_id:45779434701121` | - | 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'` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductConnection! - - """ - A list of the channels where the product is published. - """ - productPublications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - A list of the channels where the product is published. - """ - publications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Return only the publications that are published. If false, then return all publications. - """ - onlyPublished: Boolean = true - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductPublicationConnection! @deprecated(reason: "Use `resourcePublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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! @requiredAccess(scope: "`read_publications` access scope.") - - """ - Whether the resource is published to a specific channel. - """ - publishedOnChannel( - """ - The ID of the channel to check. - """ - channelId: ID! @gidTypes(types: ["Channel"]) - ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - 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! @gidTypes(types: ["Publication"]) - ): 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.") @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - The list of resources that are published to a - [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). - """ - resourcePublications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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). - """ - resourcePublicationsV2( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationV2Connection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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! @gidTypes(types: ["CalculatedOrder", "OrderEditSession"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @gidTypes(types: ["Market"]) - ): [Translation!]! - - """ - The list of channels that the resource is not published to. - """ - unpublishedChannels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) - that the resource isn't published to. - """ - unpublishedPublications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The product that's related as a component. - """ - componentProduct: Product! - - """ - The list of products' variants that are components. - """ - componentVariants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The options to use in the component product, and the values for the option. - """ - optionSelections: [ProductBundleComponentOptionSelectionInput!]! - - """ - The ID of the component product to add to the bundle product. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - The quantity of the component product to add to the bundle product. This field can't exceed 2000. - """ - quantity: Int - - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The ID of the option present on the component product. - """ - componentOptionId: ID! @gidTypes(types: ["ProductOption"]) - - """ - 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 @componentName(name: "merchandising") { - """ - 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 is selected as sellable in the bundle. - """ - SELECTED - - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - Selection status of the option. - """ - selectionStatus: ProductBundleComponentOptionSelectionStatus! - - """ - The value of the option. - """ - value: String! -} - -""" -A quantity option related to a bundle. -""" -type ProductBundleComponentQuantityOption @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @gidTypes(types: ["ProductOption"]) - - """ - The value to use for the component option (e.g., 'Small', 'Red'). - """ - componentOptionValue: String! -} - -""" -The input fields for a consolidated option on a componentized product. -""" -input ProductBundleConsolidatedOptionInput @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The component mappings that define how this option value maps to specific component options. - """ - components: [ProductBundleConsolidatedOptionComponentInput!]! - - """ - The value for this consolidated option selection (e.g., 'Small', 'Medium', 'Large'). - """ - optionValue: String! -} - -""" -The input fields for creating a componentized product. -""" -input ProductBundleCreateInput @componentName(name: "merchandising") { - """ - The component products to bundle with the bundle product. - """ - components: [ProductBundleComponentInput!]! - - """ - The consolidated options of the componentized product to create, if provided. - """ - consolidatedOptions: [ProductBundleConsolidatedOptionInput!] - - """ - The title of the product to create. - """ - title: String! -} - -""" -Return type for `productBundleCreate` mutation. -""" -type ProductBundleCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - Something went wrong, please try again. - """ - GENERIC_ERROR - - """ - Input is not valid. - """ - INVALID_INPUT - - """ - Error processing request in the background job. - """ - JOB_ERROR - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST -} - -""" -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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The components to update existing ones. If none provided, no changes occur. - Note: This replaces, not adds to, current components. - """ - components: [ProductBundleComponentInput!] - - """ - The consolidated options of the componentized product to update, if provided. - """ - consolidatedOptions: [ProductBundleConsolidatedOptionInput!] - - """ - The ID of the componentized product to update. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - The title to rename the componentized product to, if provided. - """ - title: String -} - -""" -Return type for `productBundleUpdate` mutation. -""" -type ProductBundleUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The product taxonomy node associated with the product category. - """ - productTaxonomyNode: ProductTaxonomyNode -} - -""" -Return type for `productChangeStatus` mutation. -""" -type ProductChangeStatusPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Cannot be unarchived because combined listings are not compatible with this store. - """ - COMBINED_LISTINGS_NOT_COMPATIBLE_WITH_SHOP - - """ - Product could not be found. - """ - PRODUCT_NOT_FOUND -} - -""" -The input fields to claim ownership for Product features such as Bundles. -""" -input ProductClaimOwnershipInput @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The highest variant's compare-at price. - """ - maxVariantCompareAtPrice: MoneyV2! - - """ - The lowest variant's compare-at price. - """ - minVariantCompareAtPrice: MoneyV2! -} - -""" -The product component information. -""" -type ProductComponentType @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The list of products' variants that are components. - """ - componentVariants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 - - """ - 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 - - """ - A list of collection IDs to associate with the product. - """ - collectionsToJoin: [ID!] @gidTypes(types: ["Collection"]) - - """ - The role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). - """ - combinedListingRole: CombinedListingsRole - - """ - The description of the product, with HTML tags. - For example, the description might include bold `` and italic `` text. - """ - descriptionHtml: String - - """ - Whether the product is a gift card. - """ - giftCard: Boolean - - """ - 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 - - """ - 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 [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 type](https://help.shopify.com/manual/products/details/product-type) - that merchants define. - """ - productType: String - - """ - 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 [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) - that are associated with a product. - """ - seo: SEOInput - - """ - The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), - which controls visibility across all sales channels. - """ - status: ProductStatus - - """ - 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 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 -} - -""" -Return type for `productCreateMedia` mutation. -""" -type ProductCreateMediaPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The ID of the product. - """ - id: ID! @gidTypes(types: ["Product"]) -} - -""" -Return type for `productDeleteMedia` mutation. -""" -type ProductDeleteMediaPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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!]! -} - -""" -Controls which product discounts can apply together on the same cart line. By -default, only one product discount applies per line. Available only on a Shopify -Plus plan. - -For discounts to apply together, they must match tags in both directions. Each -discount has two tag sets: the tags that identify the discount, and the tags that -it agrees to apply with. Use the `tags` field on the discount input to set the -discount's own tags. Use this input object to set the tags that the discount can -apply with. Two discounts apply together only if each one allows at least one tag -that the other is tagged with. Any number of product discounts can apply to the -same line if this two-way match holds for every pair in the group. - -Example: Discount A is tagged with `LOYALTY` and allows `SEASONAL`, and Discount B -is tagged with `SEASONAL` and allows `LOYALTY`. They apply together. To add a -third discount, it must meet the same mutual-match rule with both A and B. -""" -input ProductDiscountsWithTagsOnSameCartLineInput @componentName(name: "pricing") { - """ - The tags to add to this discount's combination list. This field doesn't add - tags to the discount itself. To change the tags on the discount, use the - discount input's `tags` field or the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - and [`tagsRemove`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsremove) - mutations. - - If another product discount has a matching tag and also allows at least one - tag on this discount, then both discounts can apply to the same cart line. - """ - add: [String!] - - """ - The tags to remove from this discount's combination list. This field doesn't - remove tags from the discount itself. To change the tags on the discount, use - the discount input's `tags` field or the - [`tagsAdd`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsadd) - and [`tagsRemove`](https://shopify.dev/api/admin-graphql/latest/mutations/tagsremove) - mutations. - - If this discount and another product discount still match tags in both - directions after the removal, then both discounts can still apply to the same - cart line. - """ - remove: [String!] -} - -""" -Represents a product duplication job. -""" -type ProductDuplicateJob @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_product_listings` access scope.") @componentName(name: "channels") { - """ - The ID of the channel to associate with the product feed. - """ - channelId: ID! - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID - - """ - The input value is already taken. - """ - TAKEN -} - -""" -Return type for `productFeedDelete` mutation. -""" -type ProductFeedDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -An auto-generated type which holds one ProductFeed and a cursor during pagination. -""" -type ProductFeedEdge @componentName(name: "channels") { - """ - 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 @componentName(name: "channels") { - """ - The ID of the channel to associate with the product feed. - """ - channelId: ID @gidTypes(types: ["Channel", "Publication"]) - - """ - The country of the product feed. - """ - country: CountryCode! - - """ - The language of the product feed. - """ - language: LanguageCode! -} - -""" -The valid values for the status of product feed. -""" -enum ProductFeedStatus @componentName(name: "channels") { - """ - The product feed is active. - """ - ACTIVE - - """ - The product feed is inactive. - """ - INACTIVE -} - -""" -Return type for `productFullSync` mutation. -""" -type ProductFullSyncPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -The input fields for identifying a product. -""" -input ProductIdentifierInput @oneOf @componentName(name: "merchandising") { - """ - 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 ID of the product. - """ - id: ID -} - -""" -The set of valid sort keys for the ProductImage query. -""" -enum ProductImageSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 - - """ - 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 - - """ - A list of collection IDs to associate with the product. - """ - collectionsToJoin: [ID!] @gidTypes(types: ["Collection"]) - - """ - The collection IDs to disassociate from the product. - """ - collectionsToLeave: [ID!] @gidTypes(types: ["Collection"]) - - """ - 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 description of the product, with HTML tags. - For example, the description might include bold `` and italic `` text. - """ - descriptionHtml: String - - """ - Whether the product is a gift card. - """ - giftCard: Boolean - - """ - 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 - - """ - 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 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 @gidTypes(types: ["Product"]) - - """ - 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") - - """ - The [product type](https://help.shopify.com/manual/products/details/product-type) - that merchants define. - """ - productType: String - - """ - 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") - - """ - 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 - - """ - 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 [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) - that are associated with a product. - """ - seo: SEOInput - - """ - The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), - which controls visibility across all sales channels. - """ - status: ProductStatus - - """ - 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 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 -} - -""" -Return type for `productJoinSellingPlanGroups` mutation. -""" -type ProductJoinSellingPlanGroupsPayload @componentName(name: "platform") { - """ - The product object. - """ - product: Product - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SellingPlanGroupUserError!]! -} - -""" -Return type for `productLeaveSellingPlanGroups` mutation. -""" -type ProductLeaveSellingPlanGroupsPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Operation is currently running. - """ - ACTIVE - - """ - Operation is complete. - """ - COMPLETE - - """ - Operation has been created. - """ - CREATED -} - -""" -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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @gidTypes(types: ["Market"]) - ): [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 @componentName(name: "merchandising") { - """ - 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 - - """ - 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 -} - -""" -The set of strategies available for use on the `productOptionDelete` mutation. -""" -enum ProductOptionDeleteStrategy @componentName(name: "merchandising") { - """ - The default strategy, the specified `Option` may only have one corresponding `value`. - """ - DEFAULT - - """ - An `Option` with multiple `values` can be deleted, but the operation only succeeds if no product variants get deleted. - """ - NON_DESTRUCTIVE - - """ - An `Option` with multiple `values` can be deleted. Remaining variants will be - deleted, highest `position` first, in the event of duplicates being detected. - """ - POSITION -} - -""" -Return type for `productOptionUpdate` mutation. -""" -type ProductOptionUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - An option cannot have both metafield linked and nonlinked option values. - """ - CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES - - """ - The number of variants will be above the limit after this operation. - """ - CANNOT_CREATE_VARIANTS_ABOVE_LIMIT - - """ - Deleting all option values of an option is not allowed. - """ - CANNOT_DELETE_ALL_OPTION_VALUES_IN_OPTION - - """ - Cannot update the option because it would result in deleting variants, and you don't have the required permissions. - """ - CANNOT_DELETE_VARIANT_WITHOUT_PERMISSION - - """ - An option cannot be left only with option values that are not linked to any variant. - """ - CANNOT_LEAVE_OPTIONS_WITHOUT_VARIANTS - - """ - At least one of the product variants has invalid SKUs. - """ - CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU - - """ - Duplicated option value. - """ - DUPLICATED_OPTION_VALUE - - """ - Cannot link multiple options to the same metafield. - """ - DUPLICATE_LINKED_OPTION - - """ - Invalid metafield value for linked option. - """ - INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION - - """ - The name provided is not valid. - """ - INVALID_NAME - - """ - The option position provided is not valid. - """ - INVALID_POSITION - - """ - A key is missing in the input. - """ - KEY_MISSING_IN_INPUT - - """ - No valid metafield definition found for linked option. - """ - LINKED_METAFIELD_DEFINITION_NOT_FOUND - - """ - Linked options are currently not supported for this shop. - """ - LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP - - """ - Updating the linked_metafield of an option requires a linked_metafield_value for each option value. - """ - LINKED_OPTION_UPDATE_MISSING_VALUES - - """ - On create, this key cannot be used. - """ - NO_KEY_ON_CREATE - - """ - Option already exists. - """ - OPTION_ALREADY_EXISTS - - """ - Option does not exist. - """ - OPTION_DOES_NOT_EXIST - - """ - An option linked to the provided metafield already exists. - """ - OPTION_LINKED_METAFIELD_ALREADY_TAKEN - - """ - Option name is too long. - """ - OPTION_NAME_TOO_LONG - - """ - Option values count is over the allowed limit. - """ - OPTION_VALUES_OVER_LIMIT - - """ - Option value already exists. - """ - OPTION_VALUE_ALREADY_EXISTS - - """ - Performing conflicting actions on an option value. - """ - OPTION_VALUE_CONFLICTING_OPERATION - - """ - Option value does not exist. - """ - OPTION_VALUE_DOES_NOT_EXIST - - """ - Option value with variants linked cannot be deleted. - """ - OPTION_VALUE_HAS_VARIANTS - - """ - Option value name is too long. - """ - OPTION_VALUE_NAME_TOO_LONG - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED - - """ - The number of option values created with the MANAGE strategy would exceed the variant limit. - """ - TOO_MANY_VARIANTS_CREATED - - """ - Operation is not supported for a combined listing parent product. - """ - UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION -} - -""" -The set of variant strategies available for use in the `productOptionUpdate` mutation. -""" -enum ProductOptionUpdateVariantStrategy @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @gidTypes(types: ["Market"]) - ): [Translation!]! -} - -""" -A swatch associated with a product option value. -""" -type ProductOptionValueSwatch @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The color representation of the swatch. - """ - color: Color - - """ - An image representation of the swatch. - """ - image: MediaImage -} - -""" -Return type for `productOptionsCreate` mutation. -""" -type ProductOptionsCreatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - Cannot combine linked metafield and option values. - """ - CANNOT_COMBINE_LINKED_METAFIELD_AND_OPTION_VALUES - - """ - At least one of the product variants has invalid SKUs. - """ - CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU - - """ - Duplicated option name. - """ - DUPLICATED_OPTION_NAME - - """ - Duplicated option value. - """ - DUPLICATED_OPTION_VALUE - - """ - Cannot link multiple options to the same metafield. - """ - DUPLICATE_LINKED_OPTION - - """ - Invalid metafield value for linked option. - """ - INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION - - """ - The name provided is not valid. - """ - INVALID_NAME - - """ - No valid metafield definition found for linked option. - """ - LINKED_METAFIELD_DEFINITION_NOT_FOUND - - """ - Cannot specify 'linkedMetafieldValue' for an option that is not linked to a metafield. - """ - LINKED_METAFIELD_VALUE_WITHOUT_LINKED_OPTION - - """ - Linked options are currently not supported for this shop. - """ - LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP - - """ - Missing metafield values for linked option. - """ - MISSING_METAFIELD_VALUES_FOR_LINKED_OPTION - - """ - Cannot create new options without values for all existing variants. - """ - NEW_OPTION_WITHOUT_VALUE_FOR_EXISTING_VARIANTS - - """ - Options count is over the allowed limit. - """ - OPTIONS_OVER_LIMIT - - """ - Option already exists. - """ - OPTION_ALREADY_EXISTS - - """ - An option linked to the provided metafield already exists. - """ - OPTION_LINKED_METAFIELD_ALREADY_TAKEN - - """ - Each option must have a name specified. - """ - OPTION_NAME_MISSING - - """ - Option name is too long. - """ - OPTION_NAME_TOO_LONG - - """ - If specified, position field must be present in all option inputs. - """ - OPTION_POSITION_MISSING - - """ - Each option must have at least one option value specified. - """ - OPTION_VALUES_MISSING - - """ - Option values count is over the allowed limit. - """ - OPTION_VALUES_OVER_LIMIT - - """ - Option value name is too long. - """ - OPTION_VALUE_NAME_TOO_LONG - - """ - Position must be between 1 and the maximum number of options per product. - """ - POSITION_OUT_OF_BOUNDS - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED - - """ - The number of option values created with the CREATE strategy would exceed the variant limit. - """ - TOO_MANY_VARIANTS_CREATED - - """ - Operation is not supported for a combined listing parent product. - """ - UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION -} - -""" -Return type for `productOptionsDelete` mutation. -""" -type ProductOptionsDeletePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - Can't delete option with multiple values. - """ - CANNOT_DELETE_OPTION_WITH_MULTIPLE_VALUES - - """ - Cannot perform option deletion because it would result in deleting variants, and you don't have the required permissions. - """ - CANNOT_DELETE_VARIANT_WITHOUT_PERMISSION - - """ - At least one of the product variants has invalid SKUs. - """ - CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU - - """ - Cannot delete options without deleting variants. - """ - CANNOT_USE_NON_DESTRUCTIVE_STRATEGY - - """ - Options do not belong to the same product. - """ - OPTIONS_DO_NOT_BELONG_TO_THE_SAME_PRODUCT - - """ - Option does not exist. - """ - OPTION_DOES_NOT_EXIST - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED - - """ - Operation is not supported for a combined listing parent product. - """ - UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION -} - -""" -Return type for `productOptionsReorder` mutation. -""" -type ProductOptionsReorderPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - At least one of the product variants has invalid SKUs. - """ - CANNOT_MAKE_CHANGES_IF_VARIANT_IS_MISSING_REQUIRED_SKU - - """ - Duplicated option name. - """ - DUPLICATED_OPTION_NAME - - """ - Duplicated option value. - """ - DUPLICATED_OPTION_VALUE - - """ - Missing option name. - """ - MISSING_OPTION_NAME - - """ - Missing option value. - """ - MISSING_OPTION_VALUE - - """ - Cannot specify different options or option values using mixed id and name reference key. - """ - MIXING_ID_AND_NAME_KEYS_IS_NOT_ALLOWED - - """ - On reorder, this key cannot be used. - """ - NO_KEY_ON_REORDER - - """ - Option id does not exist. - """ - OPTION_ID_DOES_NOT_EXIST - - """ - Option name does not exist. - """ - OPTION_NAME_DOES_NOT_EXIST - - """ - Option value does not exist. - """ - OPTION_VALUE_DOES_NOT_EXIST - - """ - Option value id does not exist. - """ - OPTION_VALUE_ID_DOES_NOT_EXIST - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED -} - -""" -The input fields for which fields the user chose to show/hide when they edited a product. -""" -input ProductPreferencesInput @componentName(name: "merchandising") { - """ - Whether the international shipping fields should be shown by default. - """ - showInternationalShipping: Boolean! - - """ - Whether the SKU and barcode fields should be shown by default. - """ - showSkuAndBarcode: Boolean! -} - -""" -The price range of the product. -""" -type ProductPriceRange @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The highest variant's price. - """ - maxVariantPrice: MoneyV2! - - """ - The lowest variant's price. - """ - minVariantPrice: MoneyV2! -} - -""" -The price range of the product. -""" -type ProductPriceRangeV2 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The highest variant's price. - """ - maxVariantPrice: MoneyV2! - - """ - The lowest variant's price. - """ - minVariantPrice: MoneyV2! -} - -""" -Represents the channels where a product is published. -""" -type ProductPublication @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - channelHandle: String @deprecated(reason: "Use publicationId instead.") - - """ - ID of the channel. - """ - channelId: ID @deprecated(reason: "Use publicationId instead.") @gidTypes(types: ["Channel"]) - - """ - ID of the publication. - """ - publicationId: ID @gidTypes(types: ["Publication"]) - - """ - 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 @componentName(name: "merchandising") { - """ - The product to create or update publications for. - """ - id: ID! @gidTypes(types: ["Product"]) - - """ - The publication that the product is published to. - """ - productPublications: [ProductPublicationInput!]! -} - -""" -Return type for `productPublish` mutation. -""" -type ProductPublishPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") @componentName(name: "apps") { - """ - The channel this feedback is for. - """ - channel: Channel - - """ - 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 @componentName(name: "apps") { - """ - The ID of the channel that the feedback is for. Used to scope feedback to a - specific sales channel when the app has multiple channels. - """ - channelId: ID @gidTypes(types: ["Channel"]) - - """ - 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! - - """ - 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!] - - """ - The ID of the product that the feedback was created on. - """ - productId: ID! @gidTypes(types: ["Product"]) - - """ - The timestamp of the product associated with the feedback. - """ - productUpdatedAt: DateTime! - - """ - Whether the merchant needs to take action on the product. - """ - state: ResourceFeedbackState! -} - -""" -A sale associated with a product. -""" -type ProductSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "merchandising") { - """ - Custom ID of product to upsert. - """ - customId: UniqueMetafieldValueInput - - """ - Handle of product to upsert. - """ - handle: String - - """ - ID of product to update. - """ - id: ID -} - -""" -The input fields required to create or update a product via ProductSet mutation. -""" -input ProductSetInput @componentName(name: "merchandising") { - """ - 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 - - """ - 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 IDs of collections that this product will be a member of. - """ - collections: [ID!] @gidTypes(types: ["Collection"]) - - """ - The role of the product in a product grouping. It can only be set during creation. - """ - combinedListingRole: CombinedListingsRole - - """ - The description of the product, with HTML tags. - For example, the description might include bold `` and italic `` text. - """ - descriptionHtml: String - - """ - The files to associate with the product. - - Complexity cost: 1.9 per file. - """ - files: [FileSetInput!] - - """ - Whether the product is a gift card. - """ - giftCard: Boolean - - """ - 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 - - """ - 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 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") @gidTypes(types: ["Product"]) - - """ - The metafields to associate with this product. - - Complexity cost: 0.4 per metafield. - """ - metafields: [MetafieldInput!] - - """ - List of custom product options and option values (maximum of 3 per product). - """ - productOptions: [OptionSetInput!] - - """ - The [product type](https://help.shopify.com/manual/products/details/product-type) - that merchants define. - """ - productType: 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 - - """ - 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 [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) - that are associated with a product. - """ - seo: SEOInput - - """ - The status of the product. - """ - status: ProductStatus - - """ - 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 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 - - """ - A list of variants associated with the product. - - Complexity cost: 0.2 per variant. - """ - variants: [ProductVariantSetInput!] - - """ - The name of the product's vendor. - """ - vendor: String -} - -""" -The input fields required to set inventory quantities using `productSet` mutation. -""" -input ProductSetInventoryInput @componentName(name: "merchandising") { - """ - The ID of the location of the inventory quantity being set. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - An option cannot have both metafield linked and nonlinked option values. - """ - CANNOT_COMBINE_LINKED_AND_NONLINKED_OPTION_VALUES - - """ - The metafield violates a capability restriction. - """ - CAPABILITY_VIOLATION - - """ - Duplicated metafield value for linked option. - """ - DUPLICATED_METAFIELD_VALUE - - """ - Duplicated option name. - """ - DUPLICATED_OPTION_NAME - - """ - Duplicated option value. - """ - DUPLICATED_OPTION_VALUE - - """ - Duplicated value. - """ - DUPLICATED_VALUE - - """ - Cannot link multiple options to the same metafield. - """ - DUPLICATE_LINKED_OPTION - - """ - Something went wrong, please try again. - """ - GENERIC_ERROR - - """ - 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 - - """ - Handle already in use. Please provide a new handle. - """ - HANDLE_NOT_UNIQUE - - """ - The id field is not allowed if identifier is provided. - """ - ID_NOT_ALLOWED - - """ - The identifier value does not match the value of the corresponding field in the input. - """ - INPUT_MISMATCH - - """ - Input is not valid. - """ - INVALID_INPUT - - """ - Metafield is not valid. - """ - INVALID_METAFIELD - - """ - Invalid metafield value for linked option. - """ - INVALID_METAFIELD_VALUE_FOR_LINKED_OPTION - - """ - Product is not valid. - """ - INVALID_PRODUCT - - """ - Product variant is not valid. - """ - INVALID_VARIANT - - """ - Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. - """ - INVENTORY_QUANTITIES_LIMIT_EXCEEDED - - """ - Error processing request in the background job. - """ - JOB_ERROR - - """ - No valid metafield definition found for linked option. - """ - LINKED_METAFIELD_DEFINITION_NOT_FOUND - - """ - Linked options are currently not supported for this shop. - """ - LINKED_OPTIONS_NOT_SUPPORTED_FOR_SHOP - - """ - The input argument `metafields` (if present) must contain the `customId` value. - """ - METAFIELD_MISMATCH - - """ - The input field corresponding to the identifier is required. - """ - MISSING_FIELD_REQUIRED - - """ - Resource matching the identifier was not found. - """ - NOT_FOUND - - """ - Options over limit. - """ - OPTIONS_OVER_LIMIT - - """ - Option does not exist. - """ - OPTION_DOES_NOT_EXIST - - """ - Each option must have at least one option value specified. - """ - OPTION_VALUES_MISSING - - """ - Option values over limit. - """ - OPTION_VALUES_OVER_LIMIT - - """ - Option value does not exist. - """ - OPTION_VALUE_DOES_NOT_EXIST - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Must specify product options when updating variants. - """ - PRODUCT_OPTIONS_INPUT_MISSING - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED - - """ - Product variant does not exist. - """ - PRODUCT_VARIANT_DOES_NOT_EXIST - - """ - Must specify variants when updating options. - """ - VARIANTS_INPUT_MISSING - - """ - Number of product variants exceeds shop limit. - """ - VARIANTS_OVER_LIMIT -} - -""" -The set of valid sort keys for the Product query. -""" -enum ProductSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 archived. - """ - isArchived: Boolean! - - """ - 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! -} - -""" -An auto-generated type for paginating through multiple ProductTaxonomyNodes. -""" -type ProductTaxonomyNodeConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [ProductTaxonomyNodeEdge!]! - - """ - A list of nodes that are contained in ProductTaxonomyNodeEdge. 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: [ProductTaxonomyNode!]! - - """ - 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 ProductTaxonomyNode and a cursor during pagination. -""" -type ProductTaxonomyNodeEdge @componentName(name: "merchandising") { - """ - 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 ProductTaxonomyNodeEdge. - """ - node: ProductTaxonomyNode! -} - -""" -The input fields for specifying a product to unpublish from a channel and the sales channels to unpublish it from. -""" -input ProductUnpublishInput @componentName(name: "merchandising") { - """ - The ID of the product to create or update publications for. - """ - id: ID! @gidTypes(types: ["Product"]) - - """ - The channels to unpublish the product from. - """ - productPublications: [ProductPublicationInput!]! -} - -""" -Return type for `productUnpublish` mutation. -""" -type ProductUnpublishPayload @componentName(name: "platform") { - """ - 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 required to identify a product for update. -""" -input ProductUpdateIdentifiers @oneOf @componentName(name: "merchandising") { - """ - Custom ID of product to update. - """ - customId: UniqueMetafieldValueInput - - """ - Handle of product to update. - """ - handle: String - - """ - ID of product to update. - """ - id: ID -} - -""" -The input fields for updating a product. -""" -input ProductUpdateInput @componentName(name: "merchandising") { - """ - 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 - - """ - A list of collection IDs to associate with the product. - """ - collectionsToJoin: [ID!] @gidTypes(types: ["Collection"]) - - """ - The collection IDs to disassociate from the product. - """ - collectionsToLeave: [ID!] @gidTypes(types: ["Collection"]) - - """ - 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 description of the product, with HTML tags. - For example, the description might include bold `` and italic `` text. - """ - descriptionHtml: 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 - - """ - 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 product's ID. - """ - id: ID @gidTypes(types: ["Product"]) - - """ - 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 type](https://help.shopify.com/manual/products/details/product-type) - that merchants define. - """ - productType: 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 - - """ - 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 [SEO title and description](https://help.shopify.com/manual/promoting-marketing/seo/adding-keywords) - that are associated with a product. - """ - seo: SEOInput - - """ - The [product status](https://help.shopify.com/manual/products/details/product-details-page#product-status), - which controls visibility across all sales channels. - """ - status: ProductStatus - - """ - 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 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 -} - -""" -Return type for `productUpdateMedia` mutation. -""" -type ProductUpdateMediaPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 & Publishable @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - Whether the product variant is available for sale. - """ - availableForSale: Boolean! - - """ - 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 @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 - - """ - The delivery promise participants for the product variant. - """ - deliveryPromiseParticipants( - """ - The branded promise handle to filter by. - """ - brandedPromiseHandle: String! - ): [DeliveryPromiseParticipant!]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): EventConnection! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The featured image for the variant. - """ - image( - """ - Crops the image according to the specified region. - """ - crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") - - """ - Image height in pixels between 1 and 2048. - """ - maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") - - """ - Image width in pixels between 1 and 2048. - """ - maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The presentment currencies prices should return in. - """ - presentmentCurrencies: [CurrencyCode!] - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-1234` | - | 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` | - | 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` | - | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) - field. | | | - `collection_id:108179161409` | - | 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` | - | 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'` | - | 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` | - | error_feedback | string | Filter by products with publishing errors. | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | 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` | - | has_only_composites | boolean | Filter by products that have only - composite variants. | | | - `has_only_composites:true` | - | 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` | - | has_variant_with_components | boolean | Filter by products that have - variants with associated components. | | | - - `has_variant_with_components:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_total | integer | Filter by inventory count. | | | - - `inventory_total:0`
- `inventory_total:>150`
- - `inventory_total:>=200` | - | 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` | - | 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"` | - | out_of_stock_somewhere | boolean | Filter by products that are out of - stock in at least one location. | | | - `out_of_stock_somewhere:true` | - | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) - field. | | | - `price:100.57` | - | 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` | - | 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` | - | product_type | string | Filter by a comma-separated list of [product - types](https://help.shopify.com/manual/products/details/product-type). | | | - - `product_type:snowboard` | - | publication_ids | string | Filter by a comma-separated list of publication - IDs that are associated with the product. | | | - - `publication_ids:184111530305,184111694145` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | `active` | - - `status:active,draft` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) - field. | | | - `title:The Minimal Snowboard` | - | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) - enabled. | | | - `tracks_inventory:true` | - | 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'` | - | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) - field. | | | - `variant_id:45779434701121` | - | 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'` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductConnection! - - """ - A list of the product variant components. - """ - productVariantComponents( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductVariantComponentConnection! - - """ - 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.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - Whether the resource is published to a specific channel. - """ - publishedOnChannel( - """ - The ID of the channel to check. - """ - channelId: ID! @gidTypes(types: ["Channel"]) - ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - 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! @gidTypes(types: ["Publication"]) - ): 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! - - """ - The list of resources that are published to a - [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). - """ - resourcePublications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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). - """ - resourcePublicationsV2( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationV2Connection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @gidTypes(types: ["Market"]) - ): [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 list of channels that the resource is not published to. - """ - unpublishedChannels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) - that the resource isn't published to. - """ - unpublishedPublications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 @componentName(name: "merchandising") { - """ - Specifies the media to append to the variant. - """ - mediaIds: [ID!]! @gidTypes(types: ["Media"]) - - """ - Specifies the variant to which media will be appended. - """ - variantId: ID! @gidTypes(types: ["ProductVariant"]) -} - -""" -Return type for `productVariantAppendMedia` mutation. -""" -type ProductVariantAppendMediaPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "merchandising") { - """ - Specifies the media to detach from the variant. - """ - mediaIds: [ID!]! @gidTypes(types: ["Media"]) - - """ - Specifies the variant from which media will be detached. - """ - variantId: ID! @gidTypes(types: ["ProductVariant"]) -} - -""" -Return type for `productVariantDetachMedia` mutation. -""" -type ProductVariantDetachMediaPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The ID of the product variant that's a component of the bundle. - """ - id: ID! @gidTypes(types: ["ProductVariant"]) - - """ - 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 @componentName(name: "merchandising") { - """ - The [custom ID](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids) of the product variant. - """ - customId: UniqueMetafieldValueInput - - """ - The ID of the product variant. - """ - id: ID -} - -""" -The valid values for the inventory policy of a product variant once it is out of stock. -""" -enum ProductVariantInventoryPolicy @componentName(name: "merchandising") { - """ - Customers can buy this product variant after it's out of stock. - """ - CONTINUE - - """ - Customers can't buy this product variant after it's out of stock. - """ - DENY -} - -""" -Return type for `productVariantJoinSellingPlanGroups` mutation. -""" -type ProductVariantJoinSellingPlanGroupsPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - Specifies the ID of the product variant to update. - """ - id: ID! @gidTypes(types: ["ProductVariant"]) - - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Combined listing cannot be child product variants. - """ - CHILD_PRODUCT_VARIANT_CANNOT_BE_COMBINED_LISTING - - """ - A parent product variant cannot contain itself as a component. - """ - CIRCULAR_REFERENCE - - """ - 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 - - """ - Unable to create parent product variant. - """ - FAILED_TO_CREATE - - """ - Unable to remove product variant relationships. - """ - FAILED_TO_REMOVE - - """ - Unable to update product variant relationships. - """ - FAILED_TO_UPDATE - - """ - Unable to update parent product variant price. - """ - FAILED_TO_UPDATE_PARENT_PRODUCT_VARIANT_PRICE - - """ - Product variant relationships must have a quantity greater than 0. - """ - INVALID_QUANTITY - - """ - The product variant relationships to remove must be specified if all the - parent product variant's components aren't being removed. - """ - MUST_SPECIFY_COMPONENTS - - """ - Nested parent product variants aren't supported. - """ - NESTED_PARENT_PRODUCT_VARIANT - - """ - Combined listing cannot be parent product variants. - """ - PARENT_PRODUCT_VARIANT_CANNOT_BE_COMBINED_LISTING - - """ - 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 - - """ - A parent product variant ID or product ID must be provided. - """ - PARENT_REQUIRED - - """ - The products for these product variants are already owned by another App. - """ - PRODUCT_EXPANDER_APP_OWNERSHIP_ALREADY_EXISTS - - """ - Some of the provided product variants are not components of the specified parent product variant. - """ - PRODUCT_VARIANTS_NOT_COMPONENTS - - """ - The product variants were not found. - """ - PRODUCT_VARIANTS_NOT_FOUND - - """ - 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 - - """ - Multipack bundles are not supported. - """ - UNSUPPORTED_MULTIPACK_RELATIONSHIP - - """ - A price must be provided for a parent product variant if the price calculation is set to fixed. - """ - UPDATE_PARENT_VARIANT_PRICE_REQUIRED -} - -""" -The input fields for updating a composite product variant. -""" -input ProductVariantRelationshipUpdateInput @componentName(name: "merchandising") { - """ - A product ID which contains product variants that have relationships with other variants. - """ - parentProductId: ID @gidTypes(types: ["Product"]) - - """ - The product variant ID representing that which contains the relationships with other variants. - """ - parentProductVariantId: ID @gidTypes(types: ["ProductVariant"]) - - """ - Method in which to update the price of the parent product variant. - """ - priceInput: PriceInput = null - - """ - The product variants and associated quantitites to add to the product variant. - """ - productVariantRelationshipsToCreate: [ProductVariantGroupRelationshipInput!] = null - - """ - The bundle component product variants to be removed from the product variant. - """ - productVariantRelationshipsToRemove: [ID!] = null @gidTypes(types: ["ProductVariant"]) - - """ - The product variants and associated quantitites to update in specified product variant. - """ - productVariantRelationshipsToUpdate: [ProductVariantGroupRelationshipInput!] = null - - """ - Whether to remove all components from the product variant. The default value is `false`. - """ - removeAllProductVariantRelationships: Boolean = false -} - -""" -The input fields for specifying a product variant to create or update. -""" -input ProductVariantSetInput @componentName(name: "merchandising") { - """ - The value of the barcode associated with the product. - """ - barcode: String - - """ - The compare-at price of the variant. - """ - compareAtPrice: Money - - """ - 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 - - """ - Specifies the product variant to update or create a new variant if absent. - """ - id: ID @gidTypes(types: ["ProductVariant"]) - - """ - The inventory item associated with the variant, used for unit cost. - """ - inventoryItem: InventoryItemInput - - """ - 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!] - - """ - Additional customizable information about the product variant. - - Complexity cost: 0.4 per variant metafield. - """ - metafields: [MetafieldInput!] - - """ - The custom properties that a shop owner uses to define product variants. - """ - optionValues: [VariantOptionValueInput!]! - - """ - The order of the product variant in the list of product variants. The first position in the list is 1. - """ - position: Int - - """ - The price of the variant. - """ - price: Money - - """ - Indicates whether the product variant is created as published or unpublished. - This option is only available for new product variants. - """ - published: 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 - - """ - Whether or not unit price should be shown for this product variant. - """ - showUnitPrice: Boolean - - """ - The SKU for the variant. Case-sensitive string. - """ - sku: String - - """ - The tax code associated with the variant. - """ - taxCode: String - - """ - Whether the variant is taxable. - """ - taxable: Boolean - - """ - The unit price measurement for the product variant. - """ - unitPriceMeasurement: UnitPriceMeasurementInput -} - -""" -The set of valid sort keys for the ProductVariant query. -""" -enum ProductVariantSortKeys @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 - - """ - Preserves the existing standalone variant when the product has only a single - default ("Default Title") or a single custom variant. - """ - PRESERVE_STANDALONE_VARIANT - - """ - Deletes the existing standalone variant when the product has only a single default ("Default Title") or custom variant. - """ - REMOVE_STANDALONE_VARIANT -} - -""" -Error codes for failed product variant bulk create mutations. -""" -type ProductVariantsBulkCreateUserError implements DisplayableError @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - ApiPermission metafields can only be created or updated by the app owner. - """ - APP_NOT_AUTHORIZED - - """ - The input value is blank. - """ - BLANK - - """ - Cannot set name for an option value linked to a metafield. - """ - CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE - - """ - The metafield violates a capability restriction. - """ - CAPABILITY_VIOLATION - - """ - Owner type can't be used in this mutation. - """ - DISALLOWED_OWNER_TYPE - - """ - Variant price must be greater than or equal to zero. - """ - GREATER_THAN_OR_EQUAL_TO - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - Invalid input detected. - """ - INVALID - - """ - Input is invalid. - """ - INVALID_INPUT - - """ - The type is invalid. - """ - INVALID_TYPE - - """ - The value is invalid for the metafield type or for the definition options. - """ - INVALID_VALUE - - """ - Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. - """ - INVENTORY_QUANTITIES_LIMIT_EXCEEDED - - """ - Price must be 0 for variants of products with a gift card issuance currency. - """ - LOCAL_CURRENCY_GIFT_CARD_PRICE_MUST_BE_ZERO - - """ - Input must be for this product. - """ - MUST_BE_FOR_THIS_PRODUCT - - """ - Variant options are not enough. - """ - NEED_TO_ADD_OPTION_VALUES - - """ - Price cannot take a negative value. - """ - NEGATIVE_PRICE_VALUE - - """ - Input is not defined for this shop. - """ - NOT_DEFINED_FOR_SHOP - - """ - On create, this key cannot be used. - """ - NO_KEY_ON_CREATE - - """ - Variant options are more than the product options. - """ - OPTION_VALUES_FOR_NUMBER_OF_UNKNOWN_OPTIONS - - """ - The input value needs to be blank. - """ - PRESENT - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED - - """ - You reached the limit of available SKUs in your current plan. - """ - SUBSCRIPTION_VIOLATION - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - Inventory locations cannot exceed the allowed resource limit or 10. - """ - TOO_MANY_INVENTORY_LOCATIONS - - """ - The input value is too short. - """ - TOO_SHORT - - """ - Quantity could not be set. The location was not found. - """ - TRACKED_VARIANT_LOCATION_NOT_FOUND - - """ - Unstructured reserved namespace. - """ - UNSTRUCTURED_RESERVED_NAMESPACE - - """ - Operation is not supported for a combined listing parent product. - """ - UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION - - """ - Variant already exists. - """ - VARIANT_ALREADY_EXISTS - - """ - Variant options already exist. Please change the variant option(s). - """ - VARIANT_ALREADY_EXISTS_CHANGE_OPTION_VALUE -} - -""" -Return type for `productVariantsBulkDelete` mutation. -""" -type ProductVariantsBulkDeletePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - The variant does not exist. - """ - AT_LEAST_ONE_VARIANT_DOES_NOT_BELONG_TO_THE_PRODUCT - - """ - Cannot delete default variant. - """ - CANNOT_DELETE_LAST_VARIANT - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED - - """ - 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 @componentName(name: "merchandising") { - """ - 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 @gidTypes(types: ["ProductVariant"]) - - """ - The inventory item associated with the variant, used for unit cost. - """ - inventoryItem: InventoryItemInput - - """ - 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!] - - """ - The ID of the media that's associated with the variant. - """ - mediaId: ID @gidTypes(types: ["MediaImage"]) - - """ - The URL of the media to associate with the variant. - """ - mediaSrc: [String!] - - """ - 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 - - """ - Indicates whether the product variant is created as published or unpublished. - This option is only available for new product variants. - """ - published: Boolean - - """ - Adjust inventory quantities with deltas. - """ - quantityAdjustments: [InventoryAdjustmentInput!] - - """ - 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 the unit price should be shown for this product variant. - """ - showUnitPrice: Boolean - - """ - The tax code associated with the variant. - """ - taxCode: String - - """ - Whether the variant is taxable. - """ - taxable: Boolean - - """ - The unit price measurement for the product variant. - """ - unitPriceMeasurement: UnitPriceMeasurementInput -} - -""" -Return type for `productVariantsBulkReorder` mutation. -""" -type ProductVariantsBulkReorderPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - Product variant IDs must be unique. - """ - DUPLICATED_VARIANT_ID - - """ - Something went wrong, please try again. - """ - GENERIC_ERROR - - """ - Product variant position cannot be zero or negative number. - """ - INVALID_POSITION - - """ - Product variant does not exist. - """ - MISSING_VARIANT - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST -} - -""" -Return type for `productVariantsBulkUpdate` mutation. -""" -type ProductVariantsBulkUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - ApiPermission metafields can only be created or updated by the app owner. - """ - APP_NOT_AUTHORIZED - - """ - The input value is blank. - """ - BLANK - - """ - Cannot set name for an option value linked to a metafield. - """ - CANNOT_SET_NAME_FOR_LINKED_OPTION_VALUE - - """ - Mutually exclusive input fields provided. - """ - CANNOT_SPECIFY_BOTH - - """ - The metafield violates a capability restriction. - """ - CAPABILITY_VIOLATION - - """ - Owner type can't be used in this mutation. - """ - DISALLOWED_OWNER_TYPE - - """ - The price of the variant must be greater than or equal to zero. - """ - GREATER_THAN_OR_EQUAL_TO - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - Input is invalid. - """ - INVALID_INPUT - - """ - The type is invalid. - """ - INVALID_TYPE - - """ - Metafield value is invalid. - """ - INVALID_VALUE - - """ - Inventory quantity input exceeds the limit of 50000. Consider using separate `inventorySetQuantities` mutations. - """ - INVENTORY_QUANTITIES_LIMIT_EXCEEDED - - """ - Price must be 0 for variants of products with a gift card issuance currency. - """ - LOCAL_CURRENCY_GIFT_CARD_PRICE_MUST_BE_ZERO - - """ - Input must be for this product. - """ - MUST_BE_FOR_THIS_PRODUCT - - """ - Mandatory field input field missing. - """ - MUST_SPECIFY_ONE_OF_PAIR - - """ - Variant options are not enough. - """ - NEED_TO_ADD_OPTION_VALUES - - """ - Price cannot take a negative value. - """ - NEGATIVE_PRICE_VALUE - - """ - Input is not defined for this shop. - """ - NOT_DEFINED_FOR_SHOP - - """ - Inventory quantities cannot be provided during update. - """ - NO_INVENTORY_QUANTITES_DURING_UPDATE - - """ - Inventory quantities can only be provided during create. To update inventory - for existing variants, use inventoryAdjustQuantities. - """ - NO_INVENTORY_QUANTITIES_ON_VARIANTS_UPDATE - - """ - Option does not exist. - """ - OPTION_DOES_NOT_EXIST - - """ - Variant options are more than the product options. - """ - OPTION_VALUES_FOR_NUMBER_OF_UNKNOWN_OPTIONS - - """ - Option value does not exist. - """ - OPTION_VALUE_DOES_NOT_EXIST - - """ - Option value name is too long. - """ - OPTION_VALUE_NAME_TOO_LONG - - """ - The input value needs to be blank. - """ - PRESENT - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Product is suspended. - """ - PRODUCT_SUSPENDED - - """ - Product variant does not exist. - """ - PRODUCT_VARIANT_DOES_NOT_EXIST - - """ - Product variant is missing ID attribute. - """ - PRODUCT_VARIANT_ID_MISSING - - """ - You reached the limit of available SKUs in your current plan. - """ - SUBSCRIPTION_VIOLATION - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT - - """ - Unstructured reserved namespace. - """ - UNSTRUCTURED_RESERVED_NAMESPACE - - """ - Operation is not supported for a combined listing parent product. - """ - UNSUPPORTED_COMBINED_LISTING_PARENT_OPERATION - - """ - The variant already exists. - """ - VARIANT_ALREADY_EXISTS -} - -""" -Return type for `pubSubServerPixelUpdate` mutation. -""" -type PubSubServerPixelUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Invalid parameters provided. - """ - INVALID_PARAMETERS - - """ - Address for this topic has already been taken. - """ - TAKEN -} - -""" -The input fields for a PubSub webhook subscription. -""" -input PubSubWebhookSubscriptionInput @componentName(name: "apps") { - """ - 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 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!] - - """ - 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!] - - """ - A human-readable name for the webhook subscription. - """ - name: String - - """ - The Pub/Sub project ID. - """ - pubSubProject: String! - - """ - The Pub/Sub topic ID. - """ - pubSubTopic: String! -} - -""" -Return type for `pubSubWebhookSubscriptionUpdate` mutation. -""" -type PubSubWebhookSubscriptionUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "apps") { - """ - 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 channels associated with the publication. - """ - channels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection - - """ - The list of collection publication records, each representing the publication - status and details for a collection published to this publication (typically channel). - """ - collectionPublicationsV3( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationConnection! - - """ - The list of collections published to the publication. - """ - collections( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @gidTypes(types: ["Collection"]) - ): Boolean! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The list of products included, but not necessarily published, in the publication. - """ - includedProducts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-1234` | - | 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` | - | 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` | - | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) - field. | | | - `collection_id:108179161409` | - | 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` | - | 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'` | - | 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` | - | error_feedback | string | Filter by products with publishing errors. | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | 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` | - | has_only_composites | boolean | Filter by products that have only - composite variants. | | | - `has_only_composites:true` | - | 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` | - | has_variant_with_components | boolean | Filter by products that have - variants with associated components. | | | - - `has_variant_with_components:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_total | integer | Filter by inventory count. | | | - - `inventory_total:0`
- `inventory_total:>150`
- - `inventory_total:>=200` | - | 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` | - | 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"` | - | out_of_stock_somewhere | boolean | Filter by products that are out of - stock in at least one location. | | | - `out_of_stock_somewhere:true` | - | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) - field. | | | - `price:100.57` | - | 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` | - | 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` | - | product_type | string | Filter by a comma-separated list of [product - types](https://help.shopify.com/manual/products/details/product-type). | | | - - `product_type:snowboard` | - | publication_ids | string | Filter by a comma-separated list of publication - IDs that are associated with the product. | | | - - `publication_ids:184111530305,184111694145` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | `active` | - - `status:active,draft` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) - field. | | | - `title:The Minimal Snowboard` | - | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) - enabled. | | | - `tracks_inventory:true` | - | 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'` | - | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) - field. | | | - `variant_id:45779434701121` | - | 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'` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): ProductConnection! - - """ - The count of products included in the publication. Limited to a maximum of 10000 by default. - """ - includedProductsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-1234` | - | 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` | - | 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` | - | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) - field. | | | - `collection_id:108179161409` | - | 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` | - | 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'` | - | 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` | - | error_feedback | string | Filter by products with publishing errors. | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | 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` | - | has_only_composites | boolean | Filter by products that have only - composite variants. | | | - `has_only_composites:true` | - | 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` | - | has_variant_with_components | boolean | Filter by products that have - variants with associated components. | | | - - `has_variant_with_components:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_total | integer | Filter by inventory count. | | | - - `inventory_total:0`
- `inventory_total:>150`
- - `inventory_total:>=200` | - | 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` | - | 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"` | - | out_of_stock_somewhere | boolean | Filter by products that are out of - stock in at least one location. | | | - `out_of_stock_somewhere:true` | - | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) - field. | | | - `price:100.57` | - | 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` | - | 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` | - | product_type | string | Filter by a comma-separated list of [product - types](https://help.shopify.com/manual/products/details/product-type). | | | - - `product_type:snowboard` | - | publication_ids | string | Filter by a comma-separated list of publication - IDs that are associated with the product. | | | - - `publication_ids:184111530305,184111694145` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | `active` | - - `status:active,draft` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) - field. | | | - `title:The Minimal Snowboard` | - | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) - enabled. | | | - `tracks_inventory:true` | - | 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'` | - | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) - field. | | | - `variant_id:45779434701121` | - | 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'` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The ID of an existing saved search. - The search’s query string is used as the query argument. - Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationConnection! - - """ - The list of products published to the publication. - """ - products( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-1234` | - | 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` | - | 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` | - | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) - field. | | | - `collection_id:108179161409` | - | 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` | - | 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'` | - | 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` | - | error_feedback | string | Filter by products with publishing errors. | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | 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` | - | has_only_composites | boolean | Filter by products that have only - composite variants. | | | - `has_only_composites:true` | - | 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` | - | has_variant_with_components | boolean | Filter by products that have - variants with associated components. | | | - - `has_variant_with_components:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_total | integer | Filter by inventory count. | | | - - `inventory_total:0`
- `inventory_total:>150`
- - `inventory_total:>=200` | - | 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` | - | 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"` | - | out_of_stock_somewhere | boolean | Filter by products that are out of - stock in at least one location. | | | - `out_of_stock_somewhere:true` | - | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) - field. | | | - `price:100.57` | - | 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` | - | 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` | - | product_type | string | Filter by a comma-separated list of [product - types](https://help.shopify.com/manual/products/details/product-type). | | | - - `product_type:snowboard` | - | publication_ids | string | Filter by a comma-separated list of publication - IDs that are associated with the product. | | | - - `publication_ids:184111530305,184111694145` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | `active` | - - `status:active,draft` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) - field. | | | - `title:The Minimal Snowboard` | - | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) - enabled. | | | - `tracks_inventory:true` | - | 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'` | - | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) - field. | | | - `variant_id:45779434701121` | - | 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'` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): ProductConnection! - - """ - Whether the publication supports future publishing. - """ - supportsFuturePublishing: Boolean! -} - -""" -An auto-generated type for paginating through multiple Publications. -""" -type PublicationConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - Whether to automatically add newly created products to this publication. - """ - autoPublish: Boolean = false - - """ - The ID of the catalog. - """ - catalogId: ID @gidTypes(types: ["Catalog"]) - - """ - Whether to create an empty publication or prepopulate it with all products. - """ - defaultState: PublicationCreateInputPublicationDefaultState = EMPTY -} - -""" -The input fields for the possible values for the default state of a publication. -""" -enum PublicationCreateInputPublicationDefaultState @componentName(name: "merchandising") { - """ - The publication is populated with all products. - """ - ALL_PRODUCTS - - """ - The publication is empty. - """ - EMPTY -} - -""" -Return type for `publicationCreate` mutation. -""" -type PublicationCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "apps") { - """ - 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 @componentName(name: "merchandising") { - """ - ID of the channel. - """ - channelId: ID @deprecated(reason: "Use publicationId instead.") @gidTypes(types: ["Channel"]) - - """ - ID of the publication. - """ - publicationId: ID @gidTypes(types: ["Publication"]) - - """ - 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 @requiredAccess(scope: "The user must have `read_products` or `read_publications` access.") @componentName(name: "merchandising") = AddAllProductsOperation | CatalogCsvOperation | PublicationResourceOperation - -""" -A bulk update operation on a publication. -""" -type PublicationResourceOperation implements Node & ResourceOperation @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Whether new products should be automatically published to the publication. - """ - autoPublish: Boolean - - """ - A list of publishable IDs to add. The maximum number of publishables to update simultaneously is 50. - """ - publishablesToAdd: [ID!] = [] @gidTypes(types: ["Publishable"]) - - """ - A list of publishable IDs to remove. The maximum number of publishables to update simultaneously is 50. - """ - publishablesToRemove: [ID!] = [] @gidTypes(types: ["Publishable"]) -} - -""" -Return type for `publicationUpdate` mutation. -""" -type PublicationUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - Products and variants cannot be updated together. - """ - CANNOT_COMBINE_PRODUCTS_AND_VARIANTS - - """ - Cannot modify a catalog for an app. - """ - CANNOT_MODIFY_APP_CATALOG - - """ - Can't modify a publication that belongs to an app catalog. - """ - CANNOT_MODIFY_APP_CATALOG_PUBLICATION - - """ - Cannot modify a catalog for a market. - """ - CANNOT_MODIFY_MARKET_CATALOG - - """ - Can't modify a publication that belongs to a market catalog. - """ - CANNOT_MODIFY_MARKET_CATALOG_PUBLICATION - - """ - Catalog does not exist. - """ - CATALOG_NOT_FOUND - - """ - The input value is invalid. - """ - INVALID - - """ - Publishable ID not found. - """ - INVALID_PUBLISHABLE_ID - - """ - Market does not exist. - """ - MARKET_NOT_FOUND - - """ - The product is currently being modified. Please try again later. - """ - PRODUCT_LOCK_ERROR - - """ - 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 publication is currently being modified. Please try again later. - """ - PUBLICATION_LOCKED - - """ - Publication not found. - """ - PUBLICATION_NOT_FOUND - - """ - The limit for simultaneous publication updates has been exceeded. - """ - PUBLICATION_UPDATE_LIMIT_EXCEEDED - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT - - """ - Can't perform this action on a publication. - """ - UNSUPPORTED_PUBLICATION_ACTION - - """ - A catalog publication can only contain products. - """ - UNSUPPORTED_PUBLISHABLE_TYPE - - """ - Variants in a single operation must belong to the same product. - """ - VARIANTS_BELONG_TO_MULTIPLE_PRODUCTS - - """ - Variant publishing is not supported for this product type. - """ - VARIANT_PUBLISHING_UNSUPPORTED_PRODUCT_TYPE -} - -""" -Represents a resource that can be published to a channel. -A publishable resource can be either a Product or Collection. -""" -interface Publishable @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - Whether the resource is published to a specific channel. - """ - publishedOnChannel( - """ - The ID of the channel to check. - """ - channelId: ID! @gidTypes(types: ["Channel"]) - ): Boolean! @deprecated(reason: "Use `publishedOnPublication` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - 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! @gidTypes(types: ["Publication"]) - ): Boolean! - - """ - The list of resources that are published to a - [publication](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication). - """ - resourcePublications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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). - """ - resourcePublicationsV2( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ResourcePublicationV2Connection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - The list of channels that the resource is not published to. - """ - unpublishedChannels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection! @deprecated(reason: "Use `unpublishedPublications` instead.") @requiredAccess(scope: "`read_publications` access scope.") - - """ - The list of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) - that the resource isn't published to. - """ - unpublishedPublications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") -} - -""" -Return type for `publishablePublish` mutation. -""" -type PublishablePublishPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "The user must have access to orders or draft orders.") @componentName(name: "business_customers") { - """ - 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 @componentName(name: "business_customers") { - """ - ID of the company contact. - """ - companyContactId: ID! @gidTypes(types: ["CompanyContact"]) - - """ - ID of the company. - """ - companyId: ID! @gidTypes(types: ["Company"]) - - """ - ID of the company location. - """ - companyLocationId: ID! @gidTypes(types: ["CompanyLocation"]) -} - -""" -Represents information about the purchasing entity for the order or draft order. -""" -union PurchasingEntity @requiredAccess(scope: "The user must have access to customers and orders or draft orders.") @componentName(name: "business_customers") = Customer | PurchasingCompany - -""" -The input fields for a purchasing entity. Can either be a customer or a purchasing company. -""" -input PurchasingEntityInput @componentName(name: "business_customers") { - """ - Represents a customer. Null if there's a purchasing company. - """ - customerId: ID @gidTypes(types: ["Customer"]) - - """ - 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The minimum required quantity for a variant to qualify for this price. - """ - minimumQuantity: Int! - - """ - The price of the product variant when its quantity meets the break's minimum quantity. - """ - price: MoneyInput! - - """ - The product variant ID associated with the quantity break. - """ - variantId: ID! @gidTypes(types: ["ProductVariant"]) -} - -""" -The set of valid sort keys for the QuantityPriceBreak query. -""" -enum QuantityPriceBreakSortKeys @componentName(name: "platform") { - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `minimum_quantity` value. - """ - MINIMUM_QUANTITY -} - -""" -The input fields used to update quantity pricing. -""" -input QuantityPricingByVariantUpdateInput @componentName(name: "merchandising") { - """ - A list of fixed prices to add. - """ - pricesToAdd: [PriceListPriceInput!]! - - """ - A list of variant IDs that identify which fixed prices to remove. - """ - pricesToDeleteByVariantId: [ID!]! @gidTypes(types: ["ProductVariant"]) - - """ - 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!]! @gidTypes(types: ["QuantityPriceBreak"]) - - """ - A list of product variant IDs that identify which quantity breaks to remove. - """ - quantityPriceBreaksToDeleteByVariantId: [ID!] @gidTypes(types: ["ProductVariant"]) - - """ - A list of quantity rules to add. - """ - quantityRulesToAdd: [QuantityRuleInput!]! - - """ - A list of variant IDs that identify which quantity rules to remove. - """ - quantityRulesToDeleteByVariantId: [ID!]! @gidTypes(types: ["ProductVariant"]) -} - -""" -Return type for `quantityPricingByVariantUpdate` mutation. -""" -type QuantityPricingByVariantUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to create and edit catalogs, and the shop requires B2B features enabled.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - Something went wrong when trying to update quantity pricing. Please try again later. - """ - GENERIC_ERROR - - """ - Price list and fixed price currency mismatch. - """ - PRICE_ADD_CURRENCY_MISMATCH - - """ - 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 - - """ - Fixed price's variant not found. - """ - PRICE_ADD_VARIANT_NOT_FOUND - - """ - Price is not fixed. - """ - PRICE_DELETE_PRICE_NOT_FIXED - - """ - Fixed price's variant not found. - """ - PRICE_DELETE_VARIANT_NOT_FOUND - - """ - Price List does not exist. - """ - PRICE_LIST_NOT_FOUND - - """ - Price list and quantity price break currency mismatch. - """ - QUANTITY_PRICE_BREAK_ADD_CURRENCY_MISMATCH - - """ - 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 - - """ - Failed to save quantity price break. - """ - QUANTITY_PRICE_BREAK_ADD_FAILED_TO_SAVE - - """ - Invalid quantity price break. - """ - QUANTITY_PRICE_BREAK_ADD_INVALID - - """ - Exceeded the allowed number of quantity price breaks per variant. - """ - QUANTITY_PRICE_BREAK_ADD_LIMIT_EXCEEDED - - """ - 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 less than the quantity rule minimum. - """ - QUANTITY_PRICE_BREAK_ADD_MIN_LOWER_THAN_QUANTITY_RULES_MIN - - """ - 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's fixed price not found. - """ - QUANTITY_PRICE_BREAK_ADD_PRICE_LIST_PRICE_NOT_FOUND - - """ - Quantity price break variant not found. - """ - QUANTITY_PRICE_BREAK_ADD_VARIANT_NOT_FOUND - - """ - Variant to delete by is not found. - """ - QUANTITY_PRICE_BREAK_DELETE_BY_VARIANT_ID_VARIANT_NOT_FOUND - - """ - Failed to delete quantity price break. - """ - QUANTITY_PRICE_BREAK_DELETE_FAILED - - """ - Quantity price break not found. - """ - QUANTITY_PRICE_BREAK_DELETE_NOT_FOUND - - """ - Quantity rule catalog context not supported. - """ - QUANTITY_RULE_ADD_CATALOG_CONTEXT_NOT_SUPPORTED - - """ - Quantity rules to add inputs must be unique by variant id. - """ - QUANTITY_RULE_ADD_DUPLICATE_INPUT_FOR_VARIANT - - """ - Quantity rule increment is greater than minimum. - """ - QUANTITY_RULE_ADD_INCREMENT_IS_GREATER_THAN_MINIMUM - - """ - Quantity rule increment is less than one. - """ - QUANTITY_RULE_ADD_INCREMENT_IS_LESS_THAN_ONE - - """ - 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 maximum is less than one. - """ - QUANTITY_RULE_ADD_MAXIMUM_IS_LESS_THAN_ONE - - """ - Quantity rule maximum is not a multiple of increment. - """ - QUANTITY_RULE_ADD_MAXIMUM_NOT_A_MULTIPLE_OF_INCREMENT - - """ - Quantity rule maximum is less than the quantity price break minimum. - """ - QUANTITY_RULE_ADD_MAX_LOWER_THAN_QUANTITY_PRICE_BREAK_MIN - - """ - Quantity rule minimum is greater than maximum. - """ - QUANTITY_RULE_ADD_MINIMUM_GREATER_THAN_MAXIMUM - - """ - Quantity rule minimum is less than one. - """ - QUANTITY_RULE_ADD_MINIMUM_IS_LESS_THAN_ONE - - """ - Quantity rule minimum is not a multiple of increment. - """ - QUANTITY_RULE_ADD_MINIMUM_NOT_A_MULTIPLE_OF_INCREMENT - - """ - Quantity rule minimum is higher than the quantity price break minimum. - """ - QUANTITY_RULE_ADD_MIN_HIGHER_THAN_QUANTITY_PRICE_BREAK_MIN - - """ - Quantity rule variant not found. - """ - QUANTITY_RULE_ADD_VARIANT_NOT_FOUND - - """ - Quantity rule not found. - """ - QUANTITY_RULE_DELETE_RULE_NOT_FOUND - - """ - Quantity rule variant not found. - """ - QUANTITY_RULE_DELETE_VARIANT_NOT_FOUND -} - -""" -The quantity rule for the product variant in a given context. -""" -type QuantityRule @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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! @gidTypes(types: ["ProductVariant"]) -} - -""" -The origin of quantity rule on a price list. -""" -enum QuantityRuleOriginType @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - 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 - - """ - Value must be greater than or equal to 1. - """ - GREATER_THAN_OR_EQUAL_TO - - """ - Increment must be lower than or equal to the minimum. - """ - INCREMENT_IS_GREATER_THAN_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 - - """ - 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 - - """ - The maximum must be a multiple of the increment. - """ - MAXIMUM_NOT_MULTIPLE_OF_INCREMENT - - """ - 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 - - """ - The minimum must be a multiple of the increment. - """ - MINIMUM_NOT_MULTIPLE_OF_INCREMENT - - """ - Price list does not exist. - """ - PRICE_LIST_DOES_NOT_EXIST - - """ - Product variant ID does not exist. - """ - PRODUCT_VARIANT_DOES_NOT_EXIST - - """ - Quantity rule for variant associated with the price list provided does not exist. - """ - VARIANT_QUANTITY_RULE_DOES_NOT_EXIST -} - -""" -Return type for `quantityRulesAdd` mutation. -""" -type QuantityRulesAddPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | The date and time (in [ISO 8601 - format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was created. | - | email_state | string | Filter by `abandoned_email_state` value. Possible - values: `sent`, `not_sent`, `scheduled` and `suppressed`. | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | recovery_state | string | Possible values: `recovered` and `not_recovered`. | - | status | string | Possible values: `open` and `closed`. | - | 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. | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): AbandonedCheckoutConnection! @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") - - """ - Returns the count of abandoned checkouts for the given shop. Limited to a maximum of 10000 by default. - """ - abandonedCheckoutsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | The date and time (in [ISO 8601 - format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was created. | - | email_state | string | Filter by `abandoned_email_state` value. Possible - values: `sent`, `not_sent`, `scheduled` and `suppressed`. | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | recovery_state | string | Possible values: `recovered` and `not_recovered`. | - | status | string | Possible values: `open` and `closed`. | - | 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. | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The ID of an existing saved search. - The search’s query string is used as the query argument. - Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): Count @requiredAccess(scope: "`read_orders` access scope. Also: The user must have manage_abandoned_checkouts permission. When called by Shopify POS, the user must have the view_abandoned_checkouts retail permission.") - - """ - Returns a `Abandonment` resource by ID. - """ - abandonment( - """ - The ID of the `Abandonment` to return. - """ - id: ID! @gidTypes(types: ["Abandonment"]) - ): Abandonment - - """ - Returns an Abandonment by the Abandoned Checkout ID. - """ - abandonmentByAbandonedCheckoutId( - """ - The ID of the Abandoned Checkout ID to query by. - """ - abandonedCheckoutId: ID! @gidTypes(types: ["AbandonedCheckout"]) - ): Abandonment - - """ - List of all the active sales channels on this shop. - """ - allChannels( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection! - - """ - Returns a paginated list of [analytics targets](https://shopify.dev/docs/api/admin-graphql/unstable/objects/AnalyticsTarget) - for the shop. Each target represents a merchant-defined goal for a specific metric over a date range. - - Results can be filtered by metric, name, date range, or filter expression, and sorted by fields - such as `start_date`, `expected_value`, or `metric`. - - Use the [`analyticsTargetCreate`](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/analyticsTargetCreate) - mutation to add new targets. - """ - analyticsTargets( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | end_date | date | Filter by the end date of the target period. | | | - - `end_date:2026-03-31`
- `end_date:<=2026-03-31` | - | filters | string | Filter by the target's filter expression. | | | - `filters:"shipping_country = 'US'"` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | metric | string | Filter by metric identifier. | | | - `metric:total_sales` | - | name | string | Filter by target name. | | | - `name:Q1 Sales Target` | - | start_date | date | Filter by the start date of the target period. | | | - - `start_date:2026-01-01`
- `start_date:>=2026-01-01` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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: AnalyticsTargetSortKeys = ID - ): AnalyticsTargetConnection! @requiredAccess(scope: "`read_reports` access scope.") - - """ - 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 @gidTypes(types: ["App"]) - ): 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 - - """ - Credits that can be used towards future app purchases. - """ - appCredits( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! - - """ - An app discount type. - """ - appDiscountType( - """ - The ID for the function providing the app discount type. - """ - functionId: String! - ): AppDiscountType @requiredAccess(scope: "Apps must have `read_discounts` access scope.") - - """ - A list of app discount types installed by apps. - """ - appDiscountTypes: [AppDiscountType!]! @requiredAccess(scope: "Apps must have `read_discounts` access scope.") - - """ - A list of app discount types installed by apps. - """ - appDiscountTypesNodes( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @gidTypes(types: ["AppInstallation"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The category of app installations to fetch. - """ - category: AppInstallationCategory - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The privacy level of app installations to fetch. - """ - privacy: AppInstallationPrivacy = PUBLIC - - """ - 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 - ): AppInstallationConnection! - - """ - Returns a `Article` resource by ID. - """ - article( - """ - The ID of the `Article` to return. - """ - id: ID! @gidTypes(types: ["Article"]) - ): Article - - """ - List of article authors for the shop. - """ - articleAuthors( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ArticleAuthorConnection! @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") - - """ - List of all article tags. - """ - articleTags( - """ - The maximum number of tags to return. - """ - limit: Int! - - """ - Type of sort order. - """ - sort: ArticleTagSort = ALPHABETICAL - ): [String!]! @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- - `query=handle:summer-collection-announcement` | - | author | string | Filter by the author of the article. | - | blog_id | string | Filter by the ID of the blog the article belongs to. | - | | - `blog_id:1234`
- `blog_id:>=1234`
- `blog_id:<=1234` | - | blog_title | string | - | 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` | - | handle | string | Filter by the article's handle. | | | - - `handle:summer-collection-announcement`
- `handle:how-to-guide` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | published_status | string | Filter by published status | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the title of the article. | | | - `title:summer-collection`
- `title:green hoodie` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The assigment status of the fulfillment orders that should be returned. - If `assignmentStatus` argument is not provided, then - the query will return all assigned fulfillment orders, - except those that have the `CLOSED` status. - """ - assignmentStatus: FulfillmentOrderAssignmentStatus - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Returns fulfillment orders only for certain locations, specified by a list of location IDs. - """ - locationIds: [ID!] @gidTypes(types: ["Location"]) - - """ - 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! @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope.") - - """ - Returns a `DiscountAutomatic` resource by ID. - """ - automaticDiscount( - """ - The ID of the `DiscountAutomatic` to return. - """ - id: ID! @gidTypes(types: ["DiscountAutomaticBxgy", "DiscountAutomaticBasic", "DiscountAutomaticApp", "DiscountAutomaticFreeShipping"]) - ): DiscountAutomatic @deprecated(reason: "Use `automaticDiscountNode` instead.") - - """ - Returns a `DiscountAutomaticNode` resource by ID. - """ - automaticDiscountNode( - """ - The ID of the `DiscountAutomaticNode` to return. - """ - id: ID! @gidTypes(types: ["DiscountAutomaticNode"]) - ): DiscountAutomaticNode - - """ - Returns a list of [automatic discounts](https://help.shopify.com/manual/discounts/discount-types#automatic-discounts). - """ - automaticDiscountNodes( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | combines_with.product_discounts_with_tags_on_same_cart_line | string | - Filter by a combines with tag applied to discounts on the same cart line. - Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - - `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | status | string | Filter by the discount status. | - `active`
- - `expired`
- `scheduled` | | - `status:scheduled` | - | tag | string | Filter by a tag applied to the discount. | | | - `tag:loyalty`
- `tag:clearance` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): DiscountAutomaticNodeConnection! @deprecated(reason: "Use `discountNodes` instead.") @requiredAccess(scope: "Apps must have `read_discounts` access scope.") - - """ - List of the shop's automatic discount saved searches. - """ - automaticDiscountSavedSearches( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | combines_with.product_discounts_with_tags_on_same_cart_line | string | - Filter by a combines with tag applied to discounts on the same cart line. - Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - - `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | status | string | Filter by the discount status. | - `active`
- - `expired`
- `scheduled` | | - `status:scheduled` | - | tag | string | Filter by a tag applied to the discount. | | | - `tag:loyalty`
- `tag:clearance` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): 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( - """ - An array of destination country codes. - """ - destinationCountryCodes: [CountryCode!] - ): [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 the Balance account information for finance embedded apps. - """ - balanceAccount: BalanceAccount - - """ - Returns a `Blog` resource by ID. - """ - blog( - """ - The ID of the `Blog` to return. - """ - id: ID! @gidTypes(types: ["Blog"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | handle | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | title | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): BlogConnection! - - """ - Count of blogs. Limited to a maximum of 10000 by default. - """ - blogsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | handle | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | title | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): Count @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") - - """ - Returns a `BulkOperation` resource by ID. - """ - bulkOperation( - """ - The ID of the `BulkOperation` to return. - """ - id: ID! @gidTypes(types: ["BulkOperation"]) - ): BulkOperation - - """ - Returns the app's bulk operations meeting the specified filters. Defaults to - sorting by created_at, with newest operations first. - """ - bulkOperations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | Filter operations created after a specific date. | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | operation_type | string | Filter operations by type. | - `query`
- `mutation` | - | status | string | Filter operations by status. | - `canceled`
- - `canceling`
- `completed`
- `created`
- `failed`
- `running` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): BulkOperationConnection! - - """ - Returns the number of bundle products that have been created by the current app. - """ - bundleCount: Int! - - """ - 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 @gidTypes(types: ["BusinessEntity"]) - ): BusinessEntity - - """ - Returns a `DeliveryCarrierService` resource by ID. - """ - carrierService( - """ - The ID of the `DeliveryCarrierService` to return. - """ - id: ID! @gidTypes(types: ["CarrierService"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | active | boolean | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): DeliveryCarrierServiceConnection! @requiredAccess(scope: "`read_shipping` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CartTransformConnection! @requiredAccess(scope: "`read_cart_transforms` access scope.") - - """ - Returns a `CashDrawer` resource by ID. - """ - cashDrawer( - """ - The ID of the `CashDrawer` to return. - """ - id: ID! @gidTypes(types: ["CashDrawer"]) - ): CashDrawer @requiredAccess(scope: "`read_cash_tracking` access scope.") - - """ - A list of cash drawers in the shop. - """ - cashDrawers( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | location_id | id | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): CashDrawerConnection! @requiredAccess(scope: "`read_cash_tracking` access scope.") - - """ - Summary of cash management data for a location. - """ - cashManagementLocationSummary( - """ - The end date to summarize to. - """ - endDate: Date! - - """ - Identifies the location to get the summary for. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - The start date to summarize from. - """ - startDate: Date! - ): CashManagementSummary! @requiredAccess(scope: "`read_cash_tracking` access scope. Also: User must have `view_payment_tracking_sessions_pos_channel` or `payments_cash_session_history` retail role permission.") - - """ - Returns the cash management reason codes for the shop. - """ - cashManagementReasonCodes( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CashManagementReasonCodeConnection! @requiredAccess(scope: "`read_cash_tracking` access scope.") - - """ - Summary of cash management data across all locations with a POS Pro subscription for a shop, filtered by currency. - """ - cashManagementShopSummary( - """ - The currency code to filter by. - """ - currencyCode: CurrencyCode! - - """ - The end date to summarize to. - """ - endDate: Date! - - """ - The start date to summarize from. - """ - startDate: Date! - ): CashManagementSummary! @requiredAccess(scope: "`read_cash_tracking` access scope. Also: User must have `view_payment_tracking_sessions_pos_channel` or `payments_cash_session_history` retail role permission.") - - """ - Returns a `CashTrackingSession` resource by ID. - """ - cashTrackingSession( - """ - The ID of the `CashTrackingSession` to return. - """ - id: ID! @gidTypes(types: ["CashTrackingSession"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | closing_time | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | location_id | id | - | opening_time | time | - | point_of_sale_device_ids | string | - | status | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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! @gidTypes(types: ["Catalog"]) - ): Catalog - - """ - Returns the most recent catalog operations for the shop. - """ - catalogOperations: [ResourceOperation!]! @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | app_id | id | - | company_id | id | - | company_location_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | managed_country_id | id | - | market_id | id | - | status | string | - | title | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - - """ - The type of the catalogs to be returned. - """ - type: CatalogType = null - ): CatalogConnection! - - """ - The count of catalogs belonging to the shop. 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 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | app_id | id | - | company_id | id | - | company_location_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | managed_country_id | id | - | market_id | id | - | status | string | - | title | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The type of the catalogs to be returned. - """ - type: CatalogType = null - ): 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! @gidTypes(types: ["Channel", "Publication"]) - ): Channel - - """ - Returns a [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) - by its unique string handle. The handle is either set explicitly during [`channelCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/channelCreate) - or auto-generated from the specification handle and account ID. The channel - must belong to the calling application. - """ - channelByHandle( - """ - The unique handle of the [`Channel`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel) to return. - """ - handle: String! - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ChannelConnection! - - """ - A checkout and accounts configuration for a shop. - """ - checkoutAndAccountsConfiguration( - """ - The ID of the configuration. - """ - id: ID! @gidTypes(types: ["Configuration"]) - ): CheckoutAndAccountsConfiguration - - """ - List of checkout and accounts configurations on a shop. - """ - checkoutAndAccountsConfigurations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | is_published | boolean | - | one_page_checkout_enabled | boolean | - | typ_osp_pages_enabled | boolean | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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: CheckoutAndAccountsConfigurationsGraphQLSortKeys = ID - ): CheckoutAndAccountsConfigurationConnection - - """ - 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! @gidTypes(types: ["CheckoutProfile"]) - ): 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! @gidTypes(types: ["CheckoutProfile"]) - ): CheckoutProfile @deprecated(reason: "Use `checkoutAndAccountsConfiguration` instead.") @requiredAccess(scope: "access to the checkout and accounts editor.") - - """ - List of checkout profiles on a shop. - """ - checkoutProfiles( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | is_published | boolean | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): CheckoutProfileConnection! @deprecated(reason: "Use `checkoutAndAccountsConfigurations` instead.") @requiredAccess(scope: "access to the checkout and accounts editor.") - - """ - 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! @gidTypes(types: ["DiscountCodeNode"]) - ): DiscountCodeNode - - """ - 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 @requiredAccess(scope: "Apps must have `read_discounts` access scope.") - - """ - Returns a list of [code-based discounts](https://help.shopify.com/manual/discounts/discount-types#discount-codes). - """ - codeDiscountNodes( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | combines_with.product_discounts_with_tags_on_same_cart_line | string | - Filter by a combines with tag applied to discounts on the same cart line. - Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - - `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | - | 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'` | - | 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` | - | 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'` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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'` | - | status | string | Filter by the status of the discount. | - `active`
- - `expired`
- `scheduled` | | - `status:scheduled` | - | tag | string | Filter by a tag applied to the discount. | | | - `tag:loyalty`
- `tag:clearance` | - | 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` | - | title | string | Filter by the discount name that displays to customers. | | | - `title:Black Friday Sale` | - | 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` | - | 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'` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): DiscountCodeNodeConnection! @deprecated(reason: "Use `discountNodes` instead.") @requiredAccess(scope: "Apps must have `read_discounts` access scope.") - - """ - List of the shop's code discount saved searches. - """ - codeDiscountSavedSearches( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @gidTypes(types: ["Collection"]) - ): 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.") @requiredAccess(scope: "`read_products` access scope.") - - """ - Return a collection by an identifier. - """ - collectionByIdentifier( - """ - The identifier of the collection. - """ - identifier: CollectionIdentifierInput! - ): Collection @requiredAccess(scope: "`read_products` access scope.") - - """ - Lists all rules that can be used to create smart collections. - """ - collectionRulesConditions: [CollectionRuleConditions!]! - - """ - Returns a list of the shop's collection saved searches. - """ - collectionSavedSearches( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SavedSearchConnection! @requiredAccess(scope: "`read_products` access scope.") - - """ - 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. - - Manage both custom ([manual](https://help.shopify.com/manual/products/collections/manual-shopify-collection)) - and smart ([automated](https://help.shopify.com/manual/products/collections/automated-collections)) collections. - - 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 (for smart collections) - - Publishing status and publication details - - Metafields and custom attributes - - Learn more about [using metafields with smart collections](https://shopify.dev/docs/apps/build/custom-data/metafields/use-metafield-capabilities). - """ - collections( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | collection_type | string | | - `custom`
- `smart` | - | handle | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | product_id | id | Filter by collections containing a product by its ID. | - | 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` | - | 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` | - | published_at | time | Filter by the date and time when the collection was published to the Online Store. | - | 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` | - | title | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): CollectionConnection! - - """ - Count of collections. Limited to a maximum of 10000 by default. - """ - collectionsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | collection_type | string | | - `custom`
- `smart` | - | handle | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | product_id | id | Filter by collections containing a product by its ID. | - | 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` | - | 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` | - | published_at | time | Filter by the date and time when the collection was published to the Online Store. | - | 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` | - | title | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The ID of an existing saved search. - The search’s query string is used as the query argument. - Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): Count @requiredAccess(scope: "`read_products` access scope.") - - """ - Returns a `Comment` resource by ID. - """ - comment( - """ - The ID of the `Comment` to return. - """ - id: ID! @gidTypes(types: ["Comment"]) - ): Comment - - """ - List of the shop's comments. - """ - comments( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | published_status | string | Filter by published status | - `any`
- - `published`
- `unpublished` | | - `published_status:any`
- - `published_status:published`
- `published_status:unpublished` | - | status | string | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | active_customers_count | integer | - | created_at | time | - | external_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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"` | - | name | string | - | ordering_status | string | - | since_date | time | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CompanySortKeys = ID - ): 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 @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope. Also: The shop must have access to B2B. Some operations may require additional plan capabilities.") - - """ - Returns a `Company` resource by ID. - """ - company( - """ - The ID of the `Company` to return. - """ - id: ID! @gidTypes(types: ["Company"]) - ): Company - - """ - Returns a `CompanyContact` resource by ID. - """ - companyContact( - """ - The ID of the `CompanyContact` to return. - """ - id: ID! @gidTypes(types: ["CompanyContact"]) - ): CompanyContact - - """ - Returns a `CompanyContactRole` resource by ID. - """ - companyContactRole( - """ - The ID of the `CompanyContactRole` to return. - """ - id: ID! @gidTypes(types: ["CompanyContactRole"]) - ): CompanyContactRole - - """ - Returns a `CompanyLocation` resource by ID. - """ - companyLocation( - """ - The ID of the `CompanyLocation` to return. - """ - id: ID! @gidTypes(types: ["CompanyLocation"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | company_id | id | - | created_at | time | - | external_id | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | ids | string | - | 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"` | - | name | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CompanyLocationSortKeys = ID - ): CompanyLocationConnection! - - """ - Returns the customer privacy consent policies of a shop. - """ - consentPolicy( - """ - Return policies where consent is required or not. - """ - consentRequired: Boolean - - """ - Return policies with the provided country code. - """ - countryCode: PrivacyCountryCode - - """ - Return policies where data sale opt out is required or not. - """ - dataSaleOptOutRequired: Boolean - - """ - Return the policy with the provided ID. - """ - id: ID @gidTypes(types: ["ConsentPolicy"]) - - """ - Return policies with the provided region code. - """ - regionCode: String - ): [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). - Apps can run one bulk query and one bulk mutation operation at a time per shop. - - 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! @gidTypes(types: ["Customer"]) - ): Customer - - """ - Returns a `CustomerAccountPage` resource by ID. - """ - customerAccountPage( - """ - The ID of the `CustomerAccountPage` to return. - """ - id: ID! @gidTypes(types: ["CustomerAccountPage"]) - ): CustomerAccountPage - - """ - List of the shop's customer account pages. - """ - customerAccountPages( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CustomerAccountPageConnection - - """ - Returns the configured customer behavior tracking preference. - """ - customerBehaviorTrackingPreference: CustomerBehaviorTrackingPreference @privatelyDocumented - - """ - Retrieve a customer by consuming a single-use access token. Returns null - if the customer was not found or the access token has expired or has - already been consumed. - """ - customerByAccessToken( - """ - The customer access token. - """ - customerAccessToken: String! - ): Customer - - """ - Return a customer by an identifier. - """ - customerByIdentifier( - """ - The identifier of the customer. - """ - identifier: CustomerIdentifierInput! - ): Customer @requiredAccess(scope: "`read_customers` access scope.") - - """ - Returns the status of a customer merge request job. - """ - customerMergeJobStatus( - """ - The ID of the job performing the customer merge request. - """ - jobId: ID! @gidTypes(types: ["Job"]) - ): CustomerMergeRequest @requiredAccess(scope: "`read_customer_merge` access scope.") - - """ - Returns a preview of a customer merge request. - """ - customerMergePreview( - """ - The ID of the first customer that will be merged. - """ - customerOneId: ID! @gidTypes(types: ["Customer"]) - - """ - The ID of the second customer that will be merged. - """ - customerTwoId: ID! @gidTypes(types: ["Customer"]) - - """ - The fields to override the default customer merge rules. - """ - overrideFields: CustomerMergeOverrideFields - ): CustomerMergePreview! @requiredAccess(scope: "`read_customer_merge` access scope.") - - """ - 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! @gidTypes(types: ["CustomerPaymentMethod"]) - - """ - Whether to show the customer's revoked payment method. - """ - showRevoked: Boolean = false - ): CustomerPaymentMethod - - """ - List of the shop's customer saved searches. - """ - customerSavedSearches( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | name | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): SavedSearchConnection! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @gidTypes(types: ["CustomerSegmentMembersQuery"]) - - """ - Reverse the order of the list. The sorting behaviour defaults to ascending order. - """ - reverse: Boolean = false - - """ - The ID of the segment. - """ - segmentId: ID @gidTypes(types: ["Segment"]) - - """ - Sort the list by a given key. Valid values: - • `created_at` - Sort by customer creation date - • `first_order_date` - Sort by the date of the customer's first order - • `last_abandoned_order_date` - Sort by the date of the customer's last abandoned checkout - • `last_order_date` - Sort by the date of the customer's most recent order - • `number_of_orders` - Sort by the total number of orders placed by the customer - • `amount_spent` - Sort by the total amount the customer has spent across all orders - - Use with the `reverse` parameter to control sort direction (ascending by default, descending when reverse=true). - """ - sortKey: String - - """ - The timezone that's used to interpret relative date arguments. The timezone - defaults to UTC if the timezone isn't provided. - """ - timezone: String - ): CustomerSegmentMemberConnection! - - """ - Returns the total number of customers who match the criteria defined in a - customer segment. This count provides real-time visibility into segment size - for targeting and analysis purposes. - - For example, check the size of a "High-Value Customers" segment before launching a VIP program. - - The count reflects current segment membership based on the segment's filter - criteria, updating as customer data changes and new customers meet or no - longer meet the segment conditions. - """ - customerSegmentMembersCount( - """ - 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 @gidTypes(types: ["CustomerSegmentMembersQuery"]) - - """ - The ID of the segment. - """ - segmentId: ID @gidTypes(types: ["Segment"]) - ): Count @requiredAccess(scope: "`read_customers` access scope.") - - """ - Returns a `CustomerSegmentMembersQuery` resource by ID. - """ - customerSegmentMembersQuery( - """ - The ID of the `CustomerSegmentMembersQuery` to return. - """ - id: ID! @gidTypes(types: ["CustomerSegmentMembersQuery"]) - ): CustomerSegmentMembersQuery - - """ - Whether a member, which is a customer, belongs to a segment. - """ - customerSegmentMembership( - """ - The ID of the customer that has the membership. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - The segments to evaluate for the given customer. - """ - segmentIds: [ID!]! @gidTypes(types: ["Segment"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | accepts_marketing | boolean | Filter by whether a customer has consented - to receive marketing material. | | | - `accepts_marketing:true` | - | 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` | - | 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'` | - | 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:*` | - | first_name | string | Filter by the customer's first name. | | | - `first_name:Jane` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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'` | - | last_name | string | Filter by the customer's last name. | | | - `last_name:Reeves` | - | 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'` | - | orders_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` | - | 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:*` | - | 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` | - | 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'` | - | 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'` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): CustomerConnection! - - """ - The number of customers. Limited to a maximum of 10000 by default. - """ - customersCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): Count @requiredAccess(scope: "`read_customers` access scope.") - - """ - The paginated list of deletion events. - """ - deletionEvents( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | occurred_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - - """ - List of subject types to filter by. - """ - subjectTypes: [DeletionEventSubjectType!] - ): DeletionEventConnection! @deprecated(reason: "Use `events` instead.") - - """ - The delivery customization. - """ - deliveryCustomization( - """ - The ID of the delivery customization. - """ - id: ID! @gidTypes(types: ["DeliveryCustomization"]) - ): DeliveryCustomization @requiredAccess(scope: "`read_delivery_customizations` access scope.") - - """ - The delivery customizations. - """ - deliveryCustomizations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | enabled | boolean | - | function_id | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DeliveryCustomizationConnection! @requiredAccess(scope: "`read_delivery_customizations` access scope.") - - """ - 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! @gidTypes(types: ["Profile"]) - ): 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - If `true`, returns only delivery profiles that were created by the merchant. - """ - merchantOwnedOnly: Boolean - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | boolean | Filter by the delivery profile default status. | - `true`
- `false` | | - `default:true` | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | name | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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: DeliveryProfileSortKeys = ID - ): DeliveryProfileConnection! - - """ - Returns delivery promise participants. - """ - deliveryPromiseParticipants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The product variant ID to filter by. - """ - ownerIds: [ID!] @gidTypes(types: ["ProductVariant"]) - - """ - The owner type to filter by. - """ - ownerType: DeliveryPromiseParticipantOwnerType - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DeliveryPromiseParticipantConnection @requiredAccess(scope: "`read_delivery_promises` access scope.") - - """ - Lookup a delivery promise provider. - """ - deliveryPromiseProvider( - """ - The ID of the location associated with the delivery promise provider. - """ - locationId: ID! @gidTypes(types: ["Location"]) - ): DeliveryPromiseProvider @requiredAccess(scope: "`read_delivery_promises` access scope.") - - """ - Represents the delivery promise settings for a shop. - """ - deliveryPromiseSettings: DeliveryPromiseSetting! @requiredAccess(scope: "`read_shipping` access scope or `read_shop_promise_program` access scope.") - - """ - The total number of discount codes for the shop. Limited to a maximum of 10000 by default. - """ - discountCodesCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | times_used | integer | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): Count @requiredAccess(scope: "`read_discounts` access scope.") - - """ - Returns a `DiscountNode` resource by ID. - """ - discountNode( - """ - The ID of the `DiscountNode` to return. - """ - id: ID! @gidTypes(types: ["DiscountNode"]) - ): DiscountNode - - """ - Returns a list of discounts. - """ - discountNodes( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | code | string | Filter by the discount code. Not supported for bulk discounts. | | | - `code:WELCOME10` | - | 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` | - | combines_with.product_discounts_with_tags_on_same_cart_line | string | - Filter by a combines with tag applied to discounts on the same cart line. - Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - - `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | - | context | string | Filter by the context type. Supports multiple values - separated by commas (e.g., context:all,market). When multiple values are - provided, results include discounts that match any of them. | - `all`
- - `customer`
- `segment`
- `market` | | - `context:segment`
- - `context:all,market` | - | 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'` | - | customer_ids | string | Filter by specific customer IDs that are eligible - for the discount. | | | - `customer_ids:123456789`
- - `customer_ids:123,456` | - | 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` | - | 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` | - | 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'` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | market_ids | string | Filter by specific market IDs that are eligible for - the discount. Supports multiple IDs separated by commas (e.g., - market_ids:123,456). | | | - `market_ids:123456789`
- - `market_ids:123,456` | - | 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` | - | segment_ids | string | Filter by specific segment IDs that are eligible - for the discount. Supports multiple IDs separated by commas (e.g., - segment_ids:123,456). | | | - `segment_ids:123456789`
- - `segment_ids:123,456` | - | 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'` | - | 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` | - | tag | string | Filter by a tag applied to the discount. Supports multiple - tags separated by commas (e.g., tag:loyalty,clearance). | | | - - `tag:loyalty`
- `tag:loyalty,clearance` | - | 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` | - | title | string | Filter by the discount name that displays to merchants in - the Shopify admin and to customers. | | | - `title:Black Friday Sale` | - | 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` | - | 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'` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): DiscountNodeConnection! @requiredAccess(scope: "Apps must have `read_discounts` access scope.") - - """ - The total number of discounts for the shop. Limited to a maximum of 10000 by default. - """ - discountNodesCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | code | string | Filter by the discount code. Not supported for bulk discounts. | | | - `code:WELCOME10` | - | 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` | - | combines_with.product_discounts_with_tags_on_same_cart_line | string | - Filter by a combines with tag applied to discounts on the same cart line. - Supports multiple tags separated by commas (e.g., combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive). | | | - - `combines_with.product_discounts_with_tags_on_same_cart_line:priority`
- `combines_with.product_discounts_with_tags_on_same_cart_line:priority,exclusive` | - | context | string | Filter by the context type. Supports multiple values - separated by commas (e.g., context:all,market). When multiple values are - provided, results include discounts that match any of them. | - `all`
- - `customer`
- `segment`
- `market` | | - `context:segment`
- - `context:all,market` | - | 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'` | - | customer_ids | string | Filter by specific customer IDs that are eligible - for the discount. | | | - `customer_ids:123456789`
- - `customer_ids:123,456` | - | 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` | - | 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` | - | 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'` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | market_ids | string | Filter by specific market IDs that are eligible for - the discount. Supports multiple IDs separated by commas (e.g., - market_ids:123,456). | | | - `market_ids:123456789`
- - `market_ids:123,456` | - | 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` | - | segment_ids | string | Filter by specific segment IDs that are eligible - for the discount. Supports multiple IDs separated by commas (e.g., - segment_ids:123,456). | | | - `segment_ids:123456789`
- - `segment_ids:123,456` | - | 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'` | - | 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` | - | tag | string | Filter by a tag applied to the discount. Supports multiple - tags separated by commas (e.g., tag:loyalty,clearance). | | | - - `tag:loyalty`
- `tag:loyalty,clearance` | - | 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` | - | title | string | Filter by the discount name that displays to merchants in - the Shopify admin and to customers. | | | - `title:Black Friday Sale` | - | 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` | - | 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'` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The ID of an existing saved search. - The search’s query string is used as the query argument. - Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): Count @requiredAccess(scope: "`read_discounts` access scope.") - - """ - Returns a `DiscountRedeemCodeBulkCreation` resource by ID. - """ - discountRedeemCodeBulkCreation( - """ - The ID of the `DiscountRedeemCodeBulkCreation` to return. - """ - id: ID! @gidTypes(types: ["DiscountRedeemCodeBulkCreation"]) - ): DiscountRedeemCodeBulkCreation - - """ - List of the shop's redeemed discount code saved searches. - """ - discountRedeemCodeSavedSearches( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | times_used | integer | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): SavedSearchConnection! @requiredAccess(scope: "`read_discounts` access scope.") - - """ - Returns the discount resource feedback for the currently authenticated app. - """ - discountResourceFeedback( - """ - The discount associated with the resource feedback. - """ - id: ID! @gidTypes(types: ["DiscountNode"]) - ): DiscountResourceFeedback @requiredAccess(scope: "`read_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") - - """ - List of tags associated to discounts. - """ - discountTags( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | title | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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: DiscountTagSortKeys = ID - ): StringConnection! @requiredAccess(scope: "Apps must have `read_discounts` access scope.") - - """ - Returns a `ShopifyPaymentsDispute` resource by ID. - """ - dispute( - """ - The ID of the `ShopifyPaymentsDispute` to return. - """ - id: ID! @gidTypes(types: ["Dispute"]) - ): ShopifyPaymentsDispute - - """ - Returns a `ShopifyPaymentsDisputeEvidence` resource by ID. - """ - disputeEvidence( - """ - The ID of the `ShopifyPaymentsDisputeEvidence` to return. - """ - id: ID! @gidTypes(types: ["DisputeEvidence"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | initiated_at | time | - | status | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ShopifyPaymentsDisputeConnection! - - """ - Returns a `Domain` resource by ID. - """ - domain( - """ - The ID of the `Domain` to return. - """ - id: ID! @gidTypes(types: ["Domain"]) - ): 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! @gidTypes(types: ["DraftOrder"]) - ): 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 number of local pickup options required. - """ - localPickupCount: Int - - """ - The offset for the local pickup options. - """ - localPickupFrom: Int - - """ - The search term for the delivery options. - """ - search: String - - """ - Unique token used to trace execution and help optimize the calculation. - """ - sessionToken: String - ): DraftOrderAvailableDeliveryOptions! @requiredAccess(scope: "`read_draft_orders` access scope.") - - """ - List of the shop's draft order saved searches. - """ - draftOrderSavedSearches( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SavedSearchConnection! @requiredAccess(scope: "`read_draft_orders` access scope.") - - """ - Returns a `DraftOrderTag` resource by ID. - """ - draftOrderTag( - """ - The ID of the `DraftOrderTag` to return. - """ - id: ID! @gidTypes(types: ["DraftOrderTag"]) - ): DraftOrderTag - - """ - List of saved draft orders. - """ - draftOrders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | customer_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | source | string | - | status | string | - | tag | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): DraftOrderConnection! - - """ - Returns the number of draft orders that match the query. Limited to a maximum of 10000 by default. - """ - draftOrdersCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | customer_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | ids | string | - | source | string | - | status | string | - | tag | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The ID of an existing saved search. - The search’s query string is used as the query argument. - Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): Count @requiredAccess(scope: "`read_draft_orders` access scope.") - - """ - 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! @gidTypes(types: ["Event"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): EventConnection - - """ - Count of events. Limited to a maximum of 10000. - """ - eventsCount( - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | action | string | The action that occured. | | | - `action:create` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): Count - - """ - A list of the shop's file saved searches. - """ - fileSavedSearches( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SavedSearchConnection! @requiredAccess(scope: "`read_files` access scope or `read_themes` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | filename | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | ids | string | - | media_type | string | - | 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` | - | product_id | string | - | status | string | - | updated_at | time | - | used_in | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): FileConnection! @requiredAccess(scope: "`read_files` access scope, `read_themes` access scope or `read_images` access scope.") - - """ - Returns the access policy for a finance app . - """ - financeAppAccessPolicy: FinanceAppAccessPolicy! @requiredAccess(scope: "User session and api client must be valid.") - - """ - 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! @gidTypes(types: ["Fulfillment"]) - ): Fulfillment @requiredAccess(scope: "`read_orders` access scope, `read_marketplace_orders` access scope, `read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") - - """ - The fulfillment constraint rules that belong to a shop. - """ - fulfillmentConstraintRules: [FulfillmentConstraintRule!]! @requiredAccess(scope: "`read_fulfillment_constraint_rules` access scope.") - - """ - Returns a `FulfillmentOrder` resource by ID. - """ - fulfillmentOrder( - """ - The ID of the `FulfillmentOrder` to return. - """ - id: ID! @gidTypes(types: ["FulfillmentOrder"]) - ): 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Whether to include closed fulfillment orders. - """ - includeClosed: Boolean = false - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | assigned_location_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | status | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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! @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope, `read_merchant_managed_fulfillment_orders` access scope, `read_third_party_fulfillment_orders` access scope or `read_marketplace_fulfillment_orders` access scope.") - - """ - 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! @gidTypes(types: ["FulfillmentService"]) - ): 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! @gidTypes(types: ["GiftCard"]) - ): GiftCard @requiredAccess(scope: "`read_gift_cards` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document, including gift card codes. | | | - - `query=a5bh6h64b329j4k7`
- `query=Bob Norman` | - | balance_status | string | | - `full`
- `partial`
- `empty`
- - `full_or_partial` | | - `balance_status:full` | - | created_at | time | | | | - `created_at:>=2020-01-01T12:00:00Z` | - | customer_id | id | - | expires_on | date | | | | - `expires_on:>=2020-01-01` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | initial_value | string | | | | - `initial_value:>=100` | - | recipient_id | id | - | source | string | | - `manual`
- `purchased`
- `api_client` | | - `source:manual` | - | status | string | | - `disabled`
- `enabled`
- `expired`
- - `expiring` | | - `status:disabled OR status:expired` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): GiftCardConnection! @requiredAccess(scope: "`read_gift_cards` access scope.") - - """ - 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( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document, including gift card codes. | | | - - `query=a5bh6h64b329j4k7`
- `query=Bob Norman` | - | balance_status | string | | - `full`
- `partial`
- `empty`
- - `full_or_partial` | | - `balance_status:full` | - | created_at | time | | | | - `created_at:>=2020-01-01T12:00:00Z` | - | customer_id | id | - | expires_on | date | | | | - `expires_on:>=2020-01-01` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | initial_value | string | | | | - `initial_value:>=100` | - | recipient_id | id | - | source | string | | - `manual`
- `purchased`
- `api_client` | | - `source:manual` | - | status | string | | - `disabled`
- `enabled`
- `expired`
- - `expiring` | | - `status:disabled OR status:expired` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The ID of an existing saved search. - The search’s query string is used as the query argument. - Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): Count @requiredAccess(scope: "`read_gift_cards` access scope.") - - """ - Retrieves comprehensive details about a specific Hydrogen storefront by its - unique identifier. This query provides access to the complete storefront - configuration, deployment status, environment settings, and associated - metadata needed for development and management workflows. - - For example, when developers need to inspect a storefront's current deployment - state, environment variables, or customer account configuration before making - updates, this query returns all relevant information in a single request. - - Use the `hydrogenStorefront` query to: - - Fetch complete storefront configuration and status - - Retrieve deployment history and current version information - - Access environment-specific settings and variables - - Validate storefront setup before performing operations - - Monitor storefront health and deployment progress - - The query supports comprehensive filtering and returns detailed information - about storefront deployments, environment configurations, customer account - settings, and any associated background jobs. This makes it essential for - storefront management dashboards, CLI tools, and automated deployment systems. - - Background job tracking allows monitoring of asynchronous operations like - deployments or configuration updates, providing real-time status updates - through the job system. The response includes user error handling for cases - where the storefront doesn't exist or access is restricted. - - Environment variable access enables developers to verify configuration without - exposing sensitive values, while deployment information helps track version - history and rollback capabilities. - - Learn more about [managing Hydrogen storefronts](https://shopify.dev/docs/custom-storefronts/hydrogen/getting-started). - """ - hydrogenStorefront( - """ - The ID of the HydrogenStorefront to return. - """ - id: ID! - ): HydrogenStorefront! - - """ - Returns a HydrogenStorefrontJob by ID. - """ - hydrogenStorefrontJob( - """ - The ID of the HydrogenStorefrontJob to return. - """ - id: ID! - ): HydrogenStorefrontJob - - """ - Retrieves the complete collection of Hydrogen storefronts configured for a - merchant's shop, providing comprehensive access to custom storefront - implementations and their associated metadata. This query serves as the - primary entry point for managing multiple Hydrogen deployments within a single Shopify store. - - For example, a merchant running separate storefronts for different markets - (US, EU, Canada) or different brands under one Shopify account can query all - their Hydrogen implementations to monitor deployment status, manage - environment variables, or coordinate updates across multiple storefronts. - - Use the `HydrogenStorefronts` query to: - - Inventory all custom storefronts associated with a shop - - Monitor deployment status across multiple Hydrogen implementations - - Retrieve configuration details for storefront management operations - - Coordinate bulk operations across multiple storefront environments - - Access OAuth and authentication settings for each storefront - - This query supports comprehensive storefront portfolio management, enabling - developers to build CLI tools and dashboards that provide unified visibility - into complex multi-storefront architectures. The response includes detailed - configuration data, deployment information, and operational status for each - storefront instance. - - The query is particularly valuable for agencies or enterprise merchants - managing sophisticated headless commerce implementations where multiple - Hydrogen storefronts serve different customer segments, geographic regions, or - brand portfolios within a single Shopify backend. - - Learn more about [managing Hydrogen storefronts](https://shopify.dev/docs/custom-storefronts/hydrogen/getting-started). - """ - hydrogenStorefronts: [HydrogenStorefront!]! - - """ - A list of historical changes to inventory. Exactly one of `inventoryItemId` or `variantId` is required. - """ - inventoryHistory( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The ID of the inventory item. Only required if `variantId` is not supplied. - """ - inventoryItemId: ID @gidTypes(types: ["InventoryItem"]) - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The ID of the location. - """ - locationId: ID @gidTypes(types: ["Location"]) - - """ - 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: AdjustmentGroupSortKeys = CREATED_AT - - """ - The ID of the product variant. Only required if `inventoryItemId` is not supplied. - """ - variantId: ID @gidTypes(types: ["ProductVariant"]) - ): InventoryAdjustmentGroupConnection! - - """ - 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! @gidTypes(types: ["InventoryItem"]) - ): InventoryItem - - """ - Returns a list of inventory items. - """ - inventoryItems( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): 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! @gidTypes(types: ["InventoryLevel"]) - ): 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! @requiredAccess(scope: "`read_inventory` access scope.") - - """ - 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! @gidTypes(types: ["InventoryShipment"]) - ): InventoryShipment @requiredAccess(scope: "`read_inventory_shipments` access scope. Also: The user must have permission to view products.") - - """ - Returns a paginated list of [`InventoryShipment`](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryShipment) objects. - - Supports filtering by barcode (e.g. `barcode:"12345"`), status (e.g. - `status:"draft"` or `status:"in_transit"`), and destination (e.g. - `destination_id:12345`). - """ - inventoryShipments( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | barcode | string | - | destination_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | status | string | - | tracking_number | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - 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: InventoryShipmentSortKeys = ID - ): InventoryShipmentConnection @requiredAccess(scope: "`read_inventory_shipments` access scope.") - - """ - 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! @gidTypes(types: ["InventoryTransfer"]) - ): InventoryTransfer @requiredAccess(scope: "`read_inventory_transfers` access scope. Also: The user must have permission to view products.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | destination_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | origin_id | id | - | product_id | id | - | product_variant_id | id | - | source_id | id | - | status | string | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): InventoryTransferConnection! @requiredAccess(scope: "`read_inventory_transfers` access scope. Also: The user must have permission to view products.") - - """ - 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! @gidTypes(types: ["Job"]) - ): 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 @gidTypes(types: ["Location"]) - ): Location - - """ - Return a location by an identifier. - """ - locationByIdentifier( - """ - The identifier of the location. - """ - identifier: LocationIdentifierInput! - ): Location @requiredAccess(scope: "`read_locations` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Whether to include the locations that are deactivated. - """ - includeInactive: Boolean = false - - """ - Whether to include the legacy locations of fulfillment services. - """ - includeLegacy: Boolean = false - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | active | string | - | address1 | string | - | address2 | string | - | city | string | - | country | string | - | created_at | time | - | geolocated | boolean | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | legacy | boolean | - | location_id | id | - | name | string | - | pickup_in_store | string | | - `enabled`
- `disabled` | - | province | string | - | zip | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | active | string | - | address1 | string | - | address2 | string | - | city | string | - | country | string | - | created_at | time | - | geolocated | boolean | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | legacy | boolean | - | location_id | id | - | name | string | - | pickup_in_store | string | | - `enabled`
- `disabled` | - | province | string | - | zip | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): Count - - """ - Returns a list of fulfillment orders that are on hold. - """ - manualHoldsFulfillmentOrders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The query conditions used to filter fulfillment orders. Only fulfillment - orders corresponding to orders matching the query will be counted. - Supported filter parameters: - - `order_financial_status` - - `order_risk_level` - - `shipping_address_coordinates_validated` - - See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) - for more information about using filters. - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): FulfillmentOrderConnection! @requiredAccess(scope: "`read_orders` access scope.") - - """ - Returns a `Market` resource by ID. - """ - market( - """ - The ID of the `Market` to return. - """ - id: ID! @gidTypes(types: ["Market"]) - ): 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.") @requiredAccess(scope: "The user must have markets API access.") - - """ - A resource that can have localized values for different markets. - """ - marketLocalizableResource( - """ - Find a market localizable resource by ID. - """ - resourceId: ID! @gidTypes(types: ["TranslatableMetafieldProxy", "Metaobject"]) - ): MarketLocalizableResource @requiredAccess(scope: "`read_translations` access scope.") - - """ - Resources that can have localized values for different markets. - """ - marketLocalizableResources( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Return only resources of a type. - """ - resourceType: MarketLocalizableResourceType! - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MarketLocalizableResourceConnection! @requiredAccess(scope: "`read_translations` access scope.") - - """ - Resources that can have localized values for different markets. - """ - marketLocalizableResourcesByIds( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Return only resources for given IDs. - """ - resourceIds: [ID!]! @gidTypes(types: ["TranslatableMetafieldProxy", "Metaobject"]) - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MarketLocalizableResourceConnection! @requiredAccess(scope: "`read_translations` access scope.") - - """ - A list of marketing activities associated with the marketing app. - """ - marketingActivities( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The list of marketing activity IDs to filter by. - """ - marketingActivityIds: [ID!] = [] @gidTypes(types: ["MarketingActivity"]) - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | app_id | id | - | app_name | string | A comma-separated list of app names. | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | marketing_campaign_id | id | - | scheduled_to_end_at | time | - | scheduled_to_start_at | time | - | tactic | string | - | title | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The list of remote IDs associated with marketing activities to filter by. - """ - remoteIds: [String!] = [] - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - - """ - The UTM parameters associated with marketing activities to filter by. - """ - utm: UTMInput - ): MarketingActivityConnection! - - """ - Returns a `MarketingActivity` resource by ID. - """ - marketingActivity( - """ - The ID of the `MarketingActivity` to return. - """ - id: ID! @gidTypes(types: ["MarketingActivity"]) - ): MarketingActivity - - """ - Returns a `MarketingEvent` resource by ID. - """ - marketingEvent( - """ - The ID of the `MarketingEvent` to return. - """ - id: ID! @gidTypes(types: ["MarketingEvent"]) - ): MarketingEvent - - """ - A list of marketing events associated with the marketing app. - """ - marketingEvents( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | app_id | id | - | description | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | started_at | time | - | type | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): MarketingEventConnection! - - """ - Returns the current payment configuration for a shop for a marketplace. - """ - marketplacePaymentsConfiguration: MarketplacePaymentsConfiguration @requiredAccess(scope: "`read_marketplace_payments_configurations` access scope.") @privatelyDocumented - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - Filters markets by enabled status. - """ - enabled: Boolean = null - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | market_condition_types | string | A comma-separated list of condition types. | - | market_type | string | - | name | string | - | status | string | | - `ACTIVE`
- `DRAFT` | - | wildcard_company_location_with_country_code | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - - """ - Filters markets by type. - """ - type: MarketType = null - ): MarketConnection! @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - 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! @gidTypes(types: ["Menu"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | title | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): MenuConnection! - - """ - Count of menus. - """ - menusCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | title | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): Count @requiredAccess(scope: "`read_online_store_navigation` access scope and Shopify approved scope.") - - """ - 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.") @gidTypes(types: ["MetafieldDefinition"]) - - """ - The identifier of the MetafieldDefinition to return. - """ - identifier: MetafieldDefinitionIdentifierInput - ): MetafieldDefinition @requiredAccess(scope: "API client to have access to the resource type associated with the metafield definition.\n") - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - Filter metafield definitions based on whether they are constrained. - """ - constraintStatus: MetafieldDefinitionConstraintStatus - - """ - Filter metafield definitions based on whether they apply to a given resource subtype. - """ - constraintSubtype: MetafieldDefinitionConstraintSubtypeIdentifier - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Filter metafield definition by key. - """ - key: String - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): MetafieldDefinitionConnection! - - """ - A paginated list of metafields. - """ - metafields( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafields by namespace. - """ - namespace: String - - """ - Filter metafields to a specific owner. - Recommend using the `metafields` connection from [HasMetafields](https://shopify.dev/api/admin/graphql/reference/common-objects/HasMetafields) - directly from the owner instead. - """ - owner: ID! @gidTypes(types: ["HasMetafields"]) - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - 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! @gidTypes(types: ["Metaobject"]) - ): Metaobject @requiredAccess(scope: "`read_metaobjects` access scope.") - - """ - 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 @requiredAccess(scope: "`read_metaobjects` access scope.") - - """ - 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! @gidTypes(types: ["MetaobjectDefinition"]) - ): MetaobjectDefinition @requiredAccess(scope: "`read_metaobject_definitions` access scope.") - - """ - 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 @requiredAccess(scope: "`read_metaobject_definitions` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetaobjectDefinitionConnection! @requiredAccess(scope: "`read_metaobject_definitions` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | display_name | string | - | 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` | - | handle | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The key of a field to sort with. Supports "id", "type", "updated_at", and "display_name". - """ - sortKey: String - - """ - The type of the metaobjects to query. - """ - type: String! - ): MetaobjectConnection! @requiredAccess(scope: "`read_metaobjects` access scope.") - - """ - Return a mobile platform application by its ID. - """ - mobilePlatformApplication( - """ - ID of the mobile platform app. - """ - id: ID! - ): MobilePlatformApplication @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") - - """ - List the mobile platform applications. - """ - mobilePlatformApplications( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MobilePlatformApplicationConnection! @requiredAccess(scope: "`read_mobile_platform_applications` access scope. Please contact Shopify Support to enable this scope for your app.\n") - - """ - Determine if a shop is eligibile to sell NFTs. - """ - nftSalesEligibility: NftSalesEligibilityResult! - - """ - 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! @gidTypes(types: ["Node"]) - ): 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! @gidTypes(types: ["Order"]) - ): Order - - """ - Return an order by an identifier. - """ - orderByIdentifier( - """ - The identifier of the order. - """ - identifier: OrderIdentifierInput! - ): Order @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") - - """ - Returns a `OrderEditSession` resource by ID. - """ - orderEditSession( - """ - The ID of the `OrderEditSession` to return. - """ - id: ID! @gidTypes(types: ["OrderEditSession"]) - ): 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( - """ - ID of the order for which the payment was initiated. - """ - orderId: ID! @gidTypes(types: ["Order"]) - - """ - Unique identifier returned by orderCreatePayment. - """ - paymentReferenceId: String! - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SavedSearchConnection! @requiredAccess(scope: "`read_orders` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) - (`ChannelInformation.channelDefinition.handle`) field. | | | - - `channel:web`
- `channel:web,pos` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | 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"` | - | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) - field. | | | - `name:1001-A` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) - of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). - | - `has_issues`
- `no_issues`
- `not_validated` | | - - `shipping_address_validation_result_summary:no_issues` | - | 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` | - | 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` | - | 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` | - | status | string | Filter by the order's status to manage workflows or - analyze the order lifecycle. | - `open`
- `closed`
- - `cancelled`
- `not_closed` | | - `status:open` | - | 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` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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! - - """ - 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( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) - (`ChannelInformation.channelDefinition.handle`) field. | | | - - `channel:web`
- `channel:web,pos` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | 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"` | - | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) - field. | | | - `name:1001-A` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) - of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). - | - `has_issues`
- `no_issues`
- `not_validated` | | - - `shipping_address_validation_result_summary:no_issues` | - | 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` | - | 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` | - | 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` | - | status | string | Filter by the order's status to manage workflows or - analyze the order lifecycle. | - `open`
- `closed`
- - `cancelled`
- `not_closed` | | - `status:open` | - | 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` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The ID of an existing saved search. - The search’s query string is used as the query argument. - Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): Count @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") - - """ - Returns a `Page` resource by ID. - """ - page( - """ - The ID of the `Page` to return. - """ - id: ID! @gidTypes(types: ["Page"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | handle | string | Filter by the handle of the page. | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | published_status | string | Filter by published status | - | title | string | Filter by the title of the page. | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): 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 @requiredAccess(scope: "`read_content` access scope or `read_online_store_pages` access scope.") - - """ - The payment customization. - """ - paymentCustomization( - """ - The ID of the payment customization. - """ - id: ID! @gidTypes(types: ["PaymentCustomization"]) - ): PaymentCustomization @requiredAccess(scope: "`read_payment_customizations` access scope.") - - """ - The payment customizations. - """ - paymentCustomizations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | enabled | boolean | - | function_id | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): PaymentCustomizationConnection! @requiredAccess(scope: "`read_payment_customizations` access scope.") - - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") - - """ - Events that impact storefront performance, measured via RUM (Real User Monitoring). - """ - performanceEvents( - """ - Filters the RUM (Real User Monitoring) events for those created within the specified period. - """ - maxDays: Int = 90 - ): [PerformanceEvent!] - - """ - RUM (Real User Monitoring) performance metrics for a shop. - """ - performanceMetrics( - """ - Fetches RUM (Real User Monitoring) data for the specified aggregation level. - """ - aggregationLevel: PerformanceAggregationLevel = DAILY - - """ - Fetches RUM (Real User Monitoring) data for the specified device type. - """ - deviceTypes: [PerformanceDeviceType!] = [ALL] - - """ - Filters RUM (Real User Monitoring) data within the specified period. - """ - maxDays: Int = 90 - - """ - Specifies the storefront to return RUM (Real User Monitoring) data for. Can be a Hydrogen storefront ID - (e.g. `1234`) or `online_store` (defaults to `online_store`). - """ - storefrontId: String - ): [PerformanceMetrics!] - - """ - The set of features associated with a plan. - """ - planAddOnFeatureSet: [BillingPlanFeatureSection!]! - - """ - Returns a `PointOfSaleDevice` resource by ID. - """ - pointOfSaleDevice( - """ - The ID of the `PointOfSaleDevice` to return. - """ - id: ID! @gidTypes(types: ["PointOfSaleDevice"]) - ): PointOfSaleDevice - - """ - Lookup a point of sale device payment session by ID. - """ - pointOfSaleDevicePaymentSession( - """ - The ID of the point of sale device payment session. - """ - id: ID! @gidTypes(types: ["PointOfSaleDevicePaymentSession"]) - ): PointOfSaleDevicePaymentSession - - """ - A list of point of sale device payment sessions in the shop. - """ - pointOfSaleDevicePaymentSessions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | closing_date | date | - | closing_time | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | is_open | boolean | - | location_id | id | - | opening_date | date | - | opening_time | time | - | point_of_sale_device_id | id | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: PointOfSaleDevicePaymentSessionSortKeys = ID - ): PointOfSaleDevicePaymentSessionConnection! @requiredAccess(scope: "`read_cash_tracking` access scope.") - - """ - 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! @gidTypes(types: ["PriceList"]) - ): PriceList - - """ - All price lists for a shop. - """ - priceLists( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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.") @requiredAccess(scope: "The user must have markets API access.") - - """ - 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! @gidTypes(types: ["Product"]) - ): 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.") @requiredAccess(scope: "`read_products` access scope.") - - """ - Return a product by an identifier. - """ - productByIdentifier( - """ - The identifier of the product. - """ - identifier: ProductIdentifierInput! - ): Product @requiredAccess(scope: "`read_products` access scope.") - - """ - Returns the product duplicate job. - """ - productDuplicateJob( - """ - An ID of a product duplicate job to fetch. - """ - id: ID! @gidTypes(types: ["ProductDuplicateJob"]) - ): ProductDuplicateJob! - - """ - Returns a ProductFeed resource by ID. - """ - productFeed( - """ - The ID of the ProductFeed to return. - """ - id: ID! @gidTypes(types: ["ProductFeed"]) - ): ProductFeed @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - The product feeds for the shop. - """ - productFeeds( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductFeedConnection! @requiredAccess(scope: "`read_product_listings` access scope.") - - """ - 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! @gidTypes(types: ["ProductOperation"]) - ): 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 channel to filter resource feedback by. Use this when your app manages - multiple channels and each channel may have different feedback for the same product. - """ - channelId: ID @gidTypes(types: ["Channel"]) - - """ - The product associated with the resource feedback. - """ - id: ID! @gidTypes(types: ["Product"]) - ): ProductResourceFeedback @requiredAccess(scope: "`read_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.") - - """ - Returns a list of the shop's product saved searches. - """ - productSavedSearches( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SavedSearchConnection! @requiredAccess(scope: "`read_products` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): StringConnection @requiredAccess(scope: "Requires `read_products` access scope.") - - """ - Returns the nodes of the product taxonomy based on the arguments provided. - If a `search` argument is provided, then all nodes that match the search query globally are returned. - If a `children_of` argument is provided, then all children of the specified node are returned. - If a `siblings_of` argument is provided, then all siblings of the specified node are returned. - If no arguments are provided, then all the top-level nodes of the taxonomy are returned. - """ - productTaxonomyNodes( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The ID of the node associated with the child nodes to return. - """ - childrenOf: ID @gidTypes(types: ["ProductTaxonomyNode"]) - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Searches the product taxonomy for matching nodes. - """ - search: String - - """ - The ID of the node associated with the sibling nodes to return. - """ - siblingsOf: ID @gidTypes(types: ["ProductTaxonomyNode"]) - ): ProductTaxonomyNodeConnection! @deprecated(reason: "Use `taxonomy.categories` instead. This connection will be removed in the future.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): StringConnection @requiredAccess(scope: "Requires `read_products` access scope.") - - """ - 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! @gidTypes(types: ["ProductVariant"]) - ): ProductVariant - - """ - Return a product variant by an identifier. - """ - productVariantByIdentifier( - """ - The identifier of the product variant. - """ - identifier: ProductVariantIdentifierInput! - ): ProductVariant @requiredAccess(scope: "`read_products` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-123` | - | 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` | - | 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` | - | exclude_composite | boolean | Filter by product variants that aren't composites. | | | - `exclude_composite:true` | - | 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` | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_quantity | integer | Filter by an aggregate of inventory across - all locations where the product variant is stocked. | | | - - `inventory_quantity:10` | - | 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` | - | managed | boolean | Filter by whether there is fulfillment service - tracking associated with the product variants. | | | - `managed:true` | - | managed_by | string | Filter by the fulfillment service that tracks the - number of items in stock for the product variant. | | | - - `managed_by:shopify` | - | option1 | string | Filter by a custom property that a shop owner uses to - define product variants. | | | - `option1:small` | - | option2 | string | Filter by a custom property that a shop owner uses to - define product variants. | | | - `option2:medium` | - | option3 | string | Filter by a custom property that a shop owner uses to - define product variants. | | | - `option3:large` | - | product_id | id | Filter by the product [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-id) - field. | | | - `product_id:8474977763649` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | taxable | boolean | Filter by the product variant [`taxable`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-taxable) - field. | | | - `taxable:false` | - | title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) - field. | | | - `title:ice` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): ProductVariantConnection! - - """ - Count of product variants. Limited to a maximum of 10000 by default. - """ - productVariantsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - No supported search fields. - """ - query: String - ): Count @requiredAccess(scope: "`read_products` access scope.") - - """ - The list of vendors added to products. - The maximum page size is 1000. - """ - productVendors( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): StringConnection @requiredAccess(scope: "Requires `read_products` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-1234` | - | 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` | - | 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` | - | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) - field. | | | - `collection_id:108179161409` | - | 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` | - | 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'` | - | 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` | - | error_feedback | string | Filter by products with publishing errors. | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | 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` | - | has_only_composites | boolean | Filter by products that have only - composite variants. | | | - `has_only_composites:true` | - | 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` | - | has_variant_with_components | boolean | Filter by products that have - variants with associated components. | | | - - `has_variant_with_components:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_total | integer | Filter by inventory count. | | | - - `inventory_total:0`
- `inventory_total:>150`
- - `inventory_total:>=200` | - | 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` | - | 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"` | - | out_of_stock_somewhere | boolean | Filter by products that are out of - stock in at least one location. | | | - `out_of_stock_somewhere:true` | - | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) - field. | | | - `price:100.57` | - | 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` | - | 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` | - | product_type | string | Filter by a comma-separated list of [product - types](https://help.shopify.com/manual/products/details/product-type). | | | - - `product_type:snowboard` | - | publication_ids | string | Filter by a comma-separated list of publication - IDs that are associated with the product. | | | - - `publication_ids:184111530305,184111694145` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | `active` | - - `status:active,draft` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) - field. | | | - `title:The Minimal Snowboard` | - | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) - enabled. | | | - `tracks_inventory:true` | - | 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'` | - | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) - field. | | | - `variant_id:45779434701121` | - | 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'` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): ProductConnection! - - """ - Count of products. Limited to a maximum of 10000 by default. - """ - productsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-1234` | - | 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` | - | 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` | - | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) - field. | | | - `collection_id:108179161409` | - | 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` | - | 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'` | - | 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` | - | error_feedback | string | Filter by products with publishing errors. | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | 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` | - | has_only_composites | boolean | Filter by products that have only - composite variants. | | | - `has_only_composites:true` | - | 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` | - | has_variant_with_components | boolean | Filter by products that have - variants with associated components. | | | - - `has_variant_with_components:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_total | integer | Filter by inventory count. | | | - - `inventory_total:0`
- `inventory_total:>150`
- - `inventory_total:>=200` | - | 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` | - | 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"` | - | out_of_stock_somewhere | boolean | Filter by products that are out of - stock in at least one location. | | | - `out_of_stock_somewhere:true` | - | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) - field. | | | - `price:100.57` | - | 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` | - | 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` | - | product_type | string | Filter by a comma-separated list of [product - types](https://help.shopify.com/manual/products/details/product-type). | | | - - `product_type:snowboard` | - | publication_ids | string | Filter by a comma-separated list of publication - IDs that are associated with the product. | | | - - `publication_ids:184111530305,184111694145` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | `active` | - - `status:active,draft` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) - field. | | | - `title:The Minimal Snowboard` | - | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) - enabled. | | | - `tracks_inventory:true` | - | 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'` | - | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) - field. | | | - `variant_id:45779434701121` | - | 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'` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The ID of an existing saved search. - The search’s query string is used as the query argument. - Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): Count @requiredAccess(scope: "`read_products` access scope.") - - """ - 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! @gidTypes(types: ["Publication"]) - ): 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): PublicationConnection! @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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 @requiredAccess(scope: "`read_publications` access scope.") - - """ - Returns a count of published products by publication ID. Limited to a maximum of 10000 by default. - """ - publishedProductsCount( - """ - The maximum number of products to count. - """ - limit: Int = 10000 - - """ - The ID of the publication that the products are published to. - """ - publicationId: ID! @gidTypes(types: ["Publication"]) - ): Count @requiredAccess(scope: "`read_publications` access scope.") - - """ - 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! @gidTypes(types: ["Refund"]) - ): Refund @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") - - """ - 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) - of the return to retrieve. - """ - id: ID! @gidTypes(types: ["Return"]) - ): Return @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") - - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - A list of return reason definition handles to filter by. - """ - handles: [String!] - - """ - A list of return reason definition IDs to filter by. - """ - ids: [ID!] @gidTypes(types: ["ReturnReasonDefinition"]) - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | deleted | boolean | Filter by whether the return reason has been removed from taxonomy. | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | name | string | Filter by name. | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): ReturnReasonDefinitionConnection! @requiredAccess(scope: "`read_returns` access scope.") - - """ - Returns a `ReturnableFulfillment` resource by ID. - """ - returnableFulfillment( - """ - The ID of the `ReturnableFulfillment` to return. - """ - id: ID! @gidTypes(types: ["ReturnableFulfillment"]) - ): ReturnableFulfillment - - """ - List of returnable fulfillments. - """ - returnableFulfillments( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Order ID that will scope all returnable fulfillments. - """ - orderId: ID! @gidTypes(types: ["Order"]) - - """ - 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! @gidTypes(types: ["ReverseDelivery"]) - ): ReverseDelivery @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") - - """ - Lookup a reverse fulfillment order by ID. - """ - reverseFulfillmentOrder( - """ - The ID of the reverse fulfillment order to return. - """ - id: ID! @gidTypes(types: ["ReverseFulfillmentOrder"]) - ): ReverseFulfillmentOrder @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") - - """ -

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! @gidTypes(types: ["ScriptTag"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | src | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - 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! @gidTypes(types: ["Segment"]) - ): Segment - - """ - A list of filter suggestions associated with a segment. A segment is a group - of members (commonly customers) that meet specific criteria. - """ - segmentFilterSuggestions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int! - - """ - Returns the elements of a list by keyword or term. - """ - search: String! - ): SegmentFilterConnection! - - """ - A list of filters. - """ - segmentFilters( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - ): SegmentFilterConnection! - - """ - A list of a shop's segment migrations. - """ - segmentMigrations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Search a segment migration by its saved search ID. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): SegmentMigrationConnection! - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - Returns the elements of a list by filter handle. - """ - filterQueryName: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Returns the elements of a list by filter parameter name. - """ - functionParameterQueryName: String - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Returns the elements of a list by keyword or term. - """ - search: 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | name | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: SegmentSortKeys = CREATION_DATE - ): 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! @gidTypes(types: ["SellingPlanGroup"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | app_id | id | | - `CURRENT`
- `ALL`
- `* (numeric app ID)` | `CURRENT` | - | category | string | A comma-separated list of categories. | - - `SUBSCRIPTION`
- `PRE_ORDER`
- `TRY_BEFORE_YOU_BUY`
- `OTHER` | - | created_at | time | - | delivery_frequency | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | name | string | - | percentage_off | float | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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!]! @requiredAccess(scope: "`read_locales` access scope or `read_markets_home` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | source_identifier | string | Filter by the source identifier of the - payment request receipt. | | | - `source_identifier:1282823` | - | state | string | Filter by the state of the payment request receipt. - Options include: - COMPLETED - FAILED - PENDING - PROCESSING | | | - - `state:COMPLETED` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - Filter the functions by the API type. - """ - apiType: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Filter the functions by whether or not the function uses the creation UI in the Admin. - """ - useCreationUi: Boolean - ): 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 @accessRestricted(reason: "Requires the `read_shopify_payments` approval scope.") - - """ - 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 @requiredAccess(scope: "`read_reports` access scope. Also: Level 2 access to Customer data including name, address, phone, and email fields. Please refer to protected customer data [requirements](https:\/\/shopify.dev\/docs\/apps\/launch\/protected-customer-data).") - - """ - 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 @gidTypes(types: ["StaffMember"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | account_type | string | Filter by account type. | - `collaborator`
- - `collaborator_team_member`
- `invited`
- `regular`
- - `requested`
- `restricted`
- `saml` | - | email | string | Filter by email. | - | first_name | string | Filter by first name. | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | last_name | string | Filter by last name. | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - Filter standard metafield definitions based on whether they are constrained. - """ - constraintStatus: MetafieldDefinitionConstraintStatus - - """ - Filter standard metafield definitions based on whether they apply to a given resource subtype. - """ - constraintSubtype: MetafieldDefinitionConstraintSubtypeIdentifier - - """ - 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 last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @gidTypes(types: ["StoreCreditAccount"]) - ): StoreCreditAccount - - """ - Returns the store credit configuration for a shop, including whether store - credit is enabled for customers at checkout. Use this to display the current - state of a merchant's store credit program or check eligibility before issuing - store credit to customers. - """ - storeCreditConfiguration: StoreCreditConfiguration! - - """ - Returns a `SubscriptionBillingAttempt` resource by ID. - """ - subscriptionBillingAttempt( - """ - The ID of the `SubscriptionBillingAttempt` to return. - """ - id: ID! @gidTypes(types: ["SubscriptionBillingAttempt"]) - ): SubscriptionBillingAttempt - - """ - Returns subscription billing attempts on a store. - """ - subscriptionBillingAttempts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | error_code | string | - | error_message | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The ID of the billing cycle bulk operation job. - """ - jobId: ID! @gidTypes(types: ["Job"]) - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionBillingCycleConnection! - - """ - Returns subscription billing cycles for a contract ID. - """ - subscriptionBillingCycles( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - Select subscription billing cycles within a date range. - """ - billingCyclesDateRangeSelector: SubscriptionBillingCyclesDateRangeSelector - - """ - Select subscription billing cycles within an index range. - """ - billingCyclesIndexRangeSelector: SubscriptionBillingCyclesIndexRangeSelector - - """ - The ID of the subscription contract to retrieve billing cycles for. - """ - contractId: ID! @gidTypes(types: ["SubscriptionContract"]) - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @gidTypes(types: ["SubscriptionContract"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | last_billing_attempt_error_type | string | - | status | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): SubscriptionContractConnection! - - """ - Returns a Subscription Draft resource by ID. - """ - subscriptionDraft( - """ - The ID of the Subscription Draft to return. - """ - id: ID! @gidTypes(types: ["SubscriptionDraft"]) - ): SubscriptionDraft - - """ - Returns the payment gateway currently used for subscription charges on the - shop. Subscription orders may use a dedicated gateway separate from the shop's - primary payment provider. - """ - subscriptionGateway: SubscriptionGateway @requiredAccess(scope: "`read_payment_settings` access scope or `read_customer_payment_methods` access scope.") - - """ - Returns the list of payment gateways available for subscription contract - migrations, allowing merchants to move existing subscriptions from one payment - gateway to another. - """ - subscriptionMigrationGateways: [SubscriptionMigrationGateway!]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | point_of_sale_device_id | id | - | processed_at | time | - | test | boolean | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): 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! @gidTypes(types: ["ThemeType"]) - ): OnlineStoreTheme @requiredAccess(scope: "`read_themes` access scope.") - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The theme names to filter by. Use '*' to match zero or more characters. - """ - names: [String!] - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The theme roles to filter by. - """ - roles: [ThemeRole!] - ): OnlineStoreThemeConnection @requiredAccess(scope: "`read_themes` access scope.") - - """ - Whether the top level menu is discoverable. - """ - topLevelMenuDiscoverable: Boolean! @requiredAccess(scope: "Access only available to authorized apps.") @privatelyDocumented - - """ - 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! @gidTypes(types: ["Article", "ArticleImage", "Blog", "Brand", "Collection", "CollectionImage", "CookieBanner", "MethodDefinition", "EmailTemplate", "FilterSetting", "FilterSettingGroup", "Link", "MediaImage", "Menu", "TranslatableMetafieldProxy", "Metaobject", "Article", "OnlineStoreBlog", "Menu", "OnlineStorePage", "ThemeType", "AppEmbed", "JsonTemplate", "ThemeLocaleContent", "SectionGroup", "ThemeSettingsCategory", "ThemeSettingsDataSections", "PackingSlipTemplate", "Page", "PaymentGateway", "Product", "ProductOption", "ProductOptionValue", "SellingPlan", "SellingPlanGroup", "Shop", "ShopPolicy", "SmsTemplate"]) - ): TranslatableResource @requiredAccess(scope: "`read_translations` access scope.") - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Return only resources of a type. - """ - resourceType: TranslatableResourceType! - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): TranslatableResourceConnection! @requiredAccess(scope: "`read_translations` access scope.") - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Return only resources for given IDs. - """ - resourceIds: [ID!]! @gidTypes(types: ["Article", "ArticleImage", "Blog", "Brand", "Collection", "CollectionImage", "CookieBanner", "MethodDefinition", "EmailTemplate", "FilterSetting", "FilterSettingGroup", "Link", "MediaImage", "Menu", "TranslatableMetafieldProxy", "Metaobject", "Article", "OnlineStoreBlog", "Menu", "OnlineStorePage", "ThemeType", "AppEmbed", "JsonTemplate", "ThemeLocaleContent", "SectionGroup", "ThemeSettingsCategory", "ThemeSettingsDataSections", "PackingSlipTemplate", "Page", "PaymentGateway", "Product", "ProductOption", "ProductOptionValue", "SellingPlan", "SellingPlanGroup", "Shop", "ShopPolicy", "SmsTemplate"]) - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): TranslatableResourceConnection! @requiredAccess(scope: "`read_translations` access scope.") - - """ - Returns a `UrlRedirect` resource by ID. - """ - urlRedirect( - """ - The ID of the `UrlRedirect` to return. - """ - id: ID! @gidTypes(types: ["UrlRedirect"]) - ): UrlRedirect - - """ - Returns a `UrlRedirectImport` resource by ID. - """ - urlRedirectImport( - """ - The ID of the `UrlRedirectImport` to return. - """ - id: ID! @gidTypes(types: ["UrlRedirectImport"]) - ): UrlRedirectImport - - """ - A list of the shop's URL redirect saved searches. - """ - urlRedirectSavedSearches( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SavedSearchConnection! @requiredAccess(scope: "`read_online_store_navigation` access scope.") - - """ - A list of redirects for a shop. - """ - urlRedirects( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | path | string | - | target | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): UrlRedirectConnection! - - """ - Count of redirects. Limited to a maximum of 10000 by default. - """ - urlRedirectsCount( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | path | string | - | target | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - The ID of an existing saved search. - The search’s query string is used as the query argument. - Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - ): Count @requiredAccess(scope: "`read_online_store_navigation` access scope.") - - """ - Validation available on the shop. - """ - validation( - """ - The ID of the validation. - """ - id: ID! @gidTypes(types: ["Validation"]) - ): Validation @requiredAccess(scope: "`read_validations` access scope.") - - """ - Validations available on the shop. - """ - validations( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @requiredAccess(scope: "`read_validations` access scope.") - - """ - 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 @gidTypes(types: ["WebPixel"]) - ): WebPixel - - """ - The web presences for the shop. - """ - webPresences( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MarketWebPresenceConnection @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") - - """ - 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! @gidTypes(types: ["WebhookSubscription"]) - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - Callback URL to filter by. - """ - callbackUrl: URL @deprecated(reason: "Use `uri` instead.") - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Response format to filter by. - """ - format: WebhookSubscriptionFormat - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - - """ - List of webhook subscription topics to filter by. - """ - topics: [WebhookSubscriptionTopic!] - - """ - 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 - ): 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( - """ - The upper bound on count value before returning a result. Use `null` to have no limit. - """ - limit: Int = 10000 - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | endpoint | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | topic | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - ): 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") @protectedObject(subject: "customer") { - """ - A list of the refunded additional fees as part of this refund. - """ - additionalFees: [RefundAdditionalFee!]! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): RefundLineItemConnection! - - """ - The `RefundShippingLine` resources attached to the refund. - """ - refundShippingLines( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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( - """ - Whether to include refund transactions which have not completed yet (e.g delayed refunds). - """ - includeIncompleteTransactions: Boolean = false - ): MoneyBag! - - """ - The transactions associated with the refund. - """ - transactions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): OrderTransactionConnection! - - """ - The date and time when the refund was updated. - """ - updatedAt: DateTime! -} - -""" -Represents a refunded additional fee. -""" -type RefundAdditionalFee @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "returns") { - """ - The monetary amount refunded in shop and presentment currencies. - """ - amountSet: MoneyBag! - - """ - The associated additional fee that was refunded. - """ - originalAdditionalFee: AdditionalFee -} - -""" -The input fields required to reimburse additional fees on a refund. -""" -input RefundAdditionalFeeInput @componentName(name: "returns") { - """ - The ID of the additional fee in the refund. - """ - additionalFeeId: ID! @gidTypes(types: ["AdditionalFee"]) -} - -""" -An agreement between the merchant and customer to refund all or a portion of the order. -""" -type RefundAgreement implements SalesAgreement @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - The ID of the duty in the refund. - """ - dutyId: ID! @gidTypes(types: ["Duty"]) - - """ - The type of refund for this duty. - """ - refundType: RefundDutyRefundType -} - -""" -The type of refund to perform for a particular refund duty. -""" -enum RefundDutyRefundType @componentName(name: "returns") { - """ - The duty is fully refunded. - """ - FULL - - """ - The duty is proportionally refunded based on the quantity of the refunded line item. - """ - PROPORTIONAL -} - -""" -An auto-generated type which holds one Refund and a cursor during pagination. -""" -type RefundEdge @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - Whether to allow the total refunded amount to surpass the amount paid for the order. - """ - allowOverRefunding: Boolean = false - - """ - 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 - - """ - An optional reason for a discrepancy between calculated and actual refund amounts. - """ - discrepancyReason: OrderAdjustmentInputDiscrepancyReason - - """ - An optional note that's attached to the refund. - """ - note: String - - """ - Whether to send a refund notification to the customer. - """ - notify: Boolean - - """ - The ID of the order that's being refunded. - """ - orderId: ID! @gidTypes(types: ["Order"]) - - """ - 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 additional fees to refund. - """ - refundAdditionalFees: [RefundAdditionalFeeInput!] - - """ - A list of duties to refund. - """ - refundDuties: [RefundDutyInput!] - - """ - A list of line items to refund. - """ - refundLineItems: [RefundLineItemInput!] - - """ - A list of instructions to process the financial outcome of the refund. - """ - refundMethods: [RefundMethodInput!] = [] - - """ - The input fields that are required to reimburse shipping costs. - """ - shipping: ShippingRefundInput - - """ - A list of transactions involved in the refund. - """ - transactions: [OrderTransactionInput!] -} - -""" -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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") @protectedObject(subject: "customer") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - The ID of the line item in the refund. - """ - lineItemId: ID! @gidTypes(types: ["LineItem"]) - - """ - The intended location for restocking. If the `restockType` is set to `NO_RESTOCK`, then this value is empty. - """ - locationId: ID @gidTypes(types: ["Location"]) - - """ - The quantity of the associated line item to be refunded. - """ - quantity: Int! - - """ - The type of restock for this line item. - """ - restockType: RefundLineItemRestockType -} - -""" -The type of restock performed for a particular refund line item. -""" -enum RefundLineItemRestockType @componentName(name: "returns") { - """ - 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 refund line item was returned. Use this when restocking line items that were fulfilled. - """ - RETURN -} - -""" -The different methods that a refund amount can be allocated to. -""" -enum RefundMethodAllocation @componentName(name: "sales") { - """ - 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 @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - Whether to refund the full shipping amount. - """ - fullRefund: Boolean = false - - """ - 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 -} - -""" -A shipping line item that's included in a refund. -""" -type RefundShippingLine implements Node @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - The application level for the condition. - """ - applicationLevel: MarketConditionApplicationType - - """ - The regions that comprise the market. - """ - regions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MarketRegionConnection! -} - -""" -The input fields for a remote Adyen customer payment method. -""" -input RemoteAdyenPaymentMethodInput @componentName(name: "payments") { - """ - The billing address. - """ - billingAddress: MailingAddressInput - - """ - The `shopper_reference` value from Adyen. - """ - shopperReference: String! - - """ - The `stored_payment_method_id` value from Adyen. - """ - storedPaymentMethodId: String! -} - -""" -The input fields for a remote Authorize.net customer payment profile. -""" -input RemoteAuthorizeNetCustomerPaymentProfileInput @componentName(name: "payments") { - """ - The billing address. - """ - billingAddress: MailingAddressInput - - """ - The customerPaymentProfileId value from the Authorize.net API. - """ - customerPaymentProfileId: String! - - """ - The customerProfileId value from the Authorize.net API. - """ - customerProfileId: String! -} - -""" -The input fields for a remote Braintree customer payment profile. -""" -input RemoteBraintreePaymentMethodInput @componentName(name: "payments") { - """ - The billing address. - """ - billingAddress: MailingAddressInput - - """ - The `customer_id` value from the Braintree API. - """ - customerId: String! - - """ - The `payment_method_token` value from the Braintree API. - """ - paymentMethodToken: String! -} - -""" -The input fields for a remote PayPal customer payment method. -""" -input RemotePaypalPaymentMethodInput @componentName(name: "payments") { - """ - The billing address. - """ - billingAddress: MailingAddressInput! - - """ - The billing agreement ID from PayPal that starts with 'B-' (for example, `B-1234XXXXX`). - """ - billingAgreementId: String! -} - -""" -The input fields for a remote stripe payment method. -""" -input RemoteStripePaymentMethodInput @componentName(name: "payments") { - """ - The billing address. - """ - billingAddress: MailingAddressInput - - """ - The customer_id value from the Stripe API. - """ - customerId: String! - - """ - The payment_method_id value from the Stripe API. - """ - paymentMethodId: String! -} - -""" -Return type for `removeFromReturn` mutation. -""" -type RemoveFromReturnPayload @componentName(name: "platform") { - """ - The modified return. - """ - return: Return - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ReturnUserError!]! -} - -""" -The resolved price inclusivity attributes. -""" -type ResolvedPriceInclusivity @requiredAccess(scope: "`read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.") @componentName(name: "markets") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - A checkmark inside a circle. - """ - CHECKMARK_CIRCLE - - """ - A lowercase `i` inside a circle. - """ - INFORMATION_CIRCLE - - """ - A user behaviour indicator on nested circles in subdued color. - """ - MARKETING_MINOR_OFF - - """ - A user behaviour indicator on nested circles. - """ - MARKETING_MINOR_ON -} - -""" -The possible severity levels for a resource alert. -""" -enum ResourceAlertSeverity @componentName(name: "sales") { - """ - Indicates a critical alert. For example, a blocked app. - """ - CRITICAL - - """ - Indicates a neutral alert. For example, an accepted dispute. - """ - DEFAULT - ERROR @deprecated(reason: "`ERROR` severity is being deprecated in favour of `WARNING` or `CRITICAL` instead.") - - """ - Indicates an informative alert. For example, an escalated dispute. - """ - INFO - - """ - Indicates a success alert. For example, a winning a dispute. - """ - SUCCESS - - """ - Indicates an informative alert. For example, a new dispute. - """ - WARNING -} - -""" -Represents feedback from apps about a resource, and the steps required to set up the apps on the shop. -""" -type ResourceFeedback @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "apps") { - """ - 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 @componentName(name: "apps") { - """ - The ID of the channel that the feedback is for. Used to scope feedback to a - specific sales channel when the app has multiple channels. - """ - channelId: ID @gidTypes(types: ["Channel"]) - - """ - 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 @componentName(name: "apps") { - """ - 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 @requiredAccess(scope: "`read_products` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Operation is currently running. - """ - ACTIVE - - """ - Operation is complete. - """ - COMPLETE - - """ - Operation has been created. - """ - CREATED -} - -""" -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 @componentName(name: "merchandising") { - """ - 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 publication status of the resource on the channel. - """ - publicationStatusOnChannel: ResourcePublicationStatus! @deprecated(reason: "Publication status is no longer available and will be removed in a future release.") - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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! -} - -""" -The status of the resource publication on the channel. -""" -enum ResourcePublicationStatus @componentName(name: "merchandising") { - """ - Approved status. - """ - APPROVED - - """ - Not approved status. - """ - NOT_APPROVED - - """ - Pending status. - """ - PENDING - - """ - Unset status. - """ - UNSET -} - -""" -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 @componentName(name: "merchandising") { - """ - 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 publication status of the resource on the channel. - """ - publicationStatusOnChannel: ResourcePublicationStatus! @deprecated(reason: "Publication status is no longer available and will be removed in a future release.") - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - The value of the fee as a percentage. - """ - percentage: Float! -} - -""" -Information about product is restricted for a given resource. -""" -type RestrictedForResource @requiredAccess(scope: "`read_order_edits` access scope or `read_publications` access scope.") @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - 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 - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter exchange line items by processing status. - """ - processingStatus: ReturnProcessingStatusFilterInput - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter return line items by processing status. - """ - processingStatus: ReturnProcessingStatusFilterInput - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ReturnLineItemConnection! - - """ - The return shipping fees for the return. - """ - returnShippingFees: [ReturnShippingFee!]! - - """ - The list of reverse fulfillment orders for the return. - """ - reverseFulfillmentOrders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 exchange line items from the return to include in the outcome. - """ - exchangeLineItems: [SuggestedOutcomeExchangeLineItemInput!]! - - """ - The additional fees from the associated order to include as a refund. - """ - refundAdditionalFees: [RefundAdditionalFeeInput!] - - """ - 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 - - """ - The shipping amount from the associated order to include as a refund. - """ - refundShipping: RefundShippingInput - - """ - The line items from the return to include in the outcome. - """ - returnLineItems: [SuggestedOutcomeReturnLineItemInput!]! - - """ - ID of the tip line item. - """ - tipLineId: ID @gidTypes(types: ["LineItem"]) - ): SuggestedReturnFinancialOutcome - - """ - A suggested refund for the return. - """ - suggestedRefund( - """ - The additional fees from the associated order to include in the refund. - """ - refundAdditionalFees: [RefundAdditionalFeeInput!] - - """ - The duties from to associated order to include in the refund. - """ - refundDuties: [RefundDutyInput!] - - """ - The shipping amount from the associated order to include in the refund. - """ - refundShipping: RefundShippingInput - - """ - The line items from the return to include in the refund. - """ - returnRefundLineItems: [ReturnRefundLineItemInput!]! - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "returns") { - """ - The ID of the return that's being approved. - """ - id: ID! @gidTypes(types: ["Return"]) - - """ - 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 @componentName(name: "platform") { - """ - The approved return. - """ - return: Return - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ReturnUserError!]! -} - -""" -Return type for `returnCancel` mutation. -""" -type ReturnCancelPayload @componentName(name: "platform") { - """ - The canceled return. - """ - return: Return - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ReturnUserError!]! -} - -""" -Return type for `returnClose` mutation. -""" -type ReturnClosePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - The return contains final sale items. - """ - FINAL_SALE - - """ - The return is declined for another reason. - """ - OTHER - - """ - The return period has ended. - """ - RETURN_PERIOD_ENDED -} - -""" -The input fields for declining a customer's return request. -""" -input ReturnDeclineRequestInput @componentName(name: "returns") { - """ - The notification message that's sent to a customer about their declined return request. - Maximum length: 500 characters. - """ - declineNote: String - - """ - The reason why the merchant declined the customer's return request. - """ - declineReason: ReturnDeclineReason! - - """ - The ID of the return that's being declined. - """ - id: ID! @gidTypes(types: ["Return"]) - - """ - Notify the customer when a return request is declined. - The customer will only receive a notification if `Order.email` is present. - """ - notifyCustomer: Boolean = false -} - -""" -Return type for `returnDeclineRequest` mutation. -""" -type ReturnDeclineRequestPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - The requested resource already exists. - """ - ALREADY_EXISTS - - """ - The input value is blank. - """ - BLANK - - """ - A requested resource could not be created. - """ - CREATION_FAILED - - """ - The input value should be equal to the value allowed. - """ - EQUAL_TO - - """ - A required feature is not enabled. - """ - FEATURE_NOT_ENABLED - - """ - 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 - - """ - Unexpected internal error happened. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - A resource was not in the correct state for the operation to succeed. - """ - INVALID_STATE - - """ - 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 user does not have permission to perform the operation. - """ - MISSING_PERMISSION - - """ - A requested notification could not be sent. - """ - NOTIFICATION_FAILED - - """ - The input value is not a number. - """ - NOT_A_NUMBER - - """ - A requested item is not editable. - """ - NOT_EDITABLE - - """ - A requested item could not 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 - - """ - Too many arguments provided. - """ - TOO_MANY_ARGUMENTS - - """ - The input value is too short. - """ - TOO_SHORT - - """ - The input value is the wrong length. - """ - WRONG_LENGTH -} - -""" -The input fields for a return. -""" -input ReturnInput @componentName(name: "returns") { - """ - The new line items to be added to the order. - """ - exchangeLineItems: [ExchangeLineItemInput!] - - """ - 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.") - - """ - The ID of the order to be returned. - """ - orderId: ID! @gidTypes(types: ["Order"]) - - """ - The UTC date and time when the return was first solicited by the customer. - """ - requestedAt: DateTime - - """ - The return line items list to be handled. - """ - returnLineItems: [ReturnLineItemInput!]! - - """ - The return shipping fee to capture. - """ - returnShippingFee: ReturnShippingFeeInput - - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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! -} - -""" -An auto-generated type for paginating through multiple ReturnLineItems. -""" -type ReturnLineItemConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [ReturnLineItemEdge!]! - - """ - A list of nodes that are contained in ReturnLineItemEdge. 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: [ReturnLineItem!]! - - """ - 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 ReturnLineItem and a cursor during pagination. -""" -type ReturnLineItemEdge @componentName(name: "returns") { - """ - 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 ReturnLineItemEdge. - """ - node: ReturnLineItem! -} - -""" -The input fields for a return line item. -""" -input ReturnLineItemInput @componentName(name: "returns") { - """ - The ID of the fulfillment line item to be returned. - Specifically, this field expects a `FulfillmentLineItem.id`. - """ - fulfillmentLineItemId: ID! @gidTypes(types: ["FulfillmentLineItem"]) - - """ - The quantity of the item to be returned. - """ - quantity: Int! - - """ - The restocking fee to capture. - """ - restockingFee: RestockingFeeInput - - """ - 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 @gidTypes(types: ["ReturnReasonDefinition"]) - - """ - A note about the reason that the item is being returned. - Maximum length: 255 characters. - """ - returnReasonNote: String = "" -} - -""" -The input fields for a removing a return line item from a return. -""" -input ReturnLineItemRemoveFromReturnInput @componentName(name: "returns") { - """ - The quantity of the associated return line item to be removed. - """ - quantity: Int! - - """ - The ID of the return line item to remove. - """ - returnLineItemId: ID! @gidTypes(types: ["ReturnLineItem"]) -} - -""" -Return type for `returnLineItemRemoveFromReturn` mutation. -""" -type ReturnLineItemRemoveFromReturnPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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! -} - -""" -The financial transfer details for the return outcome. -""" -union ReturnOutcomeFinancialTransfer @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") = InvoiceReturnOutcome | RefundReturnOutcome - -""" -The input fields for an exchange line item. -""" -input ReturnProcessExchangeLineItemInput @componentName(name: "returns") { - """ - The ID of the exchange line item. - """ - id: ID! @gidTypes(types: ["ExchangeLineItem"]) - - """ - The quantity of the exchange line item. - """ - quantity: Int! -} - -""" -The input fields for the financial transfer for the return. -""" -input ReturnProcessFinancialTransferInput @oneOf @componentName(name: "returns") { - """ - Issue a refund for the return. - """ - issueRefund: ReturnProcessRefundInput -} - -""" -The input fields for processing a return. -""" -input ReturnProcessInput @componentName(name: "returns") { - """ - The exchange line items list to be handled. - """ - exchangeLineItems: [ReturnProcessExchangeLineItemInput!] = [] - - """ - The financial transfer for the return. - """ - financialTransfer: ReturnProcessFinancialTransferInput - - """ - The note for the return. - """ - note: String - - """ - Whether to notify the customer about the return. - """ - notifyCustomer: Boolean = false - - """ - The refund duties list to be handled. - """ - refundDuties: [RefundDutyInput!] = [] - - """ - The shipping cost to refund. - """ - refundShipping: RefundShippingInput - - """ - The ID of the return to be processed. - """ - returnId: ID! @gidTypes(types: ["Return"]) - - """ - The return line items list to be handled. - """ - returnLineItems: [ReturnProcessReturnLineItemInput!] = [] - - """ - ID of the tip line item. - """ - tipLineId: ID @gidTypes(types: ["LineItem"]) -} - -""" -Return type for `returnProcess` mutation. -""" -type ReturnProcessPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - The dispositions for the return line item. - """ - dispositions: [ReverseFulfillmentOrderDisposeInput!] - - """ - The ID of the return line item. - """ - id: ID! @gidTypes(types: ["ReturnLineItem"]) - - """ - The quantity of the return line item. - """ - quantity: Int! -} - -""" -Filter line items based on processing status. -""" -enum ReturnProcessingStatusFilterInput @componentName(name: "returns") { - """ - Only include line items that have some processable quantity. - """ - PROCESSABLE - - """ - Only include line items that have been processed. - """ - PROCESSED -} - -""" -The reason for returning the return line item. -""" -enum ReturnReason @componentName(name: "returns") { - """ - The item is returned because the buyer did not like the color. Displays as **Color**. - """ - COLOR - - """ - The item is returned because it is damaged or defective. Displays as **Damaged or defective**. - """ - DEFECTIVE - - """ - The item is returned because it was not as described. Displays as **Item not as described**. - """ - NOT_AS_DESCRIBED - - """ - 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 the size was too large. Displays as **Size was too large**. - """ - SIZE_TOO_LARGE - - """ - 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 buyer did not like the style. Displays as **Style**. - """ - STYLE - - """ - The item is returned because of an unknown reason. Displays as **Unknown**. - """ - UNKNOWN - - """ - The item is returned because the customer changed their mind. Displays as **Customer changed their mind**. - """ - UNWANTED - - """ - The item is returned because the customer received the wrong one. Displays as **Received the wrong item**. - """ - WRONG_ITEM -} - -""" -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 @requiredAccess(scope: "`read_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - An optional note that's attached to the refund. - """ - note: String - - """ - Whether to send a refund notification to the customer. - """ - notifyCustomer: Boolean = false - - """ - A list of transactions involved in refunding the return. - """ - orderTransactions: [ReturnRefundOrderTransactionInput!] = [] - - """ - A list of duties to refund. - """ - refundDuties: [RefundDutyInput!] - - """ - The shipping amount to refund. - """ - refundShipping: RefundShippingInput - - """ - The ID of the return. - """ - returnId: ID! @gidTypes(types: ["Return"]) - - """ - A list of return line items to refund. - """ - returnRefundLineItems: [ReturnRefundLineItemInput!]! -} - -""" -The input fields for a return refund line item. -""" -input ReturnRefundLineItemInput @componentName(name: "returns") { - """ - The quantity of the return line item to be refunded. - """ - quantity: Int! - - """ - The ID of the return line item to be refunded. - """ - returnLineItemId: ID! @gidTypes(types: ["ReturnLineItem"]) -} - -""" -The input fields to create order transactions when refunding a return. -""" -input ReturnRefundOrderTransactionInput @componentName(name: "returns") { - """ - The ID of the parent order transaction. The transaction must be of kind `CAPTURE` or a `SALE`. - """ - parentId: ID! @gidTypes(types: ["OrderTransaction"]) - - """ - The amount of money for the transaction in the presentment currency of the order. - """ - transactionAmount: MoneyInput! -} - -""" -Return type for `returnRefund` mutation. -""" -type ReturnRefundPayload @componentName(name: "platform") { - """ - The created refund. - """ - refund: Refund - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ReturnUserError!]! -} - -""" -Return type for `returnReopen` mutation. -""" -type ReturnReopenPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - The ID of the order that's being returned. - """ - orderId: ID! @gidTypes(types: ["Order"]) - - """ - 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 @componentName(name: "returns") { - """ - 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 - - """ - The ID of the fulfillment line item to be returned. - Specifically, this field expects a `FulfillmentLineItem.id`. - """ - fulfillmentLineItemId: ID! @gidTypes(types: ["FulfillmentLineItem"]) - - """ - 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 @gidTypes(types: ["ReturnReasonDefinition"]) -} - -""" -Return type for `returnRequest` mutation. -""" -type ReturnRequestPayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - The return has been canceled. - """ - CANCELED - - """ - The return has been completed. - """ - CLOSED - - """ - The return was declined. - """ - DECLINED - - """ - The return is in progress. - """ - OPEN - - """ - The return was requested. - """ - REQUESTED -} - -""" -An error that occurs during the execution of a return mutation. -""" -type ReturnUserError implements DisplayableError @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope. Also: Requires the `read_returns` access scope.") @componentName(name: "returns") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ReturnableFulfillmentLineItemConnection! -} - -""" -An auto-generated type for paginating through multiple ReturnableFulfillments. -""" -type ReturnableFulfillmentConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope. Also: Requires the `read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") = ReverseDeliveryShippingDeliverable - -""" -An auto-generated type which holds one ReverseDelivery and a cursor during pagination. -""" -type ReverseDeliveryEdge @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") @protectedObject(subject: "customer") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - The quantity of the item to be included in the delivery. - """ - quantity: Int! - - """ - The ID of the related reverse fulfillment order line item. - """ - reverseFulfillmentOrderLineItemId: ID! @gidTypes(types: ["ReverseFulfillmentOrderLineItem"]) -} - -""" -A reverse shipping deliverable that may include a label and tracking information. -""" -type ReverseDeliveryShippingDeliverable @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") @protectedObject(subject: "customer") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - A globally-unique ID. - """ - id: ID! - - """ - The list of reverse fulfillment order line items for the reverse fulfillment order. - """ - lineItems( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - The final arrangement for the reverse fulfillment order line item. - """ - dispositionType: ReverseFulfillmentOrderDispositionType! - - """ - 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 @gidTypes(types: ["Location"]) - - """ - The quantity of the reverse fulfillment order line item to dispose. - """ - quantity: Int! - - """ - The ID of the reverse fulfillment order line item. - """ - reverseFulfillmentOrderLineItemId: ID! @gidTypes(types: ["ReverseFulfillmentOrderLineItem"]) -} - -""" -Return type for `reverseFulfillmentOrderDispose` mutation. -""" -type ReverseFulfillmentOrderDisposePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - An item that was expected but absent. - """ - MISSING - - """ - An item that wasn't restocked. - """ - NOT_RESTOCKED - - """ - An item that requires further processing before being restocked or discarded. - """ - PROCESSING_REQUIRED - - """ - An item that was restocked. - """ - RESTOCKED -} - -""" -An auto-generated type which holds one ReverseFulfillmentOrder and a cursor during pagination. -""" -type ReverseFulfillmentOrderEdge @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - 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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - The status of the reverse fulfillment order third-party confirmation. - """ - status: ReverseFulfillmentOrderThirdPartyConfirmationStatus! -} - -""" -The status of a reverse fulfillment order third-party confirmation. -""" -enum ReverseFulfillmentOrderThirdPartyConfirmationStatus @componentName(name: "returns") { - """ - 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 @componentName(name: "reviews") { - """ - Indicates a high likelihood that the order is fraudulent. - """ - HIGH - - """ - Indicates a low likelihood that the order is fraudulent. - """ - LOW - - """ - Indicates a medium likelihood that the order is fraudulent. - """ - MEDIUM - - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { - """ - 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 @componentName(name: "reviews") { - """ - A negative contributor that increases the risk. - """ - NEGATIVE - - """ - A neutral contributor with regards to risk. - """ - NEUTRAL - - """ - A positive contributor that lowers the risk. - """ - POSITIVE -} - -""" -A row count represents rows on background operation. -""" -type RowCount @requiredAccess(scope: "`read_products` access scope. Also: The user must have permission to view catalogs.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - SEO Description. - """ - description: String - - """ - SEO Title. - """ - title: String -} - -""" -The input fields for SEO information. -""" -input SEOInput @componentName(name: "platform") { - """ - SEO description of the product. - """ - description: String - - """ - SEO title of the product. - """ - title: 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - A purchase or charge. - """ - ORDER - - """ - A removal or return. - """ - RETURN - - """ - An unknown order action. Represents new actions that may be added in future versions. - """ - UNKNOWN - - """ - A change to the price, taxes, or discounts for a prior purchase. - """ - UPDATE -} - -""" -The additional fee details for a line item. -""" -type SaleAdditionalFee implements Node @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "sales") { - """ - An additional fee. - """ - ADDITIONAL_FEE - - """ - A sale adjustment. - """ - ADJUSTMENT - - """ - A duty charge. - """ - DUTY - - """ - A fee charge. - """ - FEE - - """ - A gift card. - """ - GIFT_CARD - - """ - A product purchased, returned or exchanged. - """ - PRODUCT - - """ - A shipping cost. - """ - SHIPPING - - """ - A tip added by the customer. - """ - TIP - - """ - An unknown sale line. Represents new types that may be added in future versions. - """ - UNKNOWN -} - -""" -The tax allocated to a sale from a single tax line. -""" -type SaleTax @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "sales") { - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - A descriptive name of the 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! -} - -""" -Return type for `savedSearchCreate` mutation. -""" -type SavedSearchCreatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - ID of the saved search to delete. - """ - id: ID! @gidTypes(types: ["SavedSearch"]) -} - -""" -Return type for `savedSearchDelete` mutation. -""" -type SavedSearchDeletePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - ID of the saved search to update. - """ - id: ID! @gidTypes(types: ["SavedSearch"]) - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @requiredAccess(scope: "`read_script_tags` access scope. Also: Requires access to script tags.") @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 web storefront. - """ - ONLINE_STORE - - """ - Include the script only on the Order status page. - """ - ORDER_STATUS @deprecated(reason: "`ORDER_STATUS` is deprecated and unavailable as a mutation input.\n") -} - -""" -An auto-generated type which holds one ScriptTag and a cursor during pagination. -""" -type ScriptTagEdge @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 - - """ - The page or pages on the online store where the script should be included. - """ - displayScope: ScriptTagDisplayScope - - """ - The URL of the remote script. For example: `https://example.com/path/to/script.js`. - """ - src: URL -} - -""" -Return type for `scriptTagUpdate` mutation. -""" -type ScriptTagUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - A list of options that can be use to filter product availability. - """ - productAvailability: [FilterOption!]! -} - -""" -Represents an individual result returned from a search. -""" -type SearchResult @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - An article. - """ - ARTICLE - - """ - A balance transaction. - """ - BALANCE_TRANSACTION - - """ - A blog. - """ - BLOG - COLLECTION - CUSTOMER - - """ - A code discount redeem code. - """ - DISCOUNT_REDEEM_CODE - DRAFT_ORDER - - """ - A file. - """ - FILE - - """ - An inventory transfer. - """ - INVENTORY_TRANSFER - ORDER - - """ - A page. - """ - PAGE - PRICE_RULE - PRODUCT - - """ - A URL redirect. - """ - URL_REDIRECT -} - -""" -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 @requiredAccess(scope: "`read_customers` access scope. Also: The user must not have restricted access.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 - - """ - A list of parameters that are mutually exclusive with the parameter. - """ - mutuallyExclusiveWith: [String!]! - - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_customers` access scope.") @componentName(name: "customers") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "customers") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The metaobject value of the linked metafield. - """ - linkedMetafieldValue: String - - """ - The name of the parent product's option. - """ - name: String! - - """ - The selected option value of the parent product's option. - """ - value: 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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 @gidTypes(types: ["Market"]) - ): [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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 - - """ - 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, must be one of WEEKDAY, MONTHDAY, YEARDAY. - """ - type: SellingPlanAnchorType -} - -""" -Represents the anchor type. -""" -enum SellingPlanAnchorType @componentName(name: "merchandising") { - """ - Which day of the month, between 1-31. - """ - MONTHDAY - - """ - Which day of the week, between 1-7. - """ - WEEKDAY - - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = SellingPlanFixedBillingPolicy | SellingPlanRecurringBillingPolicy - -""" -The input fields that are required to create or update a billing policy type. -""" -input SellingPlanBillingPolicyInput @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = MoneyV2 | SellingPlanCheckoutChargePercentageValue - -""" -The input fields required to create or update an checkout charge value. -""" -input SellingPlanCheckoutChargeValueInput @componentName(name: "merchandising") { - """ - The fixed value for an checkout charge. - """ - fixedValue: Decimal - - """ - The percentage value. - """ - percentage: Float -} - -""" -An auto-generated type for paginating through multiple SellingPlans. -""" -type SellingPlanConnection @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = SellingPlanFixedDeliveryPolicy | SellingPlanRecurringDeliveryPolicy - -""" -The input fields that are required to create or update a delivery policy. -""" -input SellingPlanDeliveryPolicyInput @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - The checkout charge policy for the selling plan. - """ - checkoutCharge: SellingPlanCheckoutChargeInput - - """ - 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 - - """ - When to capture the payment for the amount due. - """ - remainingBalanceChargeTrigger: SellingPlanRemainingBalanceChargeTrigger -} - -""" -Represents a fixed selling plan delivery policy. -""" -type SellingPlanFixedDeliveryPolicy @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 - - """ - The date and time when the fulfillment should trigger. - """ - fulfillmentExactTime: DateTime - - """ - What triggers the fulfillment. - """ - fulfillmentTrigger: SellingPlanFulfillmentTrigger - - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Price adjustment type defined by the policy. - """ - adjustmentType: SellingPlanPricingPolicyAdjustmentType - - """ - Price adjustment value defined by the policy. - """ - adjustmentValue: SellingPlanPricingPolicyValueInput - - """ - ID of the pricing policy. - """ - id: ID @gidTypes(types: ["SellingPlanRecurringPricingPolicy"]) -} - -""" -Describes what triggers fulfillment. -""" -enum SellingPlanFulfillmentTrigger @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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! @gidTypes(types: ["Product"]) - ): Boolean! - - """ - Whether the given product variant is directly associated to the selling plan group. - """ - appliesToProductVariant( - """ - The ID of the product. - """ - productVariantId: ID! @gidTypes(types: ["ProductVariant"]) - ): 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! @gidTypes(types: ["Product"]) - ): 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filters the product variants by a product ID. - """ - productId: ID @gidTypes(types: ["Product"]) - - """ - 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 @gidTypes(types: ["Product"]) - ): Count - - """ - Products associated to the selling plan group. - """ - products( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @gidTypes(types: ["Market"]) - ): [Translation!]! -} - -""" -Return type for `sellingPlanGroupAddProductVariants` mutation. -""" -type SellingPlanGroupAddProductVariantsPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - ID for app, exposed in Liquid and product JSON. - """ - appId: String - - """ - Merchant facing description of the selling plan group. - """ - description: String - - """ - Merchant facing label of the selling plan group. - """ - merchantCode: String - - """ - 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!] - - """ - Relative value for display purposes of the selling plan group. A lower position will be displayed before a higher one. - """ - position: Int - - """ - List of selling plans to create. - """ - sellingPlansToCreate: [SellingPlanInput!] - - """ - List of selling plans ids to delete. - """ - sellingPlansToDelete: [ID!] @gidTypes(types: ["SellingPlan"]) - - """ - List of selling plans to update. - """ - sellingPlansToUpdate: [SellingPlanInput!] -} - -""" -Return type for `sellingPlanGroupRemoveProductVariants` mutation. -""" -type SellingPlanGroupRemoveProductVariantsPayload @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - The IDs of the Products to add to the Selling Plan Group. - """ - productIds: [ID!] @gidTypes(types: ["Product"]) - - """ - The IDs of the Variants to add to the Selling Plan Group. - """ - productVariantIds: [ID!] @gidTypes(types: ["ProductVariant"]) -} - -""" -The set of valid sort keys for the SellingPlanGroup query. -""" -enum SellingPlanGroupSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @componentName(name: "platform") { - """ - Billing and delivery policy types must be the same. - """ - BILLING_AND_DELIVERY_POLICY_TYPES_MUST_BE_THE_SAME - - """ - Billing policy's interval is too large. - """ - BILLING_POLICY_INTERVAL_TOO_LARGE - - """ - The input value is blank. - """ - BLANK - - """ - A fixed billing policy's checkout charge value and type must match. - """ - CHECKOUT_CHARGE_VALUE_AND_TYPE_MUST_MATCH - - """ - Delivery policy's interval is too large. - """ - DELIVERY_POLICY_INTERVAL_TOO_LARGE - - """ - The input value should be equal to the value allowed. - """ - EQUAL_TO - - """ - Could not add the resource to the selling plan group. - """ - ERROR_ADDING_RESOURCE_TO_GROUP - - """ - 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 billing policy's fulfillment_exact_time can't be blank when the fulfillment_trigger is EXACT_TIME. - """ - FULFILLMENT_EXACT_TIME_REQUIRED - - """ - 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 - - """ - Selling plan group could not be deleted. - """ - GROUP_COULD_NOT_BE_DELETED - - """ - Selling plan group does not exist. - """ - GROUP_DOES_NOT_EXIST - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - The input value is invalid. - """ - INVALID - - """ - The input submitted is invalid. - """ - INVALID_INPUT - - """ - 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 - - """ - Only one billing policy type can be defined. - """ - ONLY_NEED_ONE_BILLING_POLICY_TYPE - - """ - A fixed billing policy's checkout charge can have at most one value. - """ - ONLY_NEED_ONE_CHECKOUT_CHARGE_VALUE - - """ - 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 - - """ - Only one pricing policy adjustment value type can be defined. - """ - ONLY_NEED_ONE_PRICING_POLICY_VALUE - - """ - 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 - - """ - Selling plan does not exist. - """ - PLAN_DOES_NOT_EXIST - - """ - Selling plan ID must be specified to update. - """ - PLAN_ID_MUST_BE_SPECIFIED_TO_UPDATE - - """ - The input value needs to be blank. - """ - PRESENT - - """ - Pricing policy's adjustment value and adjustment type must match. - """ - PRICING_POLICY_ADJUSTMENT_VALUE_AND_TYPE_MUST_MATCH - - """ - Product does not exist. - """ - PRODUCT_DOES_NOT_EXIST - - """ - Product variant does not exist. - """ - PRODUCT_VARIANT_DOES_NOT_EXIST - - """ - 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_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 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 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 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 - - """ - The selling plan list provided contains 1 or more invalid IDs. - """ - RESOURCE_LIST_CONTAINS_INVALID_IDS - - """ - 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 - - """ - 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 - - """ - Missing billing policy. - """ - SELLING_PLAN_BILLING_POLICY_MISSING - - """ - Must include at least one selling plan. - """ - SELLING_PLAN_COUNT_LOWER_BOUND - - """ - Exceeded the selling plan limit (31). - """ - SELLING_PLAN_COUNT_UPPER_BOUND - - """ - Missing delivery policy. - """ - SELLING_PLAN_DELIVERY_POLICY_MISSING - - """ - 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 - - """ - Selling plan's billing policy max cycles must be greater than min cycles. - """ - SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES - - """ - 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 - - """ - Selling plan's pricing policies must contain one fixed pricing policy. - """ - SELLING_PLAN_PRICING_POLICIES_MUST_CONTAIN_A_FIXED_PRICING_POLICY - - """ - 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 input fields to create or update a selling plan. -""" -input SellingPlanInput @componentName(name: "merchandising") { - """ - Selling plan policy which describes the billing details. - """ - billingPolicy: SellingPlanBillingPolicyInput - - """ - The category used to classify this selling plan for reporting purposes. - """ - category: SellingPlanCategory - - """ - A selling plan policy which describes the delivery details. - """ - deliveryPolicy: SellingPlanDeliveryPolicyInput - - """ - Buyer facing string which describes the selling plan commitment. - """ - description: String - - """ - ID of the selling plan. - """ - id: ID @gidTypes(types: ["SellingPlan"]) - - """ - A selling plan policy which describes the inventory details. - """ - inventoryPolicy: SellingPlanInventoryPolicyInput - - """ - Additional customizable information to associate with the SellingPlan. - """ - metafields: [MetafieldInput!] - - """ - Buyer facing string which describes the selling plan content. - """ - 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 value for display purposes of this plan. A lower position will be displayed before a higher one. - """ - position: Int - - """ - The pricing policies which describe the pricing details. Each selling plan - can only contain a maximum of 2 pricing policies. - """ - pricingPolicies: [SellingPlanPricingPolicyInput!] -} - -""" -Represents valid selling plan interval. -""" -enum SellingPlanInterval @componentName(name: "merchandising") { - """ - Day interval. - """ - DAY - - """ - Month interval. - """ - MONTH - - """ - Week interval. - """ - WEEK - - """ - Year interval. - """ - YEAR -} - -""" -The selling plan inventory policy. -""" -type SellingPlanInventoryPolicy @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - When to reserve inventory for the order. - """ - reserve: SellingPlanReserve! -} - -""" -The input fields required to create or update an inventory policy. -""" -input SellingPlanInventoryPolicyInput @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = SellingPlanFixedPricingPolicy | SellingPlanRecurringPricingPolicy - -""" -Represents a selling plan pricing policy adjustment type. -""" -enum SellingPlanPricingPolicyAdjustmentType @componentName(name: "merchandising") { - """ - Fixed amount off adjustment. - """ - FIXED_AMOUNT - - """ - Percentage off adjustment. - """ - PERCENTAGE - - """ - Price of the policy. - """ - PRICE -} - -""" -Represents a selling plan pricing policy adjustment value type. -""" -union SellingPlanPricingPolicyAdjustmentValue @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") = MoneyV2 | SellingPlanPricingPolicyPercentageValue - -""" -Represents selling plan pricing policy common fields. -""" -interface SellingPlanPricingPolicyBase @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Fixed pricing policy details. - """ - fixed: SellingPlanFixedPricingPolicyInput - - """ - Recurring pricing policy details. - """ - recurring: SellingPlanRecurringPricingPolicyInput -} - -""" -The percentage value of a selling plan pricing policy percentage type. -""" -type SellingPlanPricingPolicyPercentageValue @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The percentage value. - """ - percentage: Float! -} - -""" -The input fields required to create or update a pricing policy adjustment value. -""" -input SellingPlanPricingPolicyValueInput @componentName(name: "merchandising") { - """ - The fixed value for an fixed amount off or a new policy price. - """ - fixedValue: Decimal - - """ - The percentage value. - """ - percentage: Float -} - -""" -Represents a recurring selling plan billing policy. -""" -type SellingPlanRecurringBillingPolicy @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Specific anchor dates upon which the billing interval calculations should be made. - """ - anchors: [SellingPlanAnchorInput!] - - """ - 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 -} - -""" -Represents a recurring selling plan delivery policy. -""" -type SellingPlanRecurringDeliveryPolicy @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 delivery frequency, it can be either: day, week, month or year. - """ - interval: SellingPlanInterval - - """ - The number of intervals between deliveries. - """ - intervalCount: Int - - """ - The pre-anchor behavior. It can be either: asap or next. - """ - preAnchorBehavior: SellingPlanRecurringDeliveryPolicyPreAnchorBehavior -} - -""" -Whether the delivery policy is merchant or buyer-centric. -""" -enum SellingPlanRecurringDeliveryPolicyIntent @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - 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! - - """ - ID of the pricing policy. - """ - id: ID @gidTypes(types: ["SellingPlanRecurringPricingPolicy"]) -} - -""" -When to capture the payment for the remaining amount due. -""" -enum SellingPlanRemainingBalanceChargeTrigger @componentName(name: "merchandising") { - """ - At an exact time defined by the remaining_balance_charge_exact_time field. - """ - EXACT_TIME - - """ - When there's no remaining balance to be charged after checkout. - """ - NO_REMAINING_BALANCE - - """ - When the order is fulfilled. - """ - ON_FULFILLMENT - - """ - After the duration defined by the remaining_balance_charge_time_after_checkout field. - """ - TIME_AFTER_CHECKOUT -} - -""" -When to reserve inventory for a selling plan. -""" -enum SellingPlanReserve @componentName(name: "merchandising") { - """ - 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 @requiredAccess(scope: "`read_pixels` access scope. Also: The app must have the read_server_pixels access scope.") @componentName(name: "merchant_marketing") { - """ - The current data sharing state of the pixel. - """ - dataSharingState: PixelDataSharingState! - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "merchant_marketing") { - """ - This server pixel is connected: it will stream customer events to the endpoint if it is configured properly. - """ - CONNECTED - - """ - 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 - - """ - 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 -} - -""" -The set of valid sort keys for the ShipmentLineItem query. -""" -enum ShipmentLineItemSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "pricing") { - """ - 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 @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - 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 @protectedField(subject: "customer", content: "phone") - - """ - Returns the price of the shipping line. - """ - price: Money! @deprecated(reason: "Use `originalPriceSet` instead.") - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "sales") { - """ - 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 @componentName(name: "draft_orders") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Type of a shipping package. -""" -enum ShippingPackageType @componentName(name: "delivery") { - """ - A shipping box. - """ - BOX - - """ - An envelope. - """ - ENVELOPE - - """ - A flat rate packaging supplied by a carrier. - """ - FLAT_RATE - - """ - A soft-pack, bubble-wrap or vinyl envelope. - """ - SOFT_PACK -} - -""" -Return type for `shippingPackageUpdate` mutation. -""" -type ShippingPackageUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "Any of `draft_orders`, `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.") @componentName(name: "delivery") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { - """ - 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 @componentName(name: "returns") { - """ - 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 @componentName(name: "shop_identity") { - """ - 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.") - - """ - Whether the shop is eligible for app trials offered by third-party apps. - """ - appTrialEligible: Boolean! - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The assigment status of the fulfillment orders that should be returned. - If `assignmentStatus` argument is not provided, then - the query will return all assigned fulfillment orders, - except those that have the `CLOSED` status. - """ - assignmentStatus: FulfillmentOrderAssignmentStatus - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Returns fulfillment orders only for certain locations, specified by a list of location IDs. - """ - locationIds: [ID!] @gidTypes(types: ["Location"]) - - """ - 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") @requiredAccess(scope: "`read_assigned_fulfillment_orders` access scope.") - - """ - The list of sales channels not currently installed on the shop. - """ - availableChannelApps( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | collection_type | string | | - `custom`
- `smart` | - | handle | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | product_id | id | Filter by collections containing a product by its ID. | - | 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` | - | 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` | - | published_at | time | Filter by the date and time when the collection was published to the Online Store. | - | 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` | - | title | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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! @requiredAccess(scope: "`read_customers` access scope.") - - """ - Customer accounts associated to the shop. - """ - customers( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | accepts_marketing | boolean | Filter by whether a customer has consented - to receive marketing material. | | | - `accepts_marketing:true` | - | 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` | - | 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'` | - | 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:*` | - | first_name | string | Filter by the customer's first name. | | | - `first_name:Jane` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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'` | - | last_name | string | Filter by the customer's last name. | | | - `last_name:Reeves` | - | 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'` | - | orders_count | integer | Filter by the total number of orders a customer has placed. | | | - `orders_count:5` | - | 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:*` | - | 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` | - | 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'` | - | 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'` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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.") - - """ - The domains configured for the shop. - """ - domainsPaginated( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | host | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DomainConnection! - - """ - 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! @requiredAccess(scope: "`read_draft_orders` access scope.") - - """ - The shop owner's email address. - Shopify will use this email address to communicate with the shop owner. - """ - email: String! - - """ - The configuration for the shop email sender. - """ - emailSenderConfiguration: EmailSenderConfiguration! - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Whether to include closed fulfillment orders. - """ - includeClosed: Boolean = false - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | assigned_location_id | id | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | status | string | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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.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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | created_at | time | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | updated_at | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Whether to include the locations that are deactivated. - """ - includeInactive: Boolean = false - - """ - Whether to include the legacy locations of fulfillment services. - """ - includeLegacy: Boolean = false - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | active | string | - | address1 | string | - | address2 | string | - | city | string | - | country | string | - | created_at | time | - | geolocated | boolean | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | legacy | boolean | - | location_id | id | - | name | string | - | pickup_in_store | string | | - `enabled`
- `disabled` | - | province | string | - | zip | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): LocationConnection! @deprecated(reason: "Use `QueryRoot.locations` instead.") - - """ - Whether SMS marketing has been enabled on the shop's checkout configuration settings. - """ - marketingSmsConsentEnabledAtCheckout: Boolean! - - """ - Merchant signals for apps. - """ - merchantAppSignals: MerchantAppSignals - - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - 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! @requiredAccess(scope: "`read_orders` access scope.") - - """ - A list of the shop's orders. - """ - orders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | channel | string | Filter by the channel information [`handle`](https://shopify.dev/api/admin-graphql/latest/objects/ChannelInformation#field-ChannelInformation.fields.channelDefinition.handle) - (`ChannelInformation.channelDefinition.handle`) field. | | | - - `channel:web`
- `channel:web,pos` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | 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` | - | 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"` | - | name | string | Filter by the order [`name`](https://shopify.dev/api/admin-graphql/latest/objects/Order#field-name) - field. | | | - `name:1001-A` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | shipping_address_validation_result_summary | string | Filter by the [validation status](https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress#field-MailingAddress.fields.validationResultSummary) - of the shipping address. Learn more about [validating addresses](https://help.shopify.com/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult). - | - `has_issues`
- `no_issues`
- `not_validated` | | - - `shipping_address_validation_result_summary:no_issues` | - | 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` | - | 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` | - | 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` | - | status | string | Filter by the order's status to manage workflows or - analyze the order lifecycle. | - `open`
- `closed`
- - `cancelled`
- `not_closed` | | - `status:open` | - | 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` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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! @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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - Crops the image according to the specified region. - """ - crop: CropRegion @deprecated(reason: "Use `Image.url(transform: { crop:})` instead.") - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Image height in pixels between 1 and 2048. - """ - maxHeight: Int @deprecated(reason: "Use `Image.url(transform: { maxHeight:})` instead.") - - """ - Image width in pixels between 1 and 2048. - """ - maxWidth: Int @deprecated(reason: "Use `Image.url(transform: { maxWidth:})` instead.") - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - 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.") - - """ - 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.") @requiredAccess(scope: "`read_products` access scope.") - - """ - 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.") @requiredAccess(scope: "`read_products` access scope.") - - """ - List of the shop's product variants. - """ - productVariants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-123` | - | 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` | - | 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` | - | exclude_composite | boolean | Filter by product variants that aren't composites. | | | - `exclude_composite:true` | - | 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` | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_quantity | integer | Filter by an aggregate of inventory across - all locations where the product variant is stocked. | | | - - `inventory_quantity:10` | - | 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` | - | managed | boolean | Filter by whether there is fulfillment service - tracking associated with the product variants. | | | - `managed:true` | - | managed_by | string | Filter by the fulfillment service that tracks the - number of items in stock for the product variant. | | | - - `managed_by:shopify` | - | option1 | string | Filter by a custom property that a shop owner uses to - define product variants. | | | - `option1:small` | - | option2 | string | Filter by a custom property that a shop owner uses to - define product variants. | | | - `option2:medium` | - | option3 | string | Filter by a custom property that a shop owner uses to - define product variants. | | | - `option3:large` | - | product_id | id | Filter by the product [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-id) - field. | | | - `product_id:8474977763649` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | taxable | boolean | Filter by the product variant [`taxable`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-taxable) - field. | | | - `taxable:false` | - | title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) - field. | | | - `title:ice` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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.") @requiredAccess(scope: "`read_products` access scope.") - - """ - List of the shop's products. - """ - products( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) - field. | | | - `barcode:ABC-abc-1234` | - | 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` | - | 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` | - | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) - field. | | | - `collection_id:108179161409` | - | 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` | - | 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'` | - | 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` | - | error_feedback | string | Filter by products with publishing errors. | - | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) - field. | | | - `gift_card:true` | - | 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` | - | has_only_composites | boolean | Filter by products that have only - composite variants. | | | - `has_only_composites:true` | - | 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` | - | has_variant_with_components | boolean | Filter by products that have - variants with associated components. | | | - - `has_variant_with_components:true` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | inventory_total | integer | Filter by inventory count. | | | - - `inventory_total:0`
- `inventory_total:>150`
- - `inventory_total:>=200` | - | 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` | - | 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"` | - | out_of_stock_somewhere | boolean | Filter by products that are out of - stock in at least one location. | | | - `out_of_stock_somewhere:true` | - | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) - field. | | | - `price:100.57` | - | 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` | - | 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` | - | product_type | string | Filter by a comma-separated list of [product - types](https://help.shopify.com/manual/products/details/product-type). | | | - - `product_type:snowboard` | - | publication_ids | string | Filter by a comma-separated list of publication - IDs that are associated with the product. | | | - - `publication_ids:184111530305,184111694145` | - | 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` | - | 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` | - | 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` | - | 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` | - | 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` | `active` | - - `status:active,draft` | - | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | - | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | - | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) - field. | | | - `title:The Minimal Snowboard` | - | tracks_inventory | boolean | Filter by products that have [inventory tracking](https://help.shopify.com/manual/products/inventory/getting-started-with-inventory/set-up-inventory-tracking) - enabled. | | | - `tracks_inventory:true` | - | 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'` | - | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) - field. | | | - `variant_id:45779434701121` | - | 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'` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int! - - """ - The search query to filter by. - """ - query: String! - - """ - The search result types to filter by. - """ - types: [SearchResultType!] - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 @gidTypes(types: ["Market"]) - ): [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 @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "billing") { - """ - 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 @componentName(name: "shop_identity") { - """ - Shop has Rogers branding. - """ - ROGERS - - """ - Shop has Shopify branding. - """ - SHOPIFY - - """ - Shop has Shopify Gold branding. - """ - SHOPIFY_GOLD - - """ - Shop has Shopify Plus branding. - """ - SHOPIFY_PLUS -} - -""" -Represents the shop's customer account requirement preference. -""" -enum ShopCustomerAccountsSetting @componentName(name: "shop_identity") { - DISABLED - OPTIONAL - REQUIRED -} - -""" -The name of a Shop app feature for a given shop. -""" -enum ShopFeatureName @componentName(name: "shop_identity") { - """ - The lead capture feature. - """ - LEAD_CAPTURE -} - -""" -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 @componentName(name: "shop_identity") { - """ - 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 the shop and app can use the Login With Shop feature. - """ - eligibleForLoginWithShop: Boolean! - - """ - Whether the shop is eligible for the given shop app feature. - """ - eligibleForShopFeature( - """ - The name of the shop app feature to check eligibility for. - """ - feature: ShopFeatureName! - ): 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 Sub Country Markets. - """ - subCountryMarketsEnabled: 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 @requiredAccess(scope: "`read_locales` access scope or `read_markets_home` access scope.") @componentName(name: "markets") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "apps") { - """ - 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!] @gidTypes(types: ["WebPresence"]) - - """ - Whether the locale is published. Only published locales are visible to the buyer. - """ - published: Boolean -} - -""" -Return type for `shopLocaleUpdate` mutation. -""" -type ShopLocaleUpdatePayload @componentName(name: "platform") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { - """ - The name of payment method used by the buyer. - """ - paymentMethodName: String -} - -""" -Represents a Shop Pay payment request. -""" -type ShopPayPaymentRequest @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The delivery method type is pickup. - """ - PICKUP - - """ - The delivery method type is shipping. - """ - SHIPPING -} - -""" -Represents a discount for a Shop Pay payment request. -""" -type ShopPayPaymentRequestDiscount @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - The amount is too small. - """ - AMOUNT_TOO_SMALL - - """ - Call the card issuer. - """ - CALL_ISSUER - - """ - The card was declined. - """ - CARD_DECLINED - - """ - There is an error in the gateway or merchant configuration. - """ - CONFIG_ERROR - - """ - Too many failed CVV verification attempts. - """ - CVV_ATTEMPTS_EXCEEDED - - """ - The card is expired. - """ - EXPIRED_CARD - - """ - The card issuer has flagged the transaction as potentially fraudulent. - """ - FRAUD_SUSPECTED - - """ - There was an unknown error with processing the payment. - """ - GENERIC_ERROR - - """ - The address does not match the card number. - """ - INCORRECT_ADDRESS - - """ - The CVC does not match the card number. - """ - INCORRECT_CVC - - """ - The card number is incorrect. - """ - INCORRECT_NUMBER - - """ - The entered PIN is incorrect. - """ - INCORRECT_PIN - - """ - The ZIP or postal code does not match the card number. - """ - INCORRECT_ZIP - - """ - The amount is either too high or too low for the provider. - """ - INVALID_AMOUNT - - """ - The payment method is not available in the customer's country. - """ - INVALID_COUNTRY - - """ - The format of the CVC is incorrect. - """ - INVALID_CVC - - """ - The format of the expiry date is incorrect. - """ - INVALID_EXPIRY_DATE - - """ - The format of the card number is incorrect. - """ - INVALID_NUMBER - - """ - The payment method is momentarily unavailable. - """ - PAYMENT_METHOD_UNAVAILABLE - - """ - 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 was an error while processing the payment. - """ - PROCESSING_ERROR - - """ - A real card was used but the gateway was in test mode. - """ - TEST_MODE_LIVE_CARD - - """ - The 3D Secure check failed. - """ - THREE_D_SECURE_FAILED - - """ - The gateway or merchant configuration doesn't support a feature, such as network tokenization. - """ - UNSUPPORTED_FEATURE -} - -""" -The state of the payment request receipt. -""" -enum ShopPayPaymentRequestReceiptProcessingStatusState @componentName(name: "checkouts") { - """ - The payment request requires action from the buyer. - """ - ACTION_REQUIRED - - """ - The payment request processing completed successfully. - """ - COMPLETED - - """ - The payment request processing failed. - """ - FAILED - - """ - The payment request currently being processed. - """ - PROCESSING - - """ - The payment request is ready and queued to be processed. - """ - READY -} - -""" -The set of valid sort keys for the ShopPayPaymentRequestReceipts query. -""" -enum ShopPayPaymentRequestReceiptsSortKeys @componentName(name: "platform") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "checkouts") { - """ - 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 @componentName(name: "shop_identity") { - """ - 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 @requiredAccess(scope: "`read_legal_policies` access scope.") @componentName(name: "shop_identity") { - """ - 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: DateTime! - - """ - 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 @gidTypes(types: ["Market"]) - ): [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: DateTime! - - """ - The public URL of the policy. - """ - url: URL! -} - -""" -Possible error codes that can be returned by `ShopPolicyUserError`. -""" -enum ShopPolicyErrorCode @componentName(name: "platform") { - """ - The input value is too big. - """ - TOO_BIG -} - -""" -The input fields required to update a policy. -""" -input ShopPolicyInput @componentName(name: "shop_identity") { - """ - Policy text, maximum size of 512kb. - """ - body: String! - - """ - The shop policy type. - """ - type: ShopPolicyType! -} - -""" -Available shop policy types. -""" -enum ShopPolicyType @componentName(name: "shop_identity") { - """ - The contact information. - """ - CONTACT_INFORMATION - - """ - The legal notice. - """ - LEGAL_NOTICE - - """ - The privacy policy. - """ - PRIVACY_POLICY - - """ - The refund policy. - """ - REFUND_POLICY - - """ - The shipping policy. - """ - SHIPPING_POLICY - - """ - The cancellation policy. - """ - SUBSCRIPTION_POLICY - - """ - The terms of sale. - """ - TERMS_OF_SALE - - """ - The terms of service. - """ - TERMS_OF_SERVICE -} - -""" -Return type for `shopPolicyUpdate` mutation. -""" -type ShopPolicyUpdatePayload @componentName(name: "platform") { - """ - 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 @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - The feedback date cannot be set in the future. - """ - FEEDBACK_DATE_IN_FUTURE - - """ - The input value is invalid. - """ - INVALID - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND - - """ - The feedback for a later version of the resource was already accepted. - """ - OUTDATED_FEEDBACK - - """ - The input value needs to be blank. - """ - PRESENT -} - -""" -Resource limits of a shop. -""" -type ShopResourceLimits @componentName(name: "shop_identity") { - """ - 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 @componentName(name: "shop_identity") { - """ - Alphabetical sort. - """ - ALPHABETICAL - - """ - Popularity sort. - """ - POPULAR -} - -""" -Return type for `shopUserAccessTokenCreate` mutation. -""" -type ShopUserAccessTokenCreatePayload @componentName(name: "platform") { - """ - An access token for the Shop Users API for a specific Shop user. - """ - accessToken: String - - """ - The number of seconds until the access token expires. - """ - expiresIn: Int - - """ - A refresh token to request a new access token directly from the Shop token endpoint once the access token expires. - """ - refreshToken: String - - """ - The type of token. - """ - tokenType: String - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -A Shopify Function. -""" -type ShopifyFunction @componentName(name: "apps") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "apps") { - """ - 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 @accessRestricted(reason: "Requires the `read_shopify_payments` or `read_shopify_payments_accounts` approval scope.") @requiredAccess(scope: "the `read_shopify_payments` or the `read_shopify_payments_accounts` access scope.") @componentName(name: "shopify_payments") { - """ - The name of the account opener. - """ - accountOpenerName: String @requiredAccess(scope: "`read_shopify_payments_accounts_sensitive` access scope.") - - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - Determines if returned transactions contain transaction type transfer. - """ - hideTransfers: Boolean = false - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | available_on | time | - | credit_card_last4 | string | - | currency | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | payment_method_name | string | - | payments_transfer_id | id | - | payout_date | time | - | payout_status | string | - | processed_at | time | - | tax_reporting_exempt | boolean | - | transaction_type | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - ): ShopifyPaymentsBalanceTransactionConnection! - - """ - All bank accounts configured for the Shopify Payments account. - """ - bankAccounts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | initiated_at | time | - | status | string | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | amount | float | - | bank_account | string | - | currency | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | issued_at | time | - | ledger_type | string | - | status | string | - | transaction_dates | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - - """ - Filter the direction of the payout. - """ - transactionType: ShopifyPaymentsPayoutTransactionType - ): ShopifyPaymentsPayoutConnection! -} - -""" -A Shopify Payments address. -""" -type ShopifyPaymentsAddressBasic @requiredAccess(scope: "`read_shopify_payments_legal_entities` access scope or `read_financial_kyc_information` access scope. Also: The app must have the Shopify Payments Legal Entities or Financial KYC Information permission.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { - """ - The metadata for the adjustment that's associated with the transaction. - If the source_type isn't an adjustment, the value will be null. - """ - adjustmentMetadata: JSON - - """ - 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 user-friendly display name for the transaction type. - This matches the Type column in the transaction CSV export - from Finance > Transactions in the Shopify Admin. - """ - displayType: String! - - """ - 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "shopify_payments") { - """ - 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 @componentName(name: "shopify_payments") { - """ - The transaction requires action before it can be paid out. - """ - ACTION_REQUIRED - - """ - The payout has been canceled by Shopify. - """ - CANCELED - - """ - The payout has been declined by the bank. - """ - FAILED - - """ - 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 transaction has not been assigned a payout yet. - """ - PENDING - - """ - The payout has been created and had transactions assigned to it, but - it has not yet been submitted to the bank. - """ - SCHEDULED -} - -""" -A bank account that can receive payouts. -""" -type ShopifyPaymentsBankAccount implements Node @requiredAccess(scope: "`read_shopify_payments_bank_accounts` access scope.") @componentName(name: "shopify_payments") { - """ - 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( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | amount | float | - | bank_account | string | - | currency | string | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | issued_at | time | - | ledger_type | string | - | status | string | - | transaction_dates | time | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). - The search’s query string is used as the query argument. - """ - savedSearchId: ID @gidTypes(types: ["SavedSearch"]) - - """ - 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 - - """ - Filter the direction of the payout. - """ - transactionType: ShopifyPaymentsPayoutTransactionType - ): ShopifyPaymentsPayoutConnection! - - """ - The status of the bank account. - """ - status: ShopifyPaymentsBankAccountStatus! -} - -""" -An auto-generated type for paginating through multiple ShopifyPaymentsBankAccounts. -""" -type ShopifyPaymentsBankAccountConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "shopify_payments") { - """ - 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 @componentName(name: "shopify_payments") { - """ - A payout to the bank account failed. - """ - ERRORED - - """ - 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 -} - -""" -The business type of a Shopify Payments account. -""" -enum ShopifyPaymentsBusinessType @componentName(name: "shopify_payments") { - """ - The business type is a corporation. - """ - CORPORATION - - """ - 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 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 (registered charity). - """ - NON_PROFIT_REGISTERED_CHARITY - - """ - 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 not set. This is usually because onboarding is incomplete. - """ - NOT_SET - - """ - The business type is a partnership. - """ - PARTNERSHIP - - """ - The business type is a private corporation. - """ - PRIVATE_CORPORATION - - """ - The business type is a private multi member LLC. - """ - PRIVATE_MULTI_MEMBER_LLC - - """ - The business type is a private partnership. - """ - PRIVATE_PARTNERSHIP - - """ - 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 public company. - """ - PUBLIC_COMPANY - - """ - The business type is a public corporation. - """ - PUBLIC_CORPORATION - - """ - The business type is a public partnership. - """ - PUBLIC_PARTNERSHIP - - """ - The business type is a sole establishment. - """ - SOLE_ESTABLISHMENT - - """ - The business type is a sole proprietorship. - """ - SOLE_PROP - - """ - The business type is an unincorporated partnership. - """ - UNINCORPORATED_PARTNERSHIP -} - -""" -The charge descriptors for a payments account. -""" -interface ShopifyPaymentsChargeStatementDescriptor @requiredAccess(scope: "`read_shopify_payments` access scope.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "`read_shopify_payments` access scope.") @componentName(name: "shopify_payments") { - """ - The default charge statement descriptor. - """ - default: String - - """ - The prefix of the statement descriptor. - """ - prefix: String! -} - -""" -A destination or bank account that can receive payouts. -""" -type ShopifyPaymentsDestinationAccount @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { - """ - The name of the bank. - """ - bankName: String - - """ - The currency of the bank account. - """ - currency: CurrencyCode - - """ - The last digits of the account number (the rest is redacted). - """ - lastDigits: String -} - -""" -A dispute occurs when a buyer questions the legitimacy of a charge with their financial institution. -""" -type ShopifyPaymentsDispute implements LegacyInteroperability & Node @requiredAccess(scope: "User must have `read_shopify_payments_disputes` access.") @componentName(name: "shopify_payments") @protectedObject(subject: "customer") { - """ - The total amount disputed by the cardholder. - """ - amount: MoneyV2! - - """ - The evidence associated with the dispute. - """ - disputeEvidence: ShopifyPaymentsDisputeEvidence! - - """ - The deadline for evidence submission. - """ - evidenceDueBy: DateTime - - """ - The date when evidence was sent. Returns null if evidence hasn't yet been sent. - """ - evidenceSentOn: DateTime - - """ - The date when this dispute was resolved. Returns null if the dispute isn't yet resolved. - """ - finalizedOn: DateTime - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "`read_shopify_payments_dispute_evidences` access scope.") @componentName(name: "shopify_payments") @protectedObject(subject: "customer") { - """ - 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 @protectedField(subject: "customer", content: "email") - - """ - The customer's first name. - """ - customerFirstName: String @protectedField(subject: "customer", content: "name") - - """ - The customer's last name. - """ - customerLastName: String @protectedField(subject: "customer", content: "name") - - """ - 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 @componentName(name: "shopify_payments") { - """ - Cancellation Policy File. - """ - CANCELLATION_POLICY_FILE - - """ - Customer Communication File. - """ - CUSTOMER_COMMUNICATION_FILE - - """ - Refund Policy File. - """ - REFUND_POLICY_FILE - - """ - Response Summary File. - """ - RESPONSE_SUMMARY_FILE - - """ - Service Documentation File. - """ - SERVICE_DOCUMENTATION_FILE - - """ - Shipping Documentation File. - """ - SHIPPING_DOCUMENTATION_FILE - - """ - Uncategorized File. - """ - UNCATEGORIZED_FILE -} - -""" -The input fields required to update a dispute evidence object. -""" -input ShopifyPaymentsDisputeEvidenceUpdateInput @componentName(name: "shopify_payments") { - """ - Activity logs. - """ - accessActivityLog: String - - """ - Cancellation policy disclosure. - """ - cancellationPolicyDisclosure: String - - """ - Cancellation policy file. - """ - cancellationPolicyFile: ShopifyPaymentsDisputeFileUploadUpdateInput - - """ - Cancellation rebuttal. - """ - cancellationRebuttal: String - - """ - Customer communication file. - """ - customerCommunicationFile: ShopifyPaymentsDisputeFileUploadUpdateInput - - """ - Customer email address. - """ - customerEmailAddress: String - - """ - Customer first name. - """ - customerFirstName: String - - """ - Customer last name. - """ - customerLastName: String - - """ - Refund policy disclosure. - """ - refundPolicyDisclosure: String - - """ - Refund policy file. - """ - refundPolicyFile: ShopifyPaymentsDisputeFileUploadUpdateInput - - """ - Refund refusal explanation. - """ - refundRefusalExplanation: String - - """ - Service documentation file. - """ - serviceDocumentationFile: ShopifyPaymentsDisputeFileUploadUpdateInput - - """ - The shipping address associated with the dispute evidence. - """ - shippingAddress: MailingAddressInput - - """ - Shipping documentation file. - """ - shippingDocumentationFile: ShopifyPaymentsDisputeFileUploadUpdateInput - - """ - Whether to submit the evidence. - """ - submitEvidence: Boolean = false - - """ - Uncategorized file. - """ - uncategorizedFile: ShopifyPaymentsDisputeFileUploadUpdateInput - - """ - Uncategorized text. - """ - uncategorizedText: String -} - -""" -The file upload associated with the dispute evidence. -""" -type ShopifyPaymentsDisputeFileUpload implements Node @requiredAccess(scope: "`read_shopify_payments_dispute_evidences` access scope.") @componentName(name: "shopify_payments") @protectedObject(subject: "customer") { - """ - 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 @componentName(name: "shopify_payments") { - """ - Whether to delete this file upload. - """ - destroy: Boolean = false - - """ - The ID of the file upload to be updated. - """ - id: ID! @gidTypes(types: ["DisputeFileUpload"]) -} - -""" -The fulfillment associated with dispute evidence. -""" -type ShopifyPaymentsDisputeFulfillment implements Node @requiredAccess(scope: "`read_shopify_payments_dispute_evidences` access scope.") @componentName(name: "shopify_payments") { - """ - 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 @componentName(name: "shopify_payments") { - """ - The customer's bank can't process the charge. - """ - BANK_CANNOT_PROCESS - - """ - 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 initiated the dispute. Contact the customer for additional details on why the payment was disputed. - """ - CUSTOMER_INITIATED - - """ - The customer's bank can't proceed with the debit since it hasn't been authorized. - """ - DEBIT_NOT_AUTHORIZED - - """ - The customer claims they were charged multiple times for the same product or service. - """ - DUPLICATE - - """ - 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 account associated with the purchase is incorrect. - """ - INCORRECT_ACCOUNT_DETAILS - - """ - The customer's bank account has insufficient funds. - """ - INSUFFICIENT_FUNDS - - """ - 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 - - """ - The customer claims they did not receive the products or services purchased. - """ - PRODUCT_NOT_RECEIVED - - """ - The product or service was received but was defective, damaged, or not as described. - """ - PRODUCT_UNACCEPTABLE - - """ - The customer claims that you continued to charge them after a subscription was canceled. - """ - SUBSCRIPTION_CANCELLED - - """ - The customer doesn’t recognize the payment appearing on their card statement. - """ - UNRECOGNIZED -} - -""" -Details regarding a dispute reason. -""" -type ShopifyPaymentsDisputeReasonDetails @requiredAccess(scope: "User must have `read_shopify_payments_disputes` access.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") { - """ - 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 @requiredAccess(scope: "`read_shopify_payments` access scope.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "`read_shopify_payments` access scope or `read_financial_kyc_information` access scope. Also: The app must have the Shopify Payments or Financial KYC Information permission.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { - """ - The bank account for the payout. - """ - bankAccount: ShopifyPaymentsBankAccount @deprecated(reason: "Use `destinationAccount` instead.") - - """ - The business entity associated with the payout. - """ - businessEntity: BusinessEntity! - - """ - The destination account for the payout. - """ - destinationAccount: ShopifyPaymentsDestinationAccount - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "platform") { - """ - Failed to create payout, there is no eligible balance in this currency. - """ - ALTERNATE_CURRENCY_PAYOUT_FAILED_NO_ELIGIBLE_BALANCE - - """ - Failed to create payout due to an error from Stripe. - """ - ALTERNATE_CURRENCY_PAYOUT_FAILED_STRIPE_ERROR - - """ - No Stripe provider account was found. - """ - MISSING_PROVIDER_ACCOUNT - - """ - Failed to create payout due to an error from Shopify Core. - """ - UNKNOWN_CORE_ERROR -} - -""" -An auto-generated type for paginating through multiple ShopifyPaymentsPayouts. -""" -type ShopifyPaymentsPayoutConnection @componentName(name: "platform") { - """ - 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 @componentName(name: "shopify_payments") { - """ - 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 @componentName(name: "shopify_payments") { - """ - Each business day. - """ - DAILY - - """ - Payouts will not be automatically made. - """ - MANUAL - - """ - Each month, on the day of month specified by monthlyAnchor. - """ - MONTHLY - - """ - Each week, on the day of week specified by weeklyAnchor. - """ - WEEKLY -} - -""" -The payment schedule for a payments account. -""" -type ShopifyPaymentsPayoutSchedule @requiredAccess(scope: "`read_shopify_payments` access scope, `read_shopify_payments_accounts` access scope or `read_shopify_payments_payouts` access scope. Also: The user must have access to `shopify_payments`, `shopify_payments_accounts`, or `shopify_payments_payouts` scopes or the `shopify_payments_transfers`\/`view_payouts` user permission.") @componentName(name: "shopify_payments") { - """ - 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 @componentName(name: "shopify_payments") { - """ - The payout has been canceled by Shopify. - """ - CANCELED - - """ - The payout has been declined by the bank. - """ - FAILED - - """ - 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 created and had transactions assigned to it, but - it has not yet been submitted to the bank. - """ - SCHEDULED -} - -""" -Breakdown of the total fees and gross of each of the different types of transactions associated -with the payout. -""" -type ShopifyPaymentsPayoutSummary @requiredAccess(scope: "The user must have access to payouts.") @componentName(name: "shopify_payments") { - """ - 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 amount for all lending capital remittance balance adjustments. - """ - capitalRemittanceAmount: MoneyV2! - - """ - Total fees for all charges. - """ - chargesFee: MoneyV2! - - """ - Total gross amount for all charges. - """ - chargesGross: MoneyV2! - - """ - Total amount for all lending credit remittance balance adjustments. - """ - creditRemittanceAmount: MoneyV2! - - """ - Sum amount for all marketplace tax balance adjustments regardless of their type. - """ - marketplaceTaxAdjustmentAmount: MoneyV2! - - """ - Total amount for all marketplace tax credit balance adjustments. - """ - marketplaceTaxCreditAdjustmentAmount: MoneyV2! - - """ - Total amount for all marketplace tax debit balance adjustments. - """ - marketplaceTaxDebitAdjustmentAmount: 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 @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { - """ - The acquirer reference number (ARN) code generated for Visa/Mastercard transactions. - """ - acquirerReferenceNumber: String -} - -""" -The possible source types for a balance transaction. -""" -enum ShopifyPaymentsSourceType @componentName(name: "shopify_payments") { - """ - The adjustment source type. - """ - ADJUSTMENT - - """ - The adjustment_reversal source type. - """ - ADJUSTMENT_REVERSAL - - """ - The charge source type. - """ - CHARGE - - """ - The dispute source type. - """ - DISPUTE - - """ - The refund source type. - """ - REFUND - - """ - The system_adjustment source type. - """ - SYSTEM_ADJUSTMENT - - """ - The transfer source type. - """ - TRANSFER -} - -""" -A typed identifier that represents an individual within a tax jurisdiction. -""" -type ShopifyPaymentsTaxIdentification @requiredAccess(scope: "`read_capital` access scope, `read_financial_kyc_information` access scope or `read_shopify_payments_legal_entities` access scope. Also: The app must have the Capital or Financial KYC Information or Shopify Payments Legal Entities permission.") @componentName(name: "shopify_payments") { - """ - The type of the identification. - """ - taxIdentificationType: ShopifyPaymentsTaxIdentificationType! - - """ - The value of the identification. - """ - value: String! -} - -""" -The type of tax identification field. -""" -enum ShopifyPaymentsTaxIdentificationType @componentName(name: "shopify_payments") { - """ - Business EIN. - """ - EIN - - """ - Full SSN. - """ - FULL_SSN - - """ - The last 4 digits of the SSN. - """ - SSN_LAST4_DIGITS -} - -""" -Relevant reference information for an alternate currency payout. -""" -type ShopifyPaymentsToolingProviderPayout @requiredAccess(scope: "`read_shopify_payments_tooling` access scope.") @componentName(name: "shopify_payments") { - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") { - """ - 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 @componentName(name: "shopify_payments") { - """ - 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 adjustment transaction type. - """ - ADJUSTMENT - - """ - The ads_publisher_credit transaction type. - """ - ADS_PUBLISHER_CREDIT - - """ - The ads_publisher_credit_reversal transaction type. - """ - ADS_PUBLISHER_CREDIT_REVERSAL - - """ - The advance transaction type. - """ - ADVANCE - - """ - The advance funding transaction type. - """ - ADVANCE_FUNDING - - """ - 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 application_fee_refund transaction type. - """ - APPLICATION_FEE_REFUND - - """ - The balance_transfer_inbound transaction type. - """ - BALANCE_TRANSFER_INBOUND - - """ - The balance_transfer_outbound transaction type. - """ - BALANCE_TRANSFER_OUTBOUND - - """ - The billing_debit transaction type. - """ - BILLING_DEBIT - - """ - The billing_debit_reversal transaction type. - """ - BILLING_DEBIT_REVERSAL - - """ - The channel_credit transaction type. - """ - CHANNEL_CREDIT - - """ - The channel_credit_reversal transaction type. - """ - CHANNEL_CREDIT_REVERSAL - - """ - The channel_promotion_credit transaction type. - """ - CHANNEL_PROMOTION_CREDIT - - """ - The channel_promotion_credit_reversal transaction type. - """ - CHANNEL_PROMOTION_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 charge transaction type. - """ - CHARGE - - """ - The chargeback_fee transaction type. - """ - CHARGEBACK_FEE - - """ - The chargeback_fee_refund transaction type. - """ - CHARGEBACK_FEE_REFUND - - """ - The chargeback_hold transaction type. - """ - CHARGEBACK_HOLD - - """ - The chargeback_hold_release transaction type. - """ - CHARGEBACK_HOLD_RELEASE - - """ - 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 charge_adjustment transaction type. - """ - CHARGE_ADJUSTMENT - - """ - The collections_credit transaction type. - """ - COLLECTIONS_CREDIT - - """ - The collections_credit_reversal transaction type. - """ - COLLECTIONS_CREDIT_REVERSAL - - """ - The customs_duty transaction type. - """ - CUSTOMS_DUTY - - """ - The customs_duty_adjustment transaction type. - """ - CUSTOMS_DUTY_ADJUSTMENT - - """ - The dispute_reversal transaction type. - """ - DISPUTE_REVERSAL - - """ - The dispute_withdrawal transaction type. - """ - DISPUTE_WITHDRAWAL - - """ - The import_tax transaction type. - """ - IMPORT_TAX - - """ - The import_tax_adjustment transaction type. - """ - IMPORT_TAX_ADJUSTMENT - - """ - The tax refund transaction type. - """ - IMPORT_TAX_REFUND - - """ - The installments_balance_recovery_credit transaction type. - """ - INSTALLMENTS_BALANCE_RECOVERY_CREDIT - - """ - The installments_balance_recovery_credit_reversal transaction type. - """ - INSTALLMENTS_BALANCE_RECOVERY_CREDIT_REVERSAL - - """ - The installments_balance_recovery_debit transaction type. - """ - INSTALLMENTS_BALANCE_RECOVERY_DEBIT - - """ - The installments_balance_recovery_debit_reversal transaction type. - """ - INSTALLMENTS_BALANCE_RECOVERY_DEBIT_REVERSAL - - """ - The lending_capital_refund transaction type. - """ - LENDING_CAPITAL_REFUND - - """ - The lending_capital_refund_reversal transaction type. - """ - LENDING_CAPITAL_REFUND_REVERSAL - - """ - The lending_capital_remittance transaction type. - """ - LENDING_CAPITAL_REMITTANCE - - """ - The lending_capital_remittance_reversal transaction type. - """ - LENDING_CAPITAL_REMITTANCE_REVERSAL - - """ - The lending_credit transaction type. - """ - LENDING_CREDIT - - """ - The lending_credit_refund transaction type. - """ - LENDING_CREDIT_REFUND - - """ - The lending_credit_refund_reversal transaction type. - """ - LENDING_CREDIT_REFUND_REVERSAL - - """ - The lending_credit_remittance transaction type. - """ - LENDING_CREDIT_REMITTANCE - - """ - The lending_credit_remittance_reversal transaction type. - """ - LENDING_CREDIT_REMITTANCE_REVERSAL - - """ - The lending_credit_reversal transaction type. - """ - LENDING_CREDIT_REVERSAL - - """ - The lending_debit transaction type. - """ - LENDING_DEBIT - - """ - The lending_debit_reversal transaction type. - """ - LENDING_DEBIT_REVERSAL - - """ - The managed_markets_b2b_domestic_taxes_adjustment_credit transaction type. - """ - MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_CREDIT - - """ - The managed_markets_b2b_domestic_taxes_adjustment_credit_reversal transaction type. - """ - MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_CREDIT_REVERSAL - - """ - The managed_markets_b2b_domestic_taxes_adjustment_debit transaction type. - """ - MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_DEBIT - - """ - The managed_markets_b2b_domestic_taxes_adjustment_debit_reversal transaction type. - """ - MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_DEBIT_REVERSAL - - """ - The managed_markets_b2b_domestic_taxes_adjustment_platform_credit transaction type. - """ - MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_PLATFORM_CREDIT - - """ - The managed_markets_b2b_domestic_taxes_adjustment_platform_credit_reversal transaction type. - """ - MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_PLATFORM_CREDIT_REVERSAL - - """ - The managed_markets_b2b_domestic_taxes_adjustment_platform_debit transaction type. - """ - MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_PLATFORM_DEBIT - - """ - The managed_markets_b2b_domestic_taxes_adjustment_platform_debit_reversal transaction type. - """ - MANAGED_MARKETS_B2B_DOMESTIC_TAXES_ADJUSTMENT_PLATFORM_DEBIT_REVERSAL - - """ - The managed_markets_charge_credit transaction type. - """ - MANAGED_MARKETS_CHARGE_CREDIT - - """ - The managed_markets_charge_credit_reversal transaction type. - """ - MANAGED_MARKETS_CHARGE_CREDIT_REVERSAL - - """ - The managed_markets_disputed_amount_debit transaction type. - """ - MANAGED_MARKETS_DISPUTED_AMOUNT_DEBIT - - """ - The managed_markets_disputed_amount_debit_reversal transaction type. - """ - MANAGED_MARKETS_DISPUTED_AMOUNT_DEBIT_REVERSAL - - """ - The managed_markets_dispute_fee_credit transaction type. - """ - MANAGED_MARKETS_DISPUTE_FEE_CREDIT - - """ - The managed_markets_dispute_fee_credit_reversal transaction type. - """ - MANAGED_MARKETS_DISPUTE_FEE_CREDIT_REVERSAL - - """ - The managed_markets_dispute_fee_debit transaction type. - """ - MANAGED_MARKETS_DISPUTE_FEE_DEBIT - - """ - The managed_markets_dispute_fee_debit_reversal transaction type. - """ - MANAGED_MARKETS_DISPUTE_FEE_DEBIT_REVERSAL - - """ - The managed_markets_dispute_won_amount_credit transaction type. - """ - MANAGED_MARKETS_DISPUTE_WON_AMOUNT_CREDIT - - """ - The managed_markets_dispute_won_amount_credit_reversal transaction type. - """ - MANAGED_MARKETS_DISPUTE_WON_AMOUNT_CREDIT_REVERSAL - - """ - The managed_markets_duties_and_taxes_adjustment_credit transaction type. - """ - MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_CREDIT - - """ - The managed_markets_duties_and_taxes_adjustment_credit_reversal transaction type. - """ - MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_CREDIT_REVERSAL - - """ - The managed_markets_duties_and_taxes_adjustment_debit transaction type. - """ - MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_DEBIT - - """ - The managed_markets_duties_and_taxes_adjustment_debit_reversal transaction type. - """ - MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_DEBIT_REVERSAL - - """ - The managed_markets_duties_and_taxes_adjustment_platform_credit transaction type. - """ - MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_PLATFORM_CREDIT - - """ - The managed_markets_duties_and_taxes_adjustment_platform_credit_reversal transaction type. - """ - MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_PLATFORM_CREDIT_REVERSAL - - """ - The managed_markets_duties_and_taxes_adjustment_platform_debit transaction type. - """ - MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_PLATFORM_DEBIT - - """ - The managed_markets_duties_and_taxes_adjustment_platform_debit_reversal transaction type. - """ - MANAGED_MARKETS_DUTIES_AND_TAXES_ADJUSTMENT_PLATFORM_DEBIT_REVERSAL - - """ - The managed_markets_merchant_of_record_account_fx_drift_credit transaction type. - """ - MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_FX_DRIFT_CREDIT - - """ - The managed_markets_merchant_of_record_account_fx_drift_credit_reversal transaction type. - """ - MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_FX_DRIFT_CREDIT_REVERSAL - - """ - The managed_markets_merchant_of_record_account_fx_drift_debit transaction type. - """ - MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_FX_DRIFT_DEBIT - - """ - The managed_markets_merchant_of_record_account_fx_drift_debit_reversal transaction type. - """ - MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_FX_DRIFT_DEBIT_REVERSAL - - """ - The managed_markets_merchant_of_record_account_netting_credit transaction type. - """ - MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_NETTING_CREDIT - - """ - The managed_markets_merchant_of_record_account_netting_credit_reversal transaction type. - """ - MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_NETTING_CREDIT_REVERSAL - - """ - The managed_markets_merchant_of_record_account_netting_debit transaction type. - """ - MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_NETTING_DEBIT - - """ - The managed_markets_merchant_of_record_account_netting_debit_reversal transaction type. - """ - MANAGED_MARKETS_MERCHANT_OF_RECORD_ACCOUNT_NETTING_DEBIT_REVERSAL - - """ - The managed_markets_non_target_revenue_adjustment_credit transaction type. - """ - MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_CREDIT - - """ - The managed_markets_non_target_revenue_adjustment_credit_reversal transaction type. - """ - MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_CREDIT_REVERSAL - - """ - The managed_markets_non_target_revenue_adjustment_debit transaction type. - """ - MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_DEBIT - - """ - The managed_markets_non_target_revenue_adjustment_debit_reversal transaction type. - """ - MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_DEBIT_REVERSAL - - """ - The managed_markets_non_target_revenue_adjustment_platform_credit transaction type. - """ - MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_PLATFORM_CREDIT - - """ - The managed_markets_non_target_revenue_adjustment_platform_credit_reversal transaction type. - """ - MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_PLATFORM_CREDIT_REVERSAL - - """ - The managed_markets_non_target_revenue_adjustment_platform_debit transaction type. - """ - MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_PLATFORM_DEBIT - - """ - The managed_markets_non_target_revenue_adjustment_platform_debit_reversal transaction type. - """ - MANAGED_MARKETS_NON_TARGET_REVENUE_ADJUSTMENT_PLATFORM_DEBIT_REVERSAL - - """ - The managed_markets_refund_debit transaction type. - """ - MANAGED_MARKETS_REFUND_DEBIT - - """ - The managed_markets_refund_debit_reversal transaction type. - """ - MANAGED_MARKETS_REFUND_DEBIT_REVERSAL - - """ - The managed_markets_webhook_adjustment_credit transaction type. - """ - MANAGED_MARKETS_WEBHOOK_ADJUSTMENT_CREDIT - - """ - The managed_markets_webhook_adjustment_credit_reversal transaction type. - """ - MANAGED_MARKETS_WEBHOOK_ADJUSTMENT_CREDIT_REVERSAL - - """ - The managed_markets_webhook_adjustment_debit transaction type. - """ - MANAGED_MARKETS_WEBHOOK_ADJUSTMENT_DEBIT - - """ - The managed_markets_webhook_adjustment_debit_reversal transaction type. - """ - MANAGED_MARKETS_WEBHOOK_ADJUSTMENT_DEBIT_REVERSAL - - """ - The marketplace_fee_credit transaction type. - """ - MARKETPLACE_FEE_CREDIT - - """ - The marketplace_fee_credit_reversal transaction type. - """ - MARKETPLACE_FEE_CREDIT_REVERSAL - - """ - The markets_pro_credit transaction type. - """ - MARKETS_PRO_CREDIT - - """ - The merchant_goodwill_credit transaction type. - """ - MERCHANT_GOODWILL_CREDIT - - """ - The merchant_goodwill_credit_reversal transaction type. - """ - MERCHANT_GOODWILL_CREDIT_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 merchant_to_merchant_debit transaction type. - """ - MERCHANT_TO_MERCHANT_DEBIT - - """ - The merchant_to_merchant_debit_reversal transaction type. - """ - MERCHANT_TO_MERCHANT_DEBIT_REVERSAL - - """ - The mobilepay_service_fee transaction type. - """ - MOBILEPAY_SERVICE_FEE - - """ - The mobilepay_service_fee_refund transaction type. - """ - MOBILEPAY_SERVICE_FEE_REFUND - - """ - The promotion_credit transaction type. - """ - PROMOTION_CREDIT - - """ - The promotion_credit_reversal transaction type. - """ - PROMOTION_CREDIT_REVERSAL - - """ - The referral_fee transaction type. - """ - REFERRAL_FEE - - """ - The referral_fee_tax transaction type. - """ - REFERRAL_FEE_TAX - - """ - The refund transaction type. - """ - REFUND - - """ - The refund_adjustment transaction type. - """ - REFUND_ADJUSTMENT - - """ - The refund_failure transaction type. - """ - REFUND_FAILURE - - """ - The reserved_funds transaction type. - """ - RESERVED_FUNDS - - """ - The reserved_funds_reversal transaction type. - """ - RESERVED_FUNDS_REVERSAL - - """ - The reserved_funds_withdrawal transaction type. - """ - RESERVED_FUNDS_WITHDRAWAL - - """ - The risk_reversal transaction type. - """ - RISK_REVERSAL - - """ - The risk_withdrawal transaction type. - """ - RISK_WITHDRAWAL - - """ - The seller_protection_credit transaction type. - """ - SELLER_PROTECTION_CREDIT - - """ - The seller_protection_credit_reversal transaction type. - """ - SELLER_PROTECTION_CREDIT_REVERSAL - - """ - The shipping_label transaction type. - """ - SHIPPING_LABEL - - """ - 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_other_carrier_charge_adjustment transaction type. - """ - SHIPPING_OTHER_CARRIER_CHARGE_ADJUSTMENT - - """ - The shipping_return_to_origin_adjustment transaction type. - """ - SHIPPING_RETURN_TO_ORIGIN_ADJUSTMENT - - """ - The shopify_collective_credit transaction type. - """ - SHOPIFY_COLLECTIVE_CREDIT - - """ - The shopify_collective_credit_reversal transaction type. - """ - SHOPIFY_COLLECTIVE_CREDIT_REVERSAL - - """ - The shopify_collective_debit transaction type. - """ - SHOPIFY_COLLECTIVE_DEBIT - - """ - The shopify_collective_debit_reversal transaction type. - """ - SHOPIFY_COLLECTIVE_DEBIT_REVERSAL - - """ - The shopify_source_credit transaction type. - """ - SHOPIFY_SOURCE_CREDIT - - """ - The shopify_source_credit_reversal transaction type. - """ - SHOPIFY_SOURCE_CREDIT_REVERSAL - - """ - The shopify_source_debit transaction type. - """ - SHOPIFY_SOURCE_DEBIT - - """ - The shopify_source_debit_reversal transaction type. - """ - SHOPIFY_SOURCE_DEBIT_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_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 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_credit transaction type. - """ - SHOP_CASH_CREDIT - - """ - The shop_cash_credit_reversal transaction type. - """ - SHOP_CASH_CREDIT_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 stripe_fee transaction type. - """ - STRIPE_FEE - - """ - The tax_adjustment_credit transaction type. - """ - TAX_ADJUSTMENT_CREDIT - - """ - The tax_adjustment_credit_reversal transaction type. - """ - TAX_ADJUSTMENT_CREDIT_REVERSAL - - """ - The tax_adjustment_debit transaction type. - """ - TAX_ADJUSTMENT_DEBIT - - """ - The tax_adjustment_debit_reversal transaction type. - """ - TAX_ADJUSTMENT_DEBIT_REVERSAL - - """ - The transfer transaction type. - """ - TRANSFER - - """ - The transfer_cancel transaction type. - """ - TRANSFER_CANCEL - - """ - The transfer_failure transaction type. - """ - TRANSFER_FAILURE - - """ - The transfer_refund transaction type. - """ - TRANSFER_REFUND - - """ - The vat_refund_credit transaction type. - """ - VAT_REFUND_CREDIT - - """ - The vat_refund_credit_reversal transaction type. - """ - VAT_REFUND_CREDIT_REVERSAL -} - -""" -The status of an order's eligibility for protection against fraudulent chargebacks by Shopify Protect. -""" -enum ShopifyProtectEligibilityStatus @componentName(name: "reviews") { - """ - 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. - """ - ELIGIBLE - - """ - The order isn't eligible for protection against fraudulent chargebacks. - """ - NOT_ELIGIBLE - - """ - The eligibility of the order is pending and has not yet been determined. - """ - PENDING -} - -""" -The eligibility details of an order's protection against fraudulent chargebacks by Shopify Protect. -""" -type ShopifyProtectOrderEligibility @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { - """ - The status of whether an order is eligible for protection against fraudulent chargebacks. - """ - status: ShopifyProtectEligibilityStatus! -} - -""" -A summary of Shopify Protect details for an order. -""" -type ShopifyProtectOrderSummary @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "reviews") { - """ - The eligibility details of an order's protection against fraudulent chargebacks. - """ - eligibility: ShopifyProtectOrderEligibility! - - """ - The status of the order's protection against fraudulent chargebacks. - """ - status: ShopifyProtectStatus! -} - -""" -The status of an order's protection with Shopify Protect. -""" -enum ShopifyProtectStatus @componentName(name: "reviews") { - """ - 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. - """ - ACTIVE - - """ - The protection for an order isn't active because the order didn't meet eligibility requirements. - """ - INACTIVE - - """ - The order received a chargeback but the order wasn't protected because it didn't meet coverage requirements. - """ - NOT_PROTECTED - - """ - The protection for the order is pending and has not yet been determined. - """ - PENDING - - """ - The order received a fraudulent chargeback and it was protected. - """ - PROTECTED -} - -""" -A response to a ShopifyQL query. -""" -type ShopifyqlQueryResponse @requiredAccess(scope: "`read_reports` access scope.") @componentName(name: "reporting") { - """ - A list of analytics targets that match the ShopifyQL query. - For target gauge queries, returns the matching target if one exists. - For `COMPARE TO targets` queries, returns matching targets for visualized metrics in `VISUALIZE` order. - Returns an empty list when no targets match or the ShopifyQL query cannot be matched. - Query `parseErrors` to detect invalid ShopifyQL. - """ - analyticsTargets: [AnalyticsTarget!]! - - """ - A list of parse errors, if parsing fails. - """ - parseErrors: [String!]! - - """ - The result in a tabular format with column and row data. - """ - tableData: ShopifyqlTableData -} - -""" -The result of a ShopifyQL query. -""" -type ShopifyqlTableData @requiredAccess(scope: "`read_reports` access scope.") @componentName(name: "reporting") { - """ - The columns of the table. - """ - columns: [ShopifyqlTableDataColumn!]! - - """ - The rows of the table. - """ - rows: JSON! -} - -""" -Represents a column in a ShopifyQL query response. -""" -type ShopifyqlTableDataColumn @requiredAccess(scope: "`read_reports` access scope.") @componentName(name: "reporting") { - """ - The data type of the column. - """ - dataType: ColumnDataType! - - """ - The human-readable display name of the column. - """ - displayName: String! - - """ - The name of the column. - """ - name: String! - - """ - The sub type of an array column. - """ - 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 @requiredAccess(scope: "`read_users` access scope. Also: The app must be a finance embedded app or installed on a Shopify Plus or Advanced store. Contact Shopify Support to enable this scope for your app.") @componentName(name: "user_management") { - """ - The type of account the staff member has. - """ - accountType: AccountType - - """ - Whether the staff member is active. - """ - active: Boolean! - - """ - The image used as the staff member's avatar in the Shopify admin. - """ - avatar( - """ - The default image returned if the staff member has no avatar. - """ - fallback: StaffMemberDefaultImage = DEFAULT - - """ - The image height in pixels between 1 and 2048. - """ - maxHeight: Int @deprecated(reason: "Use `maxHeight` argument on `image` instead.") - - """ - The image width in pixels between 1 and 2048. - """ - maxWidth: Int @deprecated(reason: "Use `maxWidth` on argument `image` instead.") - ): Image! - - """ - The staff member's email address. - """ - email: String! - - """ - Whether the staff member's account exists. - """ - exists: Boolean! - - """ - The staff member's first name. - """ - firstName: String - - """ - A globally-unique ID. - """ - id: ID! - - """ - The Identity account details for the staff member. - """ - identityAccount: IdentityAccount - - """ - The account settings page URL for the staff member. - """ - identityAccountUrl: URL @deprecated(reason: "Use `identityAccount` instead.") - - """ - 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 @componentName(name: "platform") { - """ - 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 @componentName(name: "user_management") { - """ - Returns a default avatar image for the staff member. - """ - DEFAULT - - """ - Returns a URL that returns a 404 error if the image is not present. - """ - NOT_FOUND - - """ - Returns a transparent avatar image for the staff member. - """ - TRANSPARENT -} - -""" -An auto-generated type which holds one StaffMember and a cursor during pagination. -""" -type StaffMemberEdge @componentName(name: "user_management") { - """ - 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 @componentName(name: "user_management") { - """ - The staff member can manage and install apps and channels. - """ - APPLICATIONS - - """ - The staff member can export store data via bulk data operations. - """ - BULK_DATA_EXPORT - - """ - The staff member can import store data via bulk data operations. - """ - BULK_DATA_IMPORT - - """ - 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 create and edit markets. - """ - CREATE_AND_EDIT_MARKETS - - """ - 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 delete markets. - """ - DELETE_MARKETS - - """ - 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 edit theme code. - """ - EDIT_THEME_CODE - - """ - 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 manage shipping and delivery. - """ - MANAGE_DELIVERY_SETTINGS - - """ - The staff member can manage policy pages. - """ - MANAGE_POLICIES - - """ - The staff member can manage taxes and duties. - """ - MANAGE_TAXES_SETTINGS - - """ - 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 a draft order by manually entering a credit card number. - """ - PAY_DRAFT_ORDERS_BY_CREDIT_CARD - - """ - The staff member can pay for an order by manually entering a credit card number. - """ - PAY_ORDERS_BY_CREDIT_CARD - - """ - 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 refund orders. - """ - REFUND_ORDERS - - """ - 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.") - - """ - The staff member can view markets. - """ - VIEW_MARKETS -} - -""" -Represents the data used to customize the Shopify admin experience for a logged-in staff member. -""" -type StaffMemberPrivateData @componentName(name: "user_management") { - """ - 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 @componentName(name: "user_management") { - """ - Sort by the `email` value. - """ - EMAIL - - """ - Sort by the `first_name` value. - """ - FIRST_NAME - - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `last_name` value. - """ - 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 @componentName(name: "platform") { - """ - The image filename. - """ - filename: String! - - """ - HTTP method to be used by the staged upload. - """ - httpMethod: StagedUploadHttpMethodType = PUT - - """ - The image MIME type. - """ - mimeType: String! - - """ - The image resource. - """ - resource: StagedUploadTargetGenerateUploadResource! -} - -""" -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 @componentName(name: "platform") { - """ - Parameters needed to authenticate a request to upload the file. - """ - parameters: [StagedUploadParameter!]! - - """ - 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. - """ - resourceUrl: URL - - """ - The URL to use when sending an request to upload the file. Should be used in conjunction with - the parameters field. - """ - 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 @componentName(name: "platform") { - """ - The POST HTTP method. - """ - POST - - """ - The PUT HTTP method. - """ - PUT -} - -""" -The input fields for generating staged upload targets. -""" -input StagedUploadInput @componentName(name: "platform") { - """ - 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). - """ - fileSize: UnsignedInt64 - - """ - The file's name and extension. - """ - filename: String! - - """ - The HTTP method to be used when sending a request to upload the file using the returned staged - upload target. - """ - httpMethod: StagedUploadHttpMethodType = PUT - - """ - The file's MIME type. - """ - mimeType: String! - - """ - The file's intended Shopify resource type. - """ - resource: StagedUploadTargetGenerateUploadResource! -} - -""" -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 @componentName(name: "platform") { - """ - The parameter's name. - """ - name: String! - - """ - The parameter's value. - """ - 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 @componentName(name: "platform") { - """ - The parameters of an image to be uploaded. - """ - parameters: [ImageUploadParameter!]! - - """ - The image URL. - """ - 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 @componentName(name: "platform") { - """ - The size of the file to upload, in bytes. - """ - fileSize: UnsignedInt64 - - """ - The filename of the asset being uploaded. - """ - filename: String! - - """ - The HTTP method to be used by the staged upload. - """ - httpMethod: StagedUploadHttpMethodType = PUT - - """ - The MIME type of the asset being uploaded. - """ - mimeType: String! - - """ - The resource type being uploaded. - """ - resource: StagedUploadTargetGenerateUploadResource! -} - -""" -Return type for `stagedUploadTargetGenerate` mutation. -""" -type StagedUploadTargetGeneratePayload @componentName(name: "platform") { - """ - The signed parameters that can be used to upload the asset. - """ - parameters: [MutationsStagedUploadTargetGenerateUploadParameter!]! - - """ - The signed URL where the asset can be uploaded. - """ - url: String! - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -The resource type to receive. -""" -enum StagedUploadTargetGenerateUploadResource @componentName(name: "platform") { - """ - 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). - """ - BULK_MUTATION_VARIABLES - - """ - 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. - """ - COLLECTION_IMAGE - - """ - 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). - """ - DISPUTE_FILE_UPLOAD - - """ - 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). - """ - FILE - - """ - 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). - """ - IMAGE - - """ - 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). - """ - MODEL_3D - - """ - 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). - """ - PRODUCT_IMAGE @deprecated(reason: "Use IMAGE instead. This resource type will be removed in a future version.") - - """ - 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). - """ - RETURN_LABEL - - """ - 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). - """ - SHOP_IMAGE - - """ - 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). - """ - URL_REDIRECT_IMPORT - - """ - 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). - """ - VIDEO -} - -""" -Return type for `stagedUploadTargetsGenerate` mutation. -""" -type StagedUploadTargetsGeneratePayload @componentName(name: "platform") { - """ - The staged upload targets that were generated. - """ - urls: [StagedUploadTarget!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `stagedUploadsCreate` mutation. -""" -type StagedUploadsCreatePayload @componentName(name: "platform") { - """ - The staged upload targets that were generated. - """ - stagedTargets: [StagedMediaUploadTarget!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -The input fields for the access settings for the metafields under the standard definition. -""" -input StandardMetafieldDefinitionAccessInput @componentName(name: "content") { - """ - The Admin API access setting to use for the metafields under this definition. - """ - admin: MetafieldAdminAccessInput - - """ - The Customer Account API access setting to use for the metafields under this definition. - """ - customerAccount: MetafieldCustomerAccountAccessInput - - """ - The Storefront API access setting to use for the metafields under this definition. - """ - storefront: MetafieldStorefrontAccessInput -} - -""" -Return type for `standardMetafieldDefinitionEnable` mutation. -""" -type StandardMetafieldDefinitionEnablePayload @componentName(name: "platform") { - """ - The metafield definition that was created. - """ - createdDefinition: MetafieldDefinition - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [StandardMetafieldDefinitionEnableUserError!]! -} - -""" -An error that occurs during the execution of `StandardMetafieldDefinitionEnable`. -""" -type StandardMetafieldDefinitionEnableUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: StandardMetafieldDefinitionEnableUserErrorCode - - """ - 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 `StandardMetafieldDefinitionEnableUserError`. -""" -enum StandardMetafieldDefinitionEnableUserErrorCode @componentName(name: "platform") { - """ - Admin access can only be specified for app-owned metafield definitions. - """ - ADMIN_ACCESS_INPUT_NOT_ALLOWED - - """ - The metafield definition capability cannot be disabled. - """ - CAPABILITY_CANNOT_BE_DISABLED - - """ - The input value is invalid. - """ - INVALID - - """ - The metafield definition capability is invalid. - """ - INVALID_CAPABILITY - - """ - The input combination is invalid. - """ - INVALID_INPUT_COMBINATION - - """ - The maximum number of definitions per owner type has been exceeded. - """ - LIMIT_EXCEEDED - - """ - You have reached the maximum allowed definitions to be used as admin filters. - """ - OWNER_TYPE_LIMIT_EXCEEDED_FOR_USE_AS_ADMIN_FILTERS - - """ - The input value is already taken. - """ - TAKEN - - """ - The standard metafield definition template was not found. - """ - TEMPLATE_NOT_FOUND - - """ - The definition type is not eligible to be used as collection condition. - """ - TYPE_NOT_ALLOWED_FOR_CONDITIONS - - """ - The namespace and key is already in use for a set of your metafields. - """ - UNSTRUCTURED_ALREADY_EXISTS - - """ - The metafield definition does not support pinning. - """ - UNSUPPORTED_PINNING -} - -""" -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 @componentName(name: "content") { - """ - 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. - """ - name: String! - - """ - The namespace owned by the definition after the definition has been activated. - """ - namespace: String! - - """ - The list of resource types that the standard metafield definition can be applied to. - """ - ownerTypes: [MetafieldOwnerType!]! - - """ - The associated [metafield definition - type](https://shopify.dev/apps/metafields/definitions/types) that the - metafield stores. - """ - type: MetafieldDefinitionType! - - """ - The configured validations for the standard metafield definition. - """ - validations: [MetafieldDefinitionValidation!]! - - """ - Whether metafields for the definition are by default visible using the Storefront API. - """ - visibleToStorefrontApi: Boolean! -} - -""" -An auto-generated type for paginating through multiple StandardMetafieldDefinitionTemplates. -""" -type StandardMetafieldDefinitionTemplateConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [StandardMetafieldDefinitionTemplateEdge!]! - - """ - 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. - """ - nodes: [StandardMetafieldDefinitionTemplate!]! - - """ - 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 StandardMetafieldDefinitionTemplate and a cursor during pagination. -""" -type StandardMetafieldDefinitionTemplateEdge @componentName(name: "content") { - """ - 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 StandardMetafieldDefinitionTemplateEdge. - """ - node: StandardMetafieldDefinitionTemplate! -} - -""" -The input fields for enabling a standard metafield definition. -""" -input StandardMetafieldDefinitionsEnableInput @componentName(name: "content") { - """ - The access settings that apply to each of the metafields that belong to the metafield definition. - """ - access: StandardMetafieldDefinitionAccessInput - - """ - The capabilities of the metafield definition. - """ - capabilities: MetafieldCapabilityCreateInput - - """ - The key of the standard metafield to enable. Used in combination with `namespace`. - """ - key: String! - - """ - The namespace of the standard metafield to enable. Used in combination with `key`. - """ - namespace: String! - - """ - The resource type that the metafield definition is scoped to. - """ - ownerType: MetafieldOwnerType! - - """ - 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.") -} - -""" -Return type for `standardMetafieldDefinitionsEnable` mutation. -""" -type StandardMetafieldDefinitionsEnablePayload @componentName(name: "platform") { - """ - The list of definitions that were enabled. - """ - definitions: [MetafieldDefinition!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [StandardMetafieldDefinitionsEnableUserError!]! -} - -""" -An error that occurs during the execution of `StandardMetafieldDefinitionsEnable`. -""" -type StandardMetafieldDefinitionsEnableUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: StandardMetafieldDefinitionsEnableUserErrorCode - - """ - 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 `StandardMetafieldDefinitionsEnableUserError`. -""" -enum StandardMetafieldDefinitionsEnableUserErrorCode @componentName(name: "platform") { - """ - Admin access can only be specified for app-owned metafield definitions. - """ - ADMIN_ACCESS_INPUT_NOT_ALLOWED - - """ - The input value is invalid. - """ - INVALID - - """ - The metafield definition capability is invalid. - """ - INVALID_CAPABILITY - - """ - The input combination is invalid. - """ - INVALID_INPUT_COMBINATION - - """ - Too many standard definitions were provided. - """ - LESS_THAN_OR_EQUAL_TO - - """ - The maximum number of definitions per owner type has been exceeded. - """ - LIMIT_EXCEEDED - - """ - The input value is already taken. - """ - TAKEN - - """ - The standard metafield definition template was not found. - """ - TEMPLATE_NOT_FOUND - - """ - The definition type is not eligible to be used as collection condition. - """ - TYPE_NOT_ALLOWED_FOR_CONDITIONS - - """ - The namespace and key is already in use for a set of your metafields. - """ - UNSTRUCTURED_ALREADY_EXISTS - - """ - The metafield definition does not support pinning. - """ - UNSUPPORTED_PINNING -} - -""" -Describes a capability that is enabled on a Metaobject Definition. -""" -type StandardMetaobjectCapabilityTemplate @componentName(name: "content") { - """ - The type of capability that's enabled for the metaobject definition. - """ - capabilityType: MetaobjectCapabilityType! -} - -""" -Return type for `standardMetaobjectDefinitionEnable` mutation. -""" -type StandardMetaobjectDefinitionEnablePayload @componentName(name: "platform") { - """ - The metaobject definition that was enabled using the standard template. - """ - metaobjectDefinition: MetaobjectDefinition - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MetaobjectUserError!]! -} - -""" -A preset field definition on a standard metaobject definition template. -""" -type StandardMetaobjectDefinitionFieldTemplate @componentName(name: "content") { - """ - The administrative description. - """ - description: String - - """ - The key owned by the definition after the definition has been enabled. - """ - key: String! - - """ - The human-readable name. - """ - name: String! - - """ - The required status of the field within the object composition. - """ - required: Boolean! - - """ - The associated [metafield definition - type](https://shopify.dev/apps/metafields/definitions/types) that the - metafield stores. - """ - type: MetafieldDefinitionType! - - """ - The configured validations for the standard metafield definition. - """ - validations: [MetafieldDefinitionValidation!]! - - """ - Whether metafields for the definition are by default visible using the Storefront API. - """ - visibleToStorefrontApi: Boolean! -} - -""" -Standard metaobject definition templates provide preset configurations to create metaobject definitions. -""" -type StandardMetaobjectDefinitionTemplate @componentName(name: "content") { - """ - Access configuration for the standard metaobject definition template. - """ - access: MetaobjectAccess! - - """ - The administrative description. - """ - description: String - - """ - The key of a field to reference as the display name for each object. - """ - displayNameKey: String - - """ - The capabilities of the metaobject definition. - """ - enabledCapabilities: [StandardMetaobjectCapabilityTemplate!]! - - """ - Templates for the associated field definitions. - """ - fieldDefinitions: [StandardMetaobjectDefinitionFieldTemplate!]! - - """ - The human-readable name. - """ - name: String! - - """ - The namespace owned by the definition after the definition has been enabled. - """ - 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 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The product taxonomy node associated with the standardized product type. - """ - productTaxonomyNode: ProductTaxonomyNode -} - -""" -The status of a Balance bank account. -""" -enum Status @componentName(name: "banking") { - """ - Active. - """ - ACTIVE - - """ - Closed. - """ - CLOSED - - """ - Inactive. - """ - INACTIVE -} - -""" -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 @requiredAccess(scope: "`read_store_credit_accounts` access scope.") @componentName(name: "stored_value_instruments") @protectedObject(subject: "customer") { - """ - The current balance of the store credit account. - """ - balance: MoneyV2! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The owner of the store credit account. - """ - owner: HasStoreCreditAccounts! @requiredAccess(scope: "`read_customers` access scope or `read_companies` access scope.") - - """ - The transaction history of the store credit account. - """ - transactions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | 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'` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | remaining_amount | float | Filter transactions by remaining amount. Only - applicable to StoreCreditAccountCreditTransaction objects. All other objects - are handled as if they have a null remaining amount. | | | - - `remaining_amount:0`
- `remaining_amount:1.60`
- - `remaining_amount:>5.00` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: TransactionSortKeys = CREATED_AT - ): StoreCreditAccountTransactionConnection! -} - -""" -An auto-generated type for paginating through multiple StoreCreditAccounts. -""" -type StoreCreditAccountConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [StoreCreditAccountEdge!]! - - """ - 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. - """ - nodes: [StoreCreditAccount!]! - - """ - 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 a store credit account credit transaction. -""" -input StoreCreditAccountCreditInput @componentName(name: "stored_value_instruments") { - """ - The amount to credit the store credit account. - """ - creditAmount: MoneyInput! - - """ - The date and time when the credit expires. - """ - expiresAt: DateTime - - """ - Whether to send a notification to the account owner when the store credit is issued. - Defaults to `false`. - """ - notify: Boolean = false -} - -""" -Return type for `storeCreditAccountCredit` mutation. -""" -type StoreCreditAccountCreditPayload @componentName(name: "platform") { - """ - The store credit account transaction that was created. - """ - storeCreditAccountTransaction: StoreCreditAccountCreditTransaction - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [StoreCreditAccountCreditUserError!]! -} - -""" -A credit transaction which increases the store credit account balance. -""" -type StoreCreditAccountCreditTransaction implements Node & StoreCreditAccountTransaction @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { - """ - The store credit account that the transaction belongs to. - """ - account: StoreCreditAccount! - - """ - The amount of the transaction. - """ - amount: MoneyV2! - - """ - The balance of the account after the transaction. - """ - balanceAfterTransaction: MoneyV2! - - """ - The date and time when the transaction was created. - """ - createdAt: DateTime! - - """ - The event that caused the store credit account transaction. - """ - event: StoreCreditSystemEvent! - - """ - The time at which the transaction expires. - Debit transactions will always spend the soonest expiring credit first. - """ - expiresAt: DateTime - - """ - A globally-unique ID. - """ - id: ID! - - """ - The origin of the store credit account transaction. - """ - origin: StoreCreditAccountTransactionOrigin - - """ - 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. - """ - remainingAmount: MoneyV2! -} - -""" -An error that occurs during the execution of `StoreCreditAccountCredit`. -""" -type StoreCreditAccountCreditUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: StoreCreditAccountCreditUserErrorCode - - """ - 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 `StoreCreditAccountCreditUserError`. -""" -enum StoreCreditAccountCreditUserErrorCode @componentName(name: "platform") { - """ - The store credit account could not be found. - """ - ACCOUNT_NOT_FOUND - - """ - The operation would cause the account's credit limit to be exceeded. - """ - CREDIT_LIMIT_EXCEEDED - - """ - The expiry date must be in the future. - """ - EXPIRES_AT_IN_PAST - - """ - The currency provided does not match the currency of the store credit account. - """ - MISMATCHING_CURRENCY - - """ - A positive amount must be used to credit a store credit account. - """ - NEGATIVE_OR_ZERO_AMOUNT - - """ - Owner does not exist. - """ - OWNER_NOT_FOUND - - """ - The currency provided is not currently supported. - """ - UNSUPPORTED_CURRENCY -} - -""" -The input fields for a store credit account debit transaction. -""" -input StoreCreditAccountDebitInput @componentName(name: "stored_value_instruments") { - """ - The amount to debit the store credit account. - """ - debitAmount: MoneyInput! -} - -""" -Return type for `storeCreditAccountDebit` mutation. -""" -type StoreCreditAccountDebitPayload @componentName(name: "platform") { - """ - The store credit account transaction that was created. - """ - storeCreditAccountTransaction: StoreCreditAccountDebitTransaction - - """ - The list of errors that occurred from executing the mutation. - """ - 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 @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { - """ - The store credit account that the transaction belongs to. - """ - account: StoreCreditAccount! - - """ - The amount of the transaction. - """ - amount: MoneyV2! - - """ - The balance of the account after the transaction. - """ - balanceAfterTransaction: MoneyV2! - - """ - The date and time when the transaction was created. - """ - createdAt: DateTime! - - """ - The reverted debit transaction. - """ - debitTransaction: StoreCreditAccountDebitTransaction! - - """ - The event that caused the store credit account transaction. - """ - event: StoreCreditSystemEvent! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The origin of the store credit account transaction. - """ - origin: StoreCreditAccountTransactionOrigin -} - -""" -A debit transaction which decreases the store credit account balance. -""" -type StoreCreditAccountDebitTransaction implements Node & StoreCreditAccountTransaction @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { - """ - The store credit account that the transaction belongs to. - """ - account: StoreCreditAccount! - - """ - The amount of the transaction. - """ - amount: MoneyV2! - - """ - The balance of the account after the transaction. - """ - balanceAfterTransaction: MoneyV2! - - """ - The date and time when the transaction was created. - """ - createdAt: DateTime! - - """ - The event that caused the store credit account transaction. - """ - event: StoreCreditSystemEvent! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The origin of the store credit account transaction. - """ - origin: StoreCreditAccountTransactionOrigin -} - -""" -An error that occurs during the execution of `StoreCreditAccountDebit`. -""" -type StoreCreditAccountDebitUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: StoreCreditAccountDebitUserErrorCode - - """ - 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 `StoreCreditAccountDebitUserError`. -""" -enum StoreCreditAccountDebitUserErrorCode @componentName(name: "platform") { - """ - The store credit account could not be found. - """ - ACCOUNT_NOT_FOUND - - """ - The store credit account does not have sufficient funds to satisfy the request. - """ - INSUFFICIENT_FUNDS - - """ - The currency provided does not match the currency of the store credit account. - """ - MISMATCHING_CURRENCY - - """ - A positive amount must be used to debit a store credit account. - """ - NEGATIVE_OR_ZERO_AMOUNT -} - -""" -An auto-generated type which holds one StoreCreditAccount and a cursor during pagination. -""" -type StoreCreditAccountEdge @componentName(name: "stored_value_instruments") { - """ - 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 StoreCreditAccountEdge. - """ - node: StoreCreditAccount! -} - -""" -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. -""" -type StoreCreditAccountExpirationTransaction implements StoreCreditAccountTransaction @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { - """ - The store credit account that the transaction belongs to. - """ - account: StoreCreditAccount! - - """ - The amount of the transaction. - """ - amount: MoneyV2! - - """ - The balance of the account after the transaction. - """ - balanceAfterTransaction: MoneyV2! - - """ - The date and time when the transaction was created. - """ - createdAt: DateTime! - - """ - The credit transaction which expired. - """ - creditTransaction: StoreCreditAccountCreditTransaction! - - """ - The event that caused the store credit account transaction. - """ - event: StoreCreditSystemEvent! - - """ - The origin of the store credit account transaction. - """ - origin: StoreCreditAccountTransactionOrigin -} - -""" -Interface for a store credit account transaction. -""" -interface StoreCreditAccountTransaction @requiredAccess(scope: "`read_store_credit_account_transactions` access scope.") @componentName(name: "stored_value_instruments") { - """ - The store credit account that the transaction belongs to. - """ - account: StoreCreditAccount! - - """ - The amount of the transaction. - """ - amount: MoneyV2! - - """ - The balance of the account after the transaction. - """ - balanceAfterTransaction: MoneyV2! - - """ - The date and time when the transaction was created. - """ - createdAt: DateTime! - - """ - The event that caused the store credit account transaction. - """ - event: StoreCreditSystemEvent! - - """ - The origin of the store credit account transaction. - """ - origin: StoreCreditAccountTransactionOrigin -} - -""" -An auto-generated type for paginating through multiple StoreCreditAccountTransactions. -""" -type StoreCreditAccountTransactionConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [StoreCreditAccountTransactionEdge!]! - - """ - 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. - """ - nodes: [StoreCreditAccountTransaction!]! - - """ - 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 StoreCreditAccountTransaction and a cursor during pagination. -""" -type StoreCreditAccountTransactionEdge @componentName(name: "stored_value_instruments") { - """ - 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 StoreCreditAccountTransactionEdge. - """ - node: StoreCreditAccountTransaction! -} - -""" -The origin of a store credit account transaction. -""" -union StoreCreditAccountTransactionOrigin @componentName(name: "stored_value_instruments") = OrderTransaction - -""" -The store credit configuration for a shop. -""" -type StoreCreditConfiguration @componentName(name: "stored_value_instruments") { - """ - Whether store credit is enabled for customers on checkout. - """ - storeCreditEnabled: Boolean! -} - -""" -The input fields to process a refund to store credit. -""" -input StoreCreditRefundInput @componentName(name: "returns") { - """ - The amount to be issued as store credit. - """ - amount: MoneyInput! - - """ - An optional expiration date for the store credit being issued. - """ - expiresAt: DateTime -} - -""" -The event that caused the store credit account transaction. -""" -enum StoreCreditSystemEvent @componentName(name: "stored_value_instruments") { - """ - An adjustment was made to the store credit account. - """ - ADJUSTMENT - - """ - Store credit was returned when an authorized payment was voided. - """ - ORDER_CANCELLATION - - """ - Store credit was used as payment for an order. - """ - ORDER_PAYMENT - - """ - Store credit was refunded from an order. - """ - ORDER_REFUND - - """ - A store credit payment was reverted due to another payment method failing. - """ - PAYMENT_FAILURE - - """ - A smaller amount of store credit was captured than was originally authorized. - """ - PAYMENT_RETURNED - - """ - Tax finalization affected the store credit payment. - """ - 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 @componentName(name: "apps") { - """ - List of permissions associated with the token. - """ - accessScopes: [AccessScope!]! - - """ - The issued public access token. - """ - accessToken: String! - - """ - The date and time when the public access token was created. - """ - createdAt: DateTime! - - """ - A globally-unique ID. - """ - id: ID! - - """ - An arbitrary title for each token determined by the developer, used for reference purposes. - """ - title: String! - - """ - The date and time when the storefront access token was updated. - """ - updatedAt: DateTime! -} - -""" -An auto-generated type for paginating through multiple StorefrontAccessTokens. -""" -type StorefrontAccessTokenConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [StorefrontAccessTokenEdge!]! - - """ - 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. - """ - nodes: [StorefrontAccessToken!]! - - """ - 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 `storefrontAccessTokenCreate` mutation. -""" -type StorefrontAccessTokenCreatePayload @componentName(name: "platform") { - """ - The user's shop. - """ - shop: Shop! - - """ - The storefront access token. - """ - storefrontAccessToken: StorefrontAccessToken - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -The input fields to delete a storefront access token. -""" -input StorefrontAccessTokenDeleteInput @componentName(name: "apps") { - """ - The ID of the storefront access token to delete. - """ - id: ID! @gidTypes(types: ["StorefrontAccessToken"]) -} - -""" -Return type for `storefrontAccessTokenDelete` mutation. -""" -type StorefrontAccessTokenDeletePayload @componentName(name: "platform") { - """ - The ID of the deleted storefront access token. - """ - deletedStorefrontAccessTokenId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -An auto-generated type which holds one StorefrontAccessToken and a cursor during pagination. -""" -type StorefrontAccessTokenEdge @componentName(name: "apps") { - """ - 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 StorefrontAccessTokenEdge. - """ - node: StorefrontAccessToken! -} - -""" -The input fields for a storefront access token. -""" -input StorefrontAccessTokenInput @componentName(name: "apps") { - """ - A title for the storefront access token. - """ - 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 - -""" -An auto-generated type for paginating through multiple Strings. -""" -type StringConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [StringEdge!]! - - """ - 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. - """ - nodes: [String!]! - - """ - 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 String and a cursor during pagination. -""" -type StringEdge { - """ - 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 StringEdge. - """ - node: String! -} - -""" -The actor who initiated a subscription action. -""" -enum SubscriptionActor @componentName(name: "sales") { - """ - The subscription action was initiated by a customer. - """ - CUSTOMER - - """ - The subscription action was initiated by a merchant. - """ - MERCHANT - - """ - The subscription action was initiated by a partner. - """ - PARTNER -} - -""" -Represents an applied code discount. -""" -type SubscriptionAppliedCodeDiscount @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The unique ID. - """ - id: ID! - - """ - The redeem code of the discount that applies on the subscription. - """ - redeemCode: String! - - """ - The reason that the discount on the subscription draft is rejected. - """ - rejectionReason: SubscriptionDiscountRejectionReason -} - -""" -The input fields for mapping a subscription line to a discount. -""" -input SubscriptionAtomicLineInput @componentName(name: "sales") { - """ - The discount to be added to the subscription line. - """ - discounts: [SubscriptionAtomicManualDiscountInput!] - - """ - The new subscription line. - """ - line: SubscriptionLineInput! -} - -""" -The input fields for mapping a subscription line to a discount. -""" -input SubscriptionAtomicManualDiscountInput @componentName(name: "sales") { - """ - The maximum number of times the subscription discount will be applied on orders. - """ - recurringCycleLimit: Int - - """ - The title associated with the subscription discount. - """ - title: String - - """ - Percentage or fixed amount value of the discount. - """ - value: SubscriptionManualDiscountValueInput -} - -""" -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 @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - The date and time when the billing attempt was completed. - """ - completedAt: DateTime - - """ - The date and time when the billing attempt was created. - """ - createdAt: DateTime! - - """ - A code corresponding to a payment error during processing. - """ - errorCode: SubscriptionBillingAttemptErrorCode @deprecated(reason: "Use `state` instead.") - - """ - A message describing a payment error during processing. - """ - errorMessage: String @deprecated(reason: "Use `state` instead.") - - """ - A globally-unique ID. - """ - id: ID! - - """ - A unique key generated by the client to avoid duplicate payments. - """ - idempotencyKey: String! - - """ - The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow. - """ - nextActionUrl: URL @deprecated(reason: "Use `state` instead.") - - """ - The result of this billing attempt if completed successfully. - """ - order: Order @deprecated(reason: "Use `state` instead.") - - """ - 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. - """ - originTime: DateTime - - """ - The reference shared between retried payment attempts. - """ - paymentGroupId: String - - """ - The reference shared between payment attempts with similar payment details. - """ - paymentSessionId: String - - """ - Error information from processing the billing attempt. - """ - processingError: SubscriptionBillingAttemptProcessingError @deprecated(reason: "Use `state` instead.") - - """ - Whether the billing attempt is still processing. - """ - ready: Boolean! @deprecated(reason: "Use `state` instead.") - - """ - Whether the billing attempt respects the merchant's inventory policy. - """ - respectInventoryPolicy: Boolean! - - """ - The state of the billing attempt with state-specific data. - """ - state: SubscriptionBillingAttemptState! - - """ - The subscription contract. - """ - subscriptionContract: SubscriptionContract! - - """ - The transactions created by the billing attempt. - """ - transactions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): OrderTransactionConnection! -} - -""" -The action required to continue processing the billing attempt. -""" -union SubscriptionBillingAttemptAction @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") = SubscriptionBillingAttemptPaymentChallenge - -""" -The billing attempt state that requires an action to resolve. -Must complete the action required for the billing attempt to continue being processed. -""" -type SubscriptionBillingAttemptActionRequiredState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The action required to resolve the billing attempt. - """ - action: SubscriptionBillingAttemptAction! -} - -""" -An auto-generated type for paginating through multiple SubscriptionBillingAttempts. -""" -type SubscriptionBillingAttemptConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [SubscriptionBillingAttemptEdge!]! - - """ - 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. - """ - nodes: [SubscriptionBillingAttempt!]! - - """ - 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 `subscriptionBillingAttemptCreate` mutation. -""" -type SubscriptionBillingAttemptCreatePayload @componentName(name: "platform") { - """ - The subscription billing attempt. - """ - subscriptionBillingAttempt: SubscriptionBillingAttempt - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [BillingAttemptUserError!]! -} - -""" -An auto-generated type which holds one SubscriptionBillingAttempt and a cursor during pagination. -""" -type SubscriptionBillingAttemptEdge @componentName(name: "sales") { - """ - 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 SubscriptionBillingAttemptEdge. - """ - node: SubscriptionBillingAttempt! -} - -""" -Possible error types for a subscription billing attempt. -""" -union SubscriptionBillingAttemptError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") = SubscriptionBillingAttemptGeneralError | SubscriptionBillingAttemptInventoryError | SubscriptionBillingAttemptPaymentError | SubscriptionBillingAttemptUnexpectedError - -""" -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 @componentName(name: "sales") { - """ - The amount exceeds the limit for this payment method. - """ - AMOUNT_TOO_LARGE - - """ - The amount is too small. - """ - AMOUNT_TOO_SMALL - - """ - There was an error during the payment authentication. - """ - AUTHENTICATION_ERROR - - """ - Authentication failed during payment processing. - """ - AUTHENTICATION_FAILED - - """ - Additional authentication is required to complete the payment. - """ - AUTHENTICATION_REQUIRED - - """ - Payment method was canceled by buyer. - """ - BUYER_CANCELED_PAYMENT_METHOD - - """ - The card issuer requires the cardholder to call them. - """ - CALL_ISSUER - - """ - The payment was cancelled. - """ - CANCELLED_PAYMENT - - """ - The card was declined by the payment processor. - """ - CARD_DECLINED - - """ - Card number was incorrect. - """ - CARD_NUMBER_INCORRECT - - """ - The payment confirmation was rejected. - """ - CONFIRMATION_REJECTED - - """ - Customer is invalid. - """ - CUSTOMER_INVALID - - """ - Customer was not found. - """ - CUSTOMER_NOT_FOUND - - """ - The card issuer declined the transaction with a 'do not honor' response. - """ - DO_NOT_HONOR - - """ - The required buyer action has expired. - """ - EXPIRED_BUYER_ACTION - - """ - The card has expired. - """ - EXPIRED_CARD - - """ - Payment method is expired. - """ - EXPIRED_PAYMENT_METHOD - - """ - Fraud was suspected. - """ - FRAUD_SUSPECTED - - """ - Gift cards must have a price greater than zero. - """ - FREE_GIFT_CARD_NOT_ALLOWED - - """ - A generic payment error occurred. - """ - GENERIC_ERROR - - """ - The billing address provided is incorrect. - """ - INCORRECT_ADDRESS - - """ - The card number entered is incorrect. - """ - INCORRECT_NUMBER - - """ - The postal/ZIP code provided is incorrect. - """ - INCORRECT_ZIP - - """ - Insufficient funds. - """ - INSUFFICIENT_FUNDS - - """ - Not enough inventory found. - """ - INSUFFICIENT_INVENTORY - - """ - The billing address is invalid. - """ - INVALID_BILLING_ADDRESS - - """ - The currency is not supported for this payment method. - """ - INVALID_CURRENCY - - """ - The billing agreement ID or the transaction ID for the customer's payment method is invalid. - """ - INVALID_CUSTOMER_BILLING_AGREEMENT - - """ - The expiry date of the card provided is invalid. - """ - INVALID_EXPIRY_DATE - - """ - The card number is invalid. - """ - INVALID_NUMBER - - """ - Payment method is invalid. Please update or create a new payment method. - """ - INVALID_PAYMENT_METHOD - - """ - The purchase type is invalid for this payment method. - """ - INVALID_PURCHASE_TYPE - - """ - The shipping address is either missing or invalid. - """ - INVALID_SHIPPING_ADDRESS - - """ - No inventory location found or enabled. - """ - INVENTORY_ALLOCATIONS_NOT_FOUND - - """ - A payment has already been made for this invoice. - """ - INVOICE_ALREADY_PAID - - """ - Merchant account configuration error. - """ - MERCHANT_ACCOUNT_ERROR - - """ - The transaction was declined due to a merchant-defined rule. - """ - MERCHANT_RULE - - """ - Non-test order limit reached. Use a test payment gateway to place another order. - """ - NON_TEST_ORDER_LIMIT_REACHED - - """ - The off-session payment was rejected and requires customer action. - """ - OFF_SESSION_REJECTED - - """ - Payment method was declined by processor. - """ - PAYMENT_METHOD_DECLINED - - """ - Payment method cannot be used with the current payment gateway test mode configuration. - """ - PAYMENT_METHOD_INCOMPATIBLE_WITH_GATEWAY_CONFIG - - """ - Payment method was not found. - """ - PAYMENT_METHOD_NOT_FOUND - - """ - Payment method is not specified on subscription contract. - """ - PAYMENT_METHOD_NOT_SPECIFIED - - """ - The payment method type is not supported. - """ - PAYMENT_METHOD_UNSUPPORTED - - """ - An exception occurred with the payment provider. - """ - PAYMENT_PROVIDER_ERROR - - """ - Payment provider is not enabled. - """ - PAYMENT_PROVIDER_IS_NOT_ENABLED - - """ - Paypal Error General. - """ - PAYPAL_ERROR_GENERAL - - """ - A processing error occurred with the payment provider. - """ - PROCESSING_ERROR - - """ - Purchase Type is not supported. - """ - PURCHASE_TYPE_NOT_SUPPORTED - - """ - The payment retry was declined. - """ - RETRY_DECLINED - - """ - Gateway is in test mode and attempted to bill a live payment method. - """ - TEST_MODE - - """ - The transaction exceeds the cardholder's limit. - """ - TRANSACTION_LIMIT_EXCEEDED - - """ - Transient error, try again later. - """ - TRANSIENT_ERROR - - """ - There was an unexpected error during the billing attempt. - """ - UNEXPECTED_ERROR -} - -""" -The billing attempt failed due to an error. -""" -type SubscriptionBillingAttemptFailedState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error that caused the billing attempt to fail. - """ - error: SubscriptionBillingAttemptError! -} - -""" -An error that occurred during a subscription billing attempt that doesn't fit other categories. -""" -type SubscriptionBillingAttemptGeneralError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error code for the failure. - """ - code: SubscriptionBillingAttemptGeneralErrorCode! -} - -""" -Error codes for other billing attempt failures. -""" -enum SubscriptionBillingAttemptGeneralErrorCode @componentName(name: "sales") { - """ - Customer is invalid. - """ - CUSTOMER_INVALID - - """ - Customer was not found. - """ - CUSTOMER_NOT_FOUND - - """ - Free gift cards are not allowed. - """ - FREE_GIFT_CARD_NOT_ALLOWED - - """ - Billing address is invalid. - """ - INVALID_BILLING_ADDRESS - - """ - Merchant account error. - """ - MERCHANT_ACCOUNT_ERROR - - """ - Non-test order limit reached. - """ - NON_TEST_ORDER_LIMIT_REACHED - - """ - Payment method test mode incompatible with gateway. - """ - PAYMENT_METHOD_INCOMPATIBLE_WITH_GATEWAY_CONFIG - - """ - Payment method was not found. - """ - PAYMENT_METHOD_NOT_FOUND - - """ - Payment method not specified. - """ - PAYMENT_METHOD_NOT_SPECIFIED - - """ - Payment provider is not enabled. - """ - PAYMENT_PROVIDER_IS_NOT_ENABLED -} - -""" -A base error type that applies to all uncategorized error classes. -""" -type SubscriptionBillingAttemptGenericError implements SubscriptionBillingAttemptProcessingError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The code for the error. - """ - code: SubscriptionBillingAttemptErrorCode! - - """ - An explanation of the error. - """ - message: String! -} - -""" -The input fields required to complete a subscription billing attempt. -""" -input SubscriptionBillingAttemptInput @componentName(name: "sales") { - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - Select the specific billing cycle to be billed. - Default to bill the current billing cycle if not specified. - """ - billingCycleSelector: SubscriptionBillingCycleSelector - - """ - 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). - """ - idempotencyKey: String! - - """ - The behaviour to follow when creating an order for a product variant - when it's out of stock. - """ - inventoryPolicy: SubscriptionBillingAttemptInventoryPolicy = PRODUCT_VARIANT_INVENTORY_POLICY - - """ - 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. - """ - originTime: DateTime - - """ - Select payment processing policy for the billing attempt. Defaults to FAIL_UNLESS_VALID_PAYMENT_METHOD. - """ - paymentProcessingPolicy: SubscriptionBillingAttemptPaymentProcessingPolicy = FAIL_UNLESS_VALID_PAYMENT_METHOD -} - -""" -An inventory error caused by an issue with one or more of the contract merchandise lines. -""" -type SubscriptionBillingAttemptInsufficientStockProductVariantsError implements SubscriptionBillingAttemptProcessingError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The code for the error. - """ - code: SubscriptionBillingAttemptErrorCode! - - """ - A list of product variants that caused the insufficient inventory error. - """ - insufficientStockProductVariants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductVariantConnection! - - """ - An explanation of the error. - """ - message: String! -} - -""" -An inventory-related error that occurred during a subscription billing attempt. -""" -type SubscriptionBillingAttemptInventoryError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error code for the inventory-related failure. - """ - code: SubscriptionBillingAttemptInventoryErrorCode! - - """ - A list of product variants that caused the insufficient inventory error. - """ - insufficientStockProductVariants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductVariantConnection -} - -""" -Error codes for inventory-related billing attempt failures. -""" -enum SubscriptionBillingAttemptInventoryErrorCode @componentName(name: "sales") { - """ - Insufficient inventory. - """ - INSUFFICIENT_INVENTORY - - """ - No inventory location found or enabled. - """ - INVENTORY_ALLOCATIONS_NOT_FOUND -} - -""" -The inventory policy for a billing attempt. -""" -enum SubscriptionBillingAttemptInventoryPolicy @componentName(name: "sales") { - """ - Override the merchant's product variant - inventory policy and allow overselling for this billing attempt. - """ - ALLOW_OVERSELLING - - """ - Respect the merchant's product variant - inventory policy for this billing attempt. - """ - PRODUCT_VARIANT_INVENTORY_POLICY -} - -""" -An inventory error caused by an issue with one or more of the contract merchandise lines. -""" -type SubscriptionBillingAttemptOutOfStockProductVariantsError implements SubscriptionBillingAttemptProcessingError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The code for the error. - """ - code: SubscriptionBillingAttemptErrorCode! - - """ - An explanation of the error. - """ - message: String! - - """ - A list of responsible product variants. - """ - outOfStockProductVariants( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductVariantConnection! @deprecated(reason: "Use `subscriptionBillingAttemptInsufficientStockProductVariantsError` type instead.") -} - -""" -A payment challenge that the customer must complete. -""" -type SubscriptionBillingAttemptPaymentChallenge @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - URL to redirect the customer for authentication. - """ - nextActionUrl: URL! - - """ - The status of the payment challenge. - """ - status: SubscriptionBillingAttemptPaymentChallengeStatus! -} - -""" -The status of the billing attempt authentication process. -""" -enum SubscriptionBillingAttemptPaymentChallengeStatus @componentName(name: "sales") { - """ - The billing attempt is rejected because the customer action was required. The - customer has not yet attempted to complete the challenge. - """ - OFF_SESSION_REJECTED - - """ - The customer was brought on session and challenged. - """ - ON_SESSION_CHALLENGED -} - -""" -A payment-related error that occurred during a subscription billing attempt. -""" -type SubscriptionBillingAttemptPaymentError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error code for the payment failure. - """ - code: SubscriptionBillingAttemptPaymentErrorCode! -} - -""" -Error codes for payment-related billing attempt failures. -""" -enum SubscriptionBillingAttemptPaymentErrorCode @componentName(name: "sales") { - """ - The transaction amount is too large. - """ - AMOUNT_TOO_LARGE - - """ - The transaction amount is too small. - """ - AMOUNT_TOO_SMALL - - """ - There was an error during the authentication. - """ - AUTHENTICATION_ERROR - - """ - Authentication failed during the payment processing. - """ - AUTHENTICATION_FAILED - - """ - Additional authentication is required for this payment. - """ - AUTHENTICATION_REQUIRED - - """ - The buyer canceled the payment method. - """ - BUYER_CANCELED_PAYMENT_METHOD - - """ - The card issuer requires the cardholder to call. - """ - CALL_ISSUER - - """ - The payment was cancelled. - """ - CANCELLED_PAYMENT - - """ - The card was declined. - """ - CARD_DECLINED - - """ - The card number is incorrect. - """ - CARD_NUMBER_INCORRECT - - """ - The payment confirmation was rejected. - """ - CONFIRMATION_REJECTED - - """ - The card issuer returned 'do not honor'. The customer should reach out to their card-issuing bank for more information. - """ - DO_NOT_HONOR - - """ - The required buyer action has expired. - """ - EXPIRED_BUYER_ACTION - - """ - The card has expired. - """ - EXPIRED_CARD - - """ - Payment method has expired. - """ - EXPIRED_PAYMENT_METHOD - - """ - Fraud was suspected on this transaction. - """ - FRAUD_SUSPECTED - - """ - A generic payment error occurred. - """ - GENERIC_ERROR - - """ - The billing address is incorrect. - """ - INCORRECT_ADDRESS - - """ - The card number is incorrect. - """ - INCORRECT_NUMBER - - """ - The postal/ZIP code is incorrect. - """ - INCORRECT_ZIP - - """ - The payment method has insufficient funds to complete the payment. - """ - INSUFFICIENT_FUNDS - - """ - The currency is not supported. - """ - INVALID_CURRENCY - - """ - The customer billing agreement is invalid. - """ - INVALID_CUSTOMER_BILLING_AGREEMENT - - """ - The expiry date is invalid. - """ - INVALID_EXPIRY_DATE - - """ - The card number is invalid. - """ - INVALID_NUMBER - - """ - Payment method is invalid. - """ - INVALID_PAYMENT_METHOD - - """ - The purchase type is invalid. - """ - INVALID_PURCHASE_TYPE - - """ - The shipping address is invalid. - """ - INVALID_SHIPPING_ADDRESS - - """ - The invoice has already been paid. - """ - INVOICE_ALREADY_PAID - - """ - The payment was declined due to a merchant rule. - """ - MERCHANT_RULE - - """ - The off-session payment was rejected. - """ - OFF_SESSION_REJECTED - - """ - Payment method was declined. - """ - PAYMENT_METHOD_DECLINED - - """ - The payment method type is not supported. - """ - PAYMENT_METHOD_UNSUPPORTED - - """ - An exception occurred with the payment provider. - """ - PAYMENT_PROVIDER_ERROR - - """ - A general PayPal error occurred. - """ - PAYPAL_ERROR_GENERAL - - """ - A processing error occurred. - """ - PROCESSING_ERROR - - """ - Purchase type is not supported. - """ - PURCHASE_TYPE_NOT_SUPPORTED - - """ - The payment retry was declined. - """ - RETRY_DECLINED - - """ - A test mode error occurred. - """ - TEST_MODE - - """ - The transaction exceeded the limit. - """ - TRANSACTION_LIMIT_EXCEEDED - - """ - A transient error occurred, try again later. - """ - TRANSIENT_ERROR -} - -""" -The payment processing policy for a billing attempt. -""" -enum SubscriptionBillingAttemptPaymentProcessingPolicy @componentName(name: "sales") { - """ - Attempt to process payment on the billing attempt and fail the billing attempt if - the payment method is not valid or if a payment method does not exist. - """ - FAIL_UNLESS_VALID_PAYMENT_METHOD - - """ - Skip payment processing on the billing attempt and create an unpaid order. - """ - SKIP_PAYMENT_AND_CREATE_UNPAID_ORDER -} - -""" -The billing attempt is currently being processed. -""" -type SubscriptionBillingAttemptPendingState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - Always true when the billing attempt is pending. - """ - processing: Boolean! -} - -""" -An error that prevented a billing attempt. -""" -interface SubscriptionBillingAttemptProcessingError @componentName(name: "sales") { - """ - The code for the error. - """ - code: SubscriptionBillingAttemptErrorCode! - - """ - An explanation of the error. - """ - message: String! -} - -""" -The state of a subscription billing attempt with state-specific data. -""" -union SubscriptionBillingAttemptState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") = SubscriptionBillingAttemptActionRequiredState | SubscriptionBillingAttemptFailedState | SubscriptionBillingAttemptPendingState | SubscriptionBillingAttemptSuccessState - -""" -The billing attempt completed successfully and created an order. -""" -type SubscriptionBillingAttemptSuccessState @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The order created by the successful billing attempt. May be null if the order was deleted. - """ - order: Order -} - -""" -An unexpected error that occurred during a subscription billing attempt. -""" -type SubscriptionBillingAttemptUnexpectedError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - A message describing the unexpected error. - """ - message: String! -} - -""" -The set of valid sort keys for the SubscriptionBillingAttempts query. -""" -enum SubscriptionBillingAttemptsSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -A subscription billing cycle. -""" -type SubscriptionBillingCycle @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The date on which the billing attempt is expected to be made. - """ - billingAttemptExpectedDate: DateTime! - - """ - The list of billing attempts associated with the billing cycle. - """ - billingAttempts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionBillingAttemptConnection! - - """ - The end date of the billing cycle. - """ - cycleEndAt: DateTime! - - """ - The index of the billing cycle. - """ - cycleIndex: Int! - - """ - The start date of the billing cycle. - """ - cycleStartAt: DateTime! - - """ - Whether this billing cycle was edited. - """ - edited: Boolean! - - """ - The active edited contract for the billing cycle. - """ - editedContract: SubscriptionBillingCycleEditedContract - - """ - Whether this billing cycle was skipped. - """ - skipped: Boolean! - - """ - The subscription contract that the billing cycle belongs to. - """ - sourceContract: SubscriptionContract! - - """ - The status of the billing cycle. - """ - status: SubscriptionBillingCycleBillingCycleStatus! -} - -""" -The presence of billing attempts on Billing Cycles. -""" -enum SubscriptionBillingCycleBillingAttemptStatus @componentName(name: "sales") { - """ - Billing cycle has any number of billing attempts. - """ - ANY - - """ - Billing cycle has at least one billing attempt. - """ - HAS_ATTEMPT - - """ - Billing cycle has no billing attempts. - """ - NO_ATTEMPT -} - -""" -The possible status values of a subscription billing cycle. -""" -enum SubscriptionBillingCycleBillingCycleStatus @componentName(name: "sales") { - """ - The billing cycle is billed. - """ - BILLED - - """ - The billing cycle hasn't been billed. - """ - UNBILLED -} - -""" -Return type for `subscriptionBillingCycleBulkCharge` mutation. -""" -type SubscriptionBillingCycleBulkChargePayload @componentName(name: "platform") { - """ - The asynchronous job that performs the action on the targeted billing cycles. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionBillingCycleBulkUserError!]! -} - -""" -The input fields for filtering subscription billing cycles in bulk actions. -""" -input SubscriptionBillingCycleBulkFilters @componentName(name: "sales") { - """ - Filters the billing cycles based on the presence of billing attempts. - """ - billingAttemptStatus: SubscriptionBillingCycleBillingAttemptStatus = ANY - - """ - Filters the billing cycles based on their status. - """ - billingCycleStatus: [SubscriptionBillingCycleBillingCycleStatus!] - - """ - Filters the billing cycles based on the status of their associated subscription contracts. - """ - contractStatus: [SubscriptionContractSubscriptionStatus!] -} - -""" -Return type for `subscriptionBillingCycleBulkSearch` mutation. -""" -type SubscriptionBillingCycleBulkSearchPayload @componentName(name: "platform") { - """ - The asynchronous job that performs the action on the targeted billing cycles. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionBillingCycleBulkUserError!]! -} - -""" -Represents an error that happens during the execution of subscriptionBillingCycles mutations. -""" -type SubscriptionBillingCycleBulkUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error code. - """ - code: SubscriptionBillingCycleBulkUserErrorCode - - """ - 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 `SubscriptionBillingCycleBulkUserError`. -""" -enum SubscriptionBillingCycleBulkUserErrorCode @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - End date can't be more than 24 hours in the future. - """ - END_DATE_IN_THE_FUTURE - - """ - The input value is invalid. - """ - INVALID - - """ - The range between start date and end date shouldn't be more than 1 week. - """ - INVALID_DATE_RANGE - - """ - Start date should be before end date. - """ - START_DATE_BEFORE_END_DATE -} - -""" -Return type for `subscriptionBillingCycleCharge` mutation. -""" -type SubscriptionBillingCycleChargePayload @componentName(name: "platform") { - """ - The subscription billing attempt. - """ - subscriptionBillingAttempt: SubscriptionBillingAttempt - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [BillingAttemptUserError!]! -} - -""" -An auto-generated type for paginating through multiple SubscriptionBillingCycles. -""" -type SubscriptionBillingCycleConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [SubscriptionBillingCycleEdge!]! - - """ - 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. - """ - nodes: [SubscriptionBillingCycle!]! - - """ - 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 `subscriptionBillingCycleContractDraftCommit` mutation. -""" -type SubscriptionBillingCycleContractDraftCommitPayload @componentName(name: "platform") { - """ - The committed Subscription Billing Cycle Edited Contract object. - """ - contract: SubscriptionBillingCycleEditedContract - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionBillingCycleContractDraftConcatenate` mutation. -""" -type SubscriptionBillingCycleContractDraftConcatenatePayload @componentName(name: "platform") { - """ - The Subscription Draft object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionBillingCycleContractEdit` mutation. -""" -type SubscriptionBillingCycleContractEditPayload @componentName(name: "platform") { - """ - The draft subscription contract object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -An auto-generated type which holds one SubscriptionBillingCycle and a cursor during pagination. -""" -type SubscriptionBillingCycleEdge @componentName(name: "sales") { - """ - 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 SubscriptionBillingCycleEdge. - """ - node: SubscriptionBillingCycle! -} - -""" -Return type for `subscriptionBillingCycleEditDelete` mutation. -""" -type SubscriptionBillingCycleEditDeletePayload @componentName(name: "platform") { - """ - The list of updated billing cycles. - """ - billingCycles: [SubscriptionBillingCycle!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionBillingCycleUserError!]! -} - -""" -Represents a subscription contract with billing cycles. -""" -type SubscriptionBillingCycleEditedContract implements SubscriptionContractBase @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - The subscription app that the subscription contract is registered to. - """ - app: App - - """ - The URL of the subscription contract page on the subscription app. - """ - appAdminUrl: URL - - """ - The billing cycles that the edited contract belongs to. - """ - billingCycles( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 subscription contract was created. - """ - createdAt: DateTime! - - """ - The currency that's used for the subscription contract. - """ - currencyCode: CurrencyCode! - - """ - A list of the custom attributes to be added to the generated orders. - """ - customAttributes: [Attribute!]! - - """ - The customer to whom the subscription contract belongs. - """ - customer: Customer - - """ - The customer payment method that's used for the subscription contract. - """ - customerPaymentMethod( - """ - Whether to show the customer's revoked payment method. - """ - showRevoked: Boolean = false - ): CustomerPaymentMethod - - """ - The delivery method for each billing of the subscription contract. - """ - deliveryMethod: SubscriptionDeliveryMethod - - """ - The delivery price for each billing of the subscription contract. - """ - deliveryPrice: MoneyV2! - - """ - The list of subscription discounts associated with the subscription contract. - """ - discounts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionManualDiscountConnection! - - """ - The number of lines associated with the subscription contract. - """ - lineCount: Int! @deprecated(reason: "Use `linesCount` instead.") - - """ - The list of subscription lines associated with the subscription contract. - """ - lines( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionLineConnection! - - """ - The number of lines associated with the subscription contract. - """ - linesCount: Count - - """ - The note field that will be applied to the generated orders. - """ - note: String - - """ - A list of the subscription contract's orders. - """ - orders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): OrderConnection! - - """ - The date and time when the subscription contract was updated. - """ - updatedAt: DateTime! -} - -""" -Return type for `subscriptionBillingCycleEditsDelete` mutation. -""" -type SubscriptionBillingCycleEditsDeletePayload @componentName(name: "platform") { - """ - The list of updated billing cycles. - """ - billingCycles: [SubscriptionBillingCycle!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionBillingCycleUserError!]! -} - -""" -Possible error codes that can be returned by `SubscriptionBillingCycleUserError`. -""" -enum SubscriptionBillingCycleErrorCode @componentName(name: "platform") { - """ - Billing date cannot be set on skipped billing cycle. - """ - BILLING_DATE_SET_ON_SKIPPED - - """ - Billing cycle selector cannot select billing cycle outside of index range. - """ - CYCLE_INDEX_OUT_OF_RANGE - - """ - Can't find the billing cycle. - """ - CYCLE_NOT_FOUND - - """ - Billing cycle selector cannot select billing cycle outside of start date range. - """ - CYCLE_START_DATE_OUT_OF_RANGE - - """ - Billing cycle schedule edit input provided is empty. Must take in parameters to modify schedule. - """ - EMPTY_BILLING_CYCLE_EDIT_SCHEDULE_INPUT - - """ - Billing cycle has incomplete billing attempts in progress. - """ - INCOMPLETE_BILLING_ATTEMPTS - - """ - The input value is invalid. - """ - INVALID - - """ - The index selector is invalid. - """ - INVALID_CYCLE_INDEX - - """ - The date selector is invalid. - """ - INVALID_DATE - - """ - There's no contract or schedule edit associated with the targeted billing cycle(s). - """ - NO_CYCLE_EDITS - - """ - Billing date of a cycle cannot be set to a value outside of its billing date range. - """ - OUT_OF_BOUNDS - - """ - Billing cycle selector cannot select upcoming billing cycle past limit. - """ - UPCOMING_CYCLE_LIMIT_EXCEEDED -} - -""" -The input fields for specifying the subscription contract and selecting the associated billing cycle. -""" -input SubscriptionBillingCycleInput @componentName(name: "sales") { - """ - The ID of the subscription contract associated with the billing cycle. - """ - contractId: ID! @gidTypes(types: ["SubscriptionContract"]) - - """ - Selects the billing cycle by date or index. - """ - selector: SubscriptionBillingCycleSelector! -} - -""" -The input fields for parameters to modify the schedule of a specific billing cycle. -""" -input SubscriptionBillingCycleScheduleEditInput @componentName(name: "sales") { - """ - Sets the expected billing date for the billing cycle. - """ - billingDate: DateTime - - """ - The reason for editing. - """ - reason: SubscriptionBillingCycleScheduleEditInputScheduleEditReason! - - """ - Sets the skip status for the billing cycle. - """ - skip: Boolean -} - -""" -The input fields for possible reasons for editing the billing cycle's schedule. -""" -enum SubscriptionBillingCycleScheduleEditInputScheduleEditReason @componentName(name: "sales") { - """ - Buyer initiated the schedule edit. - """ - BUYER_INITIATED - - """ - Developer initiated the schedule edit. - """ - DEV_INITIATED - - """ - Merchant initiated the schedule edit. - """ - MERCHANT_INITIATED -} - -""" -Return type for `subscriptionBillingCycleScheduleEdit` mutation. -""" -type SubscriptionBillingCycleScheduleEditPayload @componentName(name: "platform") { - """ - The updated billing cycle. - """ - billingCycle: SubscriptionBillingCycle - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionBillingCycleUserError!]! -} - -""" -The input fields to select SubscriptionBillingCycle by either date or index. -Both past and future billing cycles can be selected. -""" -input SubscriptionBillingCycleSelector @componentName(name: "sales") { - """ - Returns a billing cycle by date. - """ - date: DateTime - - """ - Returns a billing cycle by index. - """ - index: Int -} - -""" -Return type for `subscriptionBillingCycleSkip` mutation. -""" -type SubscriptionBillingCycleSkipPayload @componentName(name: "platform") { - """ - The updated billing cycle. - """ - billingCycle: SubscriptionBillingCycle - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionBillingCycleSkipUserError!]! -} - -""" -An error that occurs during the execution of `SubscriptionBillingCycleSkip`. -""" -type SubscriptionBillingCycleSkipUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: SubscriptionBillingCycleSkipUserErrorCode - - """ - 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 `SubscriptionBillingCycleSkipUserError`. -""" -enum SubscriptionBillingCycleSkipUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -Return type for `subscriptionBillingCycleUnskip` mutation. -""" -type SubscriptionBillingCycleUnskipPayload @componentName(name: "platform") { - """ - The updated billing cycle. - """ - billingCycle: SubscriptionBillingCycle - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionBillingCycleUnskipUserError!]! -} - -""" -An error that occurs during the execution of `SubscriptionBillingCycleUnskip`. -""" -type SubscriptionBillingCycleUnskipUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: SubscriptionBillingCycleUnskipUserErrorCode - - """ - 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 `SubscriptionBillingCycleUnskipUserError`. -""" -enum SubscriptionBillingCycleUnskipUserErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -The possible errors for a subscription billing cycle. -""" -type SubscriptionBillingCycleUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error code. - """ - code: SubscriptionBillingCycleErrorCode - - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -The input fields to select a subset of subscription billing cycles within a date range. -""" -input SubscriptionBillingCyclesDateRangeSelector @componentName(name: "sales") { - """ - The end date and time for the range. - """ - endDate: DateTime! - - """ - The start date and time for the range. - """ - startDate: DateTime! -} - -""" -The input fields to select a subset of subscription billing cycles within an index range. -""" -input SubscriptionBillingCyclesIndexRangeSelector @componentName(name: "sales") { - """ - The end index for the range. - """ - endIndex: Int! - - """ - The start index for the range. - """ - startIndex: Int! -} - -""" -The set of valid sort keys for the SubscriptionBillingCycles query. -""" -enum SubscriptionBillingCyclesSortKeys @componentName(name: "sales") { - """ - Sort by the `cycle_index` value. - """ - CYCLE_INDEX - - """ - Sort by the `id` value. - """ - ID -} - -""" -Select subscription billing cycles to be targeted. -""" -enum SubscriptionBillingCyclesTargetSelection @componentName(name: "sales") { - """ - Target all current and upcoming subscription billing cycles. - """ - ALL -} - -""" -Represents a Subscription Billing Policy. -""" -type SubscriptionBillingPolicy @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - Specific anchor dates upon which the billing interval calculations should be made. - """ - anchors: [SellingPlanAnchor!]! - - """ - The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). - """ - interval: SellingPlanInterval! - - """ - The number of billing intervals between invoices. - """ - intervalCount: Int! - - """ - Maximum amount of cycles after which the subscription ends. - """ - maxCycles: Int - - """ - Minimum amount of cycles required in the subscription. - """ - minCycles: Int -} - -""" -The input fields for a Subscription Billing Policy. -""" -input SubscriptionBillingPolicyInput @componentName(name: "sales") { - """ - Specific anchor dates upon which the billing interval calculations should be made. - """ - anchors: [SellingPlanAnchorInput!] = [] - - """ - The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). - """ - interval: SellingPlanInterval! - - """ - The number of billing intervals between invoices. - """ - intervalCount: Int! - - """ - Maximum amount of cycles required in the subscription. - """ - maxCycles: Int - - """ - Minimum amount of cycles required in the subscription. - """ - minCycles: Int -} - -""" -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. - -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 @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - The subscription app that the subscription contract is registered to. - """ - app: App - - """ - The URL of the subscription contract page on the subscription app. - """ - appAdminUrl: URL - - """ - The list of billing attempts associated with the subscription contract. - """ - billingAttempts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionBillingAttemptConnection! - - """ - The billing policy associated with the subscription contract. - """ - billingPolicy: SubscriptionBillingPolicy! - - """ - The date and time when the subscription contract was created. - """ - createdAt: DateTime! - - """ - The currency that's used for the subscription contract. - """ - currencyCode: CurrencyCode! - - """ - A list of the custom attributes to be added to the generated orders. - """ - customAttributes: [Attribute!]! - - """ - The customer to whom the subscription contract belongs. - """ - customer: Customer - - """ - The customer payment method that's used for the subscription contract. - """ - customerPaymentMethod( - """ - Whether to show the customer's revoked payment method. - """ - showRevoked: Boolean = false - ): CustomerPaymentMethod - - """ - The delivery method for each billing of the subscription contract. - """ - deliveryMethod: SubscriptionDeliveryMethod - - """ - The delivery policy associated with the subscription contract. - """ - deliveryPolicy: SubscriptionDeliveryPolicy! - - """ - The delivery price for each billing of the subscription contract. - """ - deliveryPrice: MoneyV2! - - """ - The list of subscription discounts associated with the subscription contract. - """ - discounts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionManualDiscountConnection! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The last billing error type of the contract. - """ - lastBillingAttemptErrorType: SubscriptionContractLastBillingErrorType - - """ - The current status of the last payment. - """ - lastPaymentStatus: SubscriptionContractLastPaymentStatus - - """ - The number of lines associated with the subscription contract. - """ - lineCount: Int! @deprecated(reason: "Use `linesCount` instead.") - - """ - The list of subscription lines associated with the subscription contract. - """ - lines( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionLineConnection! - - """ - The number of lines associated with the subscription contract. - """ - linesCount: Count - - """ - 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 note field that will be applied to the generated orders. - """ - note: String - - """ - A list of the subscription contract's orders. - """ - orders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): OrderConnection! - - """ - The order from which this contract originated. - """ - originOrder: Order - - """ - The revision id of the contract. - """ - revisionId: UnsignedInt64! - - """ - The current status of the subscription contract. - """ - status: SubscriptionContractSubscriptionStatus! - - """ - The date and time when the subscription contract was updated. - """ - updatedAt: DateTime! -} - -""" -Return type for `subscriptionContractActivate` mutation. -""" -type SubscriptionContractActivatePayload @componentName(name: "platform") { - """ - The new Subscription Contract object. - """ - contract: SubscriptionContract - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionContractStatusUpdateUserError!]! -} - -""" -The input fields required to create a Subscription Contract. -""" -input SubscriptionContractAtomicCreateInput @componentName(name: "sales") { - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - The attributes used as input for the Subscription Draft. - """ - contract: SubscriptionDraftInput! - - """ - The currency used for the subscription contract. - """ - currencyCode: CurrencyCode! - - """ - The ID of the customer to associate with the subscription contract. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - A list of discount redeem codes to apply to the subscription contract. - """ - discountCodes: [String!] = [] - - """ - A list of new Subscription Lines. - """ - lines: [SubscriptionAtomicLineInput!]! - - """ - 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 expected date for the upcoming billing attempt, impacting the contract's - billing cycle. For example: If a monthly contract was created on May 14th, the - first cycle will end on June 14th, with subsequent cycles starting and ending - on the 14th of each month. If a monthly contract was created on May 14th with - `upcoming_billing_attempt_expected_date` set to May 30th, the first cycle will - then end on May 30th, and subsequent cycles will end on the 30th of each - month. Note: This field must match `next_billing_date` when specified. - """ - upcomingBillingAttemptExpectedDate: DateTime -} - -""" -Return type for `subscriptionContractAtomicCreate` mutation. -""" -type SubscriptionContractAtomicCreatePayload @componentName(name: "platform") { - """ - The new Subscription Contract object. - """ - contract: SubscriptionContract - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Represents subscription contract common fields. -""" -interface SubscriptionContractBase @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The subscription app that the subscription contract is registered to. - """ - app: App - - """ - The URL of the subscription contract page on the subscription app. - """ - appAdminUrl: URL - - """ - The currency that's used for the subscription contract. - """ - currencyCode: CurrencyCode! - - """ - A list of the custom attributes to be added to the generated orders. - """ - customAttributes: [Attribute!]! - - """ - The customer to whom the subscription contract belongs. - """ - customer: Customer - - """ - The customer payment method that's used for the subscription contract. - """ - customerPaymentMethod( - """ - Whether to show the customer's revoked payment method. - """ - showRevoked: Boolean = false - ): CustomerPaymentMethod - - """ - The delivery method for each billing of the subscription contract. - """ - deliveryMethod: SubscriptionDeliveryMethod - - """ - The delivery price for each billing of the subscription contract. - """ - deliveryPrice: MoneyV2! - - """ - The list of subscription discounts associated with the subscription contract. - """ - discounts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionManualDiscountConnection! - - """ - The number of lines associated with the subscription contract. - """ - lineCount: Int! @deprecated(reason: "Use `linesCount` instead.") - - """ - The list of subscription lines associated with the subscription contract. - """ - lines( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionLineConnection! - - """ - The number of lines associated with the subscription contract. - """ - linesCount: Count - - """ - The note field that will be applied to the generated orders. - """ - note: String - - """ - A list of the subscription contract's orders. - """ - orders( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): OrderConnection! - - """ - The date and time when the subscription contract was updated. - """ - updatedAt: DateTime! -} - -""" -Return type for `subscriptionContractCancel` mutation. -""" -type SubscriptionContractCancelPayload @componentName(name: "platform") { - """ - The new Subscription Contract object. - """ - contract: SubscriptionContract - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionContractStatusUpdateUserError!]! -} - -""" -An auto-generated type for paginating through multiple SubscriptionContracts. -""" -type SubscriptionContractConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [SubscriptionContractEdge!]! - - """ - 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. - """ - nodes: [SubscriptionContract!]! - - """ - 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 Subscription Contract. -""" -input SubscriptionContractCreateInput @componentName(name: "sales") { - """ - The actor who initiated a subscription action. - """ - actor: SubscriptionActor - - """ - The attributes used as input for the Subscription Draft. - """ - contract: SubscriptionDraftInput! - - """ - The currency used for the subscription contract. - """ - currencyCode: CurrencyCode! - - """ - The ID of the customer to associate with the subscription contract. - """ - customerId: ID! @gidTypes(types: ["Customer"]) - - """ - The next billing date for the subscription contract. - """ - nextBillingDate: DateTime! -} - -""" -Return type for `subscriptionContractCreate` mutation. -""" -type SubscriptionContractCreatePayload @componentName(name: "platform") { - """ - The Subscription Contract object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -An auto-generated type which holds one SubscriptionContract and a cursor during pagination. -""" -type SubscriptionContractEdge @componentName(name: "sales") { - """ - 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 SubscriptionContractEdge. - """ - node: SubscriptionContract! -} - -""" -Possible error codes that can be returned by `SubscriptionContractUserError`. -""" -enum SubscriptionContractErrorCode @componentName(name: "platform") { - """ - The input value is invalid. - """ - INVALID -} - -""" -Return type for `subscriptionContractExpire` mutation. -""" -type SubscriptionContractExpirePayload @componentName(name: "platform") { - """ - The new Subscription Contract object. - """ - contract: SubscriptionContract - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionContractStatusUpdateUserError!]! -} - -""" -Return type for `subscriptionContractFail` mutation. -""" -type SubscriptionContractFailPayload @componentName(name: "platform") { - """ - The new Subscription Contract object. - """ - contract: SubscriptionContract - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionContractStatusUpdateUserError!]! -} - -""" -The possible values of the last billing error on a subscription contract. -""" -enum SubscriptionContractLastBillingErrorType @componentName(name: "sales") { - """ - Subscription billing attempt error due to customer error. - """ - CUSTOMER_ERROR - - """ - Subscription billing attempt error due to inventory error. - """ - INVENTORY_ERROR - - """ - All other billing attempt errors. - """ - OTHER - - """ - Subscription billing attempt error due to payment error. - """ - PAYMENT_ERROR -} - -""" -The possible status values of the last payment on a subscription contract. -""" -enum SubscriptionContractLastPaymentStatus @componentName(name: "sales") { - """ - Failed subscription billing attempt. - """ - FAILED - - """ - Successful subscription billing attempt. - """ - SUCCEEDED -} - -""" -Return type for `subscriptionContractPause` mutation. -""" -type SubscriptionContractPausePayload @componentName(name: "platform") { - """ - The new Subscription Contract object. - """ - contract: SubscriptionContract - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionContractStatusUpdateUserError!]! -} - -""" -The input fields required to create a Subscription Contract. -""" -input SubscriptionContractProductChangeInput @componentName(name: "sales") { - """ - The price of the product. - """ - currentPrice: Decimal - - """ - The ID of the product variant the subscription line refers to. - """ - productVariantId: ID @gidTypes(types: ["ProductVariant"]) -} - -""" -Return type for `subscriptionContractProductChange` mutation. -""" -type SubscriptionContractProductChangePayload @componentName(name: "platform") { - """ - The new Subscription Contract object. - """ - contract: SubscriptionContract - - """ - The updated Subscription Line. - """ - lineUpdated: SubscriptionLine - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionContractSetNextBillingDate` mutation. -""" -type SubscriptionContractSetNextBillingDatePayload @componentName(name: "platform") { - """ - The updated Subscription Contract object. - """ - contract: SubscriptionContract - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionContractUserError!]! -} - -""" -Possible error codes that can be returned by `SubscriptionContractStatusUpdateUserError`. -""" -enum SubscriptionContractStatusUpdateErrorCode @componentName(name: "platform") { - """ - Subscription contract status cannot be changed once terminated. - """ - CONTRACT_TERMINATED - - """ - The input value is invalid. - """ - INVALID -} - -""" -Represents a subscription contract status update error. -""" -type SubscriptionContractStatusUpdateUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error code. - """ - code: SubscriptionContractStatusUpdateErrorCode - - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -The possible status values of a subscription. -""" -enum SubscriptionContractSubscriptionStatus @componentName(name: "sales") { - """ - The contract is active and continuing per its policies. - """ - ACTIVE - - """ - The contract was ended by an unplanned customer action. - """ - CANCELLED - - """ - The contract has ended per the expected circumstances. All billing and deliverycycles of the subscriptions were executed. - """ - EXPIRED - - """ - The contract ended because billing failed and no further billing attempts are expected. - """ - FAILED - - """ - The contract is temporarily paused and is expected to resume in the future. - """ - PAUSED -} - -""" -Return type for `subscriptionContractUpdate` mutation. -""" -type SubscriptionContractUpdatePayload @componentName(name: "platform") { - """ - The Subscription Contract object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Represents a Subscription Contract error. -""" -type SubscriptionContractUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error code. - """ - code: SubscriptionContractErrorCode - - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -The set of valid sort keys for the SubscriptionContracts query. -""" -enum SubscriptionContractsSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `status` value. - """ - STATUS - - """ - Sort by the `updated_at` value. - """ - UPDATED_AT -} - -""" -Represents a Subscription Line Pricing Cycle Adjustment. -""" -type SubscriptionCyclePriceAdjustment @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - Price adjustment type. - """ - adjustmentType: SellingPlanPricingPolicyAdjustmentType! - - """ - Price adjustment value. - """ - adjustmentValue: SellingPlanPricingPolicyAdjustmentValue! - - """ - The number of cycles required before this pricing policy applies. - """ - afterCycle: Int! - - """ - The computed price after the adjustments applied. - """ - computedPrice: MoneyV2! -} - -""" -Describes the delivery method to use to get the physical goods to the customer. -""" -union SubscriptionDeliveryMethod @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionDeliveryMethodLocalDelivery | SubscriptionDeliveryMethodPickup | SubscriptionDeliveryMethodShipping - -""" -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. -""" -input SubscriptionDeliveryMethodInput @componentName(name: "sales") { - """ - The input fields for the local delivery method. - """ - localDelivery: SubscriptionDeliveryMethodLocalDeliveryInput - - """ - The input fields for the pickup delivery method. - """ - pickup: SubscriptionDeliveryMethodPickupInput - - """ - The input fields for the shipping delivery method. - """ - shipping: SubscriptionDeliveryMethodShippingInput -} - -""" -A subscription delivery method for local delivery. -The other subscription delivery methods can be found in the `SubscriptionDeliveryMethod` union type. -""" -type SubscriptionDeliveryMethodLocalDelivery @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - The address to deliver to. - """ - address: MailingAddress! - - """ - The details of the local delivery method to use. - """ - localDeliveryOption: SubscriptionDeliveryMethodLocalDeliveryOption! -} - -""" -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. -""" -input SubscriptionDeliveryMethodLocalDeliveryInput @componentName(name: "sales") { - """ - The address to deliver to. - """ - address: MailingAddressInput - - """ - The details of the local delivery method to use. - """ - localDeliveryOption: SubscriptionDeliveryMethodLocalDeliveryOptionInput -} - -""" -The selected delivery option on a subscription contract. -""" -type SubscriptionDeliveryMethodLocalDeliveryOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - A custom reference to the delivery method for use with automations. - """ - code: String - - """ - The details displayed to the customer to describe the local delivery option. - """ - description: String - - """ - The delivery instructions that the customer can provide to the merchant. - """ - instructions: String - - """ - The phone number that the customer provided to the merchant. - Formatted using E.164 standard. For example, `+16135551111`. - """ - phone: String! @protectedField(subject: "customer", content: "phone") - - """ - The presentment title of the local delivery option. - """ - presentmentTitle: String - - """ - The title of the local delivery option. - """ - title: String -} - -""" -The input fields for local delivery option. -""" -input SubscriptionDeliveryMethodLocalDeliveryOptionInput @componentName(name: "sales") { - """ - A custom reference to the delivery method for use with automations. - """ - code: String - - """ - The details displayed to the customer to describe the local delivery option. - """ - description: String - - """ - The delivery instructions that the customer can provide to the merchant. - """ - instructions: String - - """ - The phone number that the customer must provide to the merchant. - Formatted using E.164 standard. For example, `+16135551111`. - """ - phone: String! - - """ - The presentment title of the local delivery option. - """ - presentmentTitle: String - - """ - The title of the local delivery option. - """ - title: String -} - -""" -A delivery method with a pickup option. -""" -type SubscriptionDeliveryMethodPickup @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - The details of the pickup delivery method to use. - """ - pickupOption: SubscriptionDeliveryMethodPickupOption! -} - -""" -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. -""" -input SubscriptionDeliveryMethodPickupInput @componentName(name: "sales") { - """ - The details of the pickup method to use. - """ - pickupOption: SubscriptionDeliveryMethodPickupOptionInput -} - -""" -Represents the selected pickup option on a subscription contract. -""" -type SubscriptionDeliveryMethodPickupOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - A custom reference to the delivery method for use with automations. - """ - code: String - - """ - The details displayed to the customer to describe the pickup option. - """ - description: String - - """ - The location where the customer will pick up the merchandise. - """ - location: Location! - - """ - The presentment title of the pickup option. - """ - presentmentTitle: String - - """ - The title of the pickup option. - """ - title: String -} - -""" -The input fields for pickup option. -""" -input SubscriptionDeliveryMethodPickupOptionInput @componentName(name: "sales") { - """ - A custom reference to the delivery method for use with automations. - """ - code: String - - """ - The details displayed to the customer to describe the pickup option. - """ - description: String - - """ - The ID of the pickup location. - """ - locationId: ID! @gidTypes(types: ["Location"]) - - """ - The presentment title of the pickup option. - """ - presentmentTitle: String - - """ - The title of the pickup option. - """ - title: String -} - -""" -Represents a shipping delivery method: a mailing address and a shipping option. -""" -type SubscriptionDeliveryMethodShipping @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - The address to ship to. - """ - address: MailingAddress! - - """ - The details of the shipping method to use. - """ - 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 @componentName(name: "sales") { - """ - The address to ship to. - """ - address: MailingAddressInput - - """ - The details of the shipping method to use. - """ - shippingOption: SubscriptionDeliveryMethodShippingOptionInput -} - -""" -Represents the selected shipping option on a subscription contract. -""" -type SubscriptionDeliveryMethodShippingOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The carrier service that's providing this shipping option. - This field isn't currently supported and returns null. - """ - carrierService: DeliveryCarrierService @deprecated(reason: "This field has never been implemented.") - - """ - The code of the shipping option. - """ - code: String - - """ - The description of the shipping option. - """ - description: String - - """ - The presentment title of the shipping option. - """ - presentmentTitle: String - - """ - The title of the shipping option. - """ - title: String -} - -""" -The input fields for shipping option. -""" -input SubscriptionDeliveryMethodShippingOptionInput @componentName(name: "sales") { - """ - The carrier service ID of the shipping option. - """ - carrierServiceId: ID @gidTypes(types: ["CarrierService"]) - - """ - The code of the shipping option. - """ - code: String - - """ - The description of the shipping option. - """ - description: String - - """ - The presentment title of the shipping option. - """ - presentmentTitle: String - - """ - The title of the shipping option. - """ - title: String -} - -""" -The delivery option for a subscription contract. -""" -union SubscriptionDeliveryOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionLocalDeliveryOption | SubscriptionPickupOption | SubscriptionShippingOption - -""" -The result of the query to fetch delivery options for the subscription contract. -""" -union SubscriptionDeliveryOptionResult @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionDeliveryOptionResultFailure | SubscriptionDeliveryOptionResultSuccess - -""" -A failure to find the available delivery options for a subscription contract. -""" -type SubscriptionDeliveryOptionResultFailure @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The reason for the failure. - """ - message: String -} - -""" -The delivery option for a subscription contract. -""" -type SubscriptionDeliveryOptionResultSuccess @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The available delivery options. - """ - deliveryOptions: [SubscriptionDeliveryOption!]! -} - -""" -Represents a Subscription Delivery Policy. -""" -type SubscriptionDeliveryPolicy @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The specific anchor dates upon which the delivery interval calculations should be made. - """ - anchors: [SellingPlanAnchor!]! - - """ - The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). - """ - interval: SellingPlanInterval! - - """ - The number of delivery intervals between deliveries. - """ - intervalCount: Int! -} - -""" -The input fields for a Subscription Delivery Policy. -""" -input SubscriptionDeliveryPolicyInput @componentName(name: "sales") { - """ - The specific anchor dates upon which the delivery interval calculations should be made. - """ - anchors: [SellingPlanAnchorInput!] = [] - - """ - The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc). - """ - interval: SellingPlanInterval! - - """ - The number of billing intervals between invoices. - """ - intervalCount: Int! -} - -""" -Subscription draft discount types. -""" -union SubscriptionDiscount @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionAppliedCodeDiscount | SubscriptionManualDiscount - -""" -Represents what a particular discount reduces from a line price. -""" -type SubscriptionDiscountAllocation @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - Allocation amount. - """ - amount: MoneyV2! - - """ - Discount that created the allocation. - """ - discount: SubscriptionDiscount! -} - -""" -An auto-generated type for paginating through multiple SubscriptionDiscounts. -""" -type SubscriptionDiscountConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [SubscriptionDiscountEdge!]! - - """ - 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. - """ - nodes: [SubscriptionDiscount!]! - - """ - 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 SubscriptionDiscount and a cursor during pagination. -""" -type SubscriptionDiscountEdge @componentName(name: "sales") { - """ - 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 SubscriptionDiscountEdge. - """ - node: SubscriptionDiscount! -} - -""" -Represents the subscription lines the discount applies on. -""" -type SubscriptionDiscountEntitledLines @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - Specify whether the subscription discount will apply on all subscription lines. - """ - all: Boolean! - - """ - The list of subscription lines associated with the subscription discount. - """ - lines( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionLineConnection! -} - -""" -The value of the discount and how it will be applied. -""" -type SubscriptionDiscountFixedAmountValue @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The fixed amount value of the discount. - """ - amount: MoneyV2! - - """ - Whether the amount is applied per item. - """ - appliesOnEachItem: Boolean! -} - -""" -The percentage value of the discount. -""" -type SubscriptionDiscountPercentageValue @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The percentage value of the discount. - """ - percentage: Int! -} - -""" -The reason a discount on a subscription draft was rejected. -""" -enum SubscriptionDiscountRejectionReason @componentName(name: "sales") { - """ - Discount is inactive. - """ - CURRENTLY_INACTIVE - - """ - Given customer does not qualify for the discount. - """ - CUSTOMER_NOT_ELIGIBLE - - """ - Customer usage limit has been reached. - """ - CUSTOMER_USAGE_LIMIT_REACHED - - """ - Purchase type does not qualify for the discount. - """ - INCOMPATIBLE_PURCHASE_TYPE - - """ - Internal error during discount code validation. - """ - INTERNAL_ERROR - - """ - Discount code is not found. - """ - NOT_FOUND - - """ - Discount does not apply to any of the given line items. - """ - NO_ENTITLED_LINE_ITEMS - - """ - No applicable shipping lines. - """ - NO_ENTITLED_SHIPPING_LINES - - """ - Purchase amount of items does not qualify for the discount. - """ - PURCHASE_NOT_IN_RANGE - - """ - Quantity of items does not qualify for the discount. - """ - QUANTITY_NOT_IN_RANGE - - """ - Discount usage limit has been reached. - """ - USAGE_LIMIT_REACHED -} - -""" -The value of the discount and how it will be applied. -""" -union SubscriptionDiscountValue @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") = 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 @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - The billing cycle that the subscription contract will be associated with. - """ - billingCycle: SubscriptionBillingCycle - - """ - The billing policy for the subscription contract. - """ - billingPolicy: SubscriptionBillingPolicy! - - """ - The billing cycles of the contracts that will be concatenated to the subscription contract. - """ - concatenatedBillingCycles( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - 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 currency used for the subscription contract. - """ - currencyCode: CurrencyCode! - - """ - A list of the custom attributes to be added to the generated orders. - """ - customAttributes: [Attribute!]! - - """ - The customer to whom the subscription contract belongs. - """ - customer: Customer! - - """ - The customer payment method used for the subscription contract. - """ - customerPaymentMethod( - """ - Whether to show the customer's revoked payment method. - """ - showRevoked: Boolean = false - ): CustomerPaymentMethod - - """ - The delivery method for each billing of the subscription contract. - """ - deliveryMethod: SubscriptionDeliveryMethod - - """ - The available delivery options for a given delivery address. Returns `null` for pending requests. - """ - deliveryOptions( - """ - The address to deliver the subscription contract to. - """ - deliveryAddress: MailingAddressInput - ): SubscriptionDeliveryOptionResult - - """ - The delivery policy for the subscription contract. - """ - deliveryPolicy: SubscriptionDeliveryPolicy! - - """ - The delivery price for each billing the subscription contract. - """ - deliveryPrice: MoneyV2 - - """ - The list of subscription discounts which will be associated with the subscription contract. - """ - discounts( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionDiscountConnection! - - """ - The list of subscription discounts to be added to the subscription contract. - """ - discountsAdded( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionDiscountConnection! - - """ - The list of subscription discounts to be removed from the subscription contract. - """ - discountsRemoved( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionDiscountConnection! - - """ - The list of subscription discounts to be updated on the subscription contract. - """ - discountsUpdated( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionDiscountConnection! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The list of subscription lines which will be associated with the subscription contract. - """ - lines( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionLineConnection! - - """ - The list of subscription lines to be added to the subscription contract. - """ - linesAdded( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionLineConnection! - - """ - The list of subscription lines to be removed from the subscription contract. - """ - linesRemoved( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): SubscriptionLineConnection! - - """ - The next billing date for the subscription contract. - """ - nextBillingDate: DateTime - - """ - The note field that will be applied to the generated orders. - """ - note: String - - """ - The original subscription contract. - """ - originalContract: SubscriptionContract - - """ - Available Shipping Options for a given delivery address. Returns NULL for pending requests. - """ - shippingOptions( - """ - The address to delivery the subscription contract to. - """ - deliveryAddress: MailingAddressInput - ): SubscriptionShippingOptionResult @deprecated(reason: "Use `deliveryOptions` instead.") - - """ - The current status of the subscription contract. - """ - status: SubscriptionContractSubscriptionStatus -} - -""" -Return type for `subscriptionDraftCommit` mutation. -""" -type SubscriptionDraftCommitPayload @componentName(name: "platform") { - """ - The updated Subscription Contract object. - """ - contract: SubscriptionContract - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionDraftDiscountAdd` mutation. -""" -type SubscriptionDraftDiscountAddPayload @componentName(name: "platform") { - """ - The added Subscription Discount. - """ - discountAdded: SubscriptionManualDiscount - - """ - The Subscription Contract draft object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionDraftDiscountCodeApply` mutation. -""" -type SubscriptionDraftDiscountCodeApplyPayload @componentName(name: "platform") { - """ - The added subscription discount. - """ - appliedDiscount: SubscriptionAppliedCodeDiscount - - """ - The subscription contract draft object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionDraftDiscountRemove` mutation. -""" -type SubscriptionDraftDiscountRemovePayload @componentName(name: "platform") { - """ - The removed subscription draft discount. - """ - discountRemoved: SubscriptionDiscount - - """ - The subscription contract draft object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionDraftDiscountUpdate` mutation. -""" -type SubscriptionDraftDiscountUpdatePayload @componentName(name: "platform") { - """ - The updated Subscription Discount. - """ - discountUpdated: SubscriptionManualDiscount - - """ - The Subscription Contract draft object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Possible error codes that can be returned by `SubscriptionDraftUserError`. -""" -enum SubscriptionDraftErrorCode @componentName(name: "platform") { - """ - This line has already been removed. - """ - ALREADY_REMOVED - - """ - Cannot commit a contract draft with this mutation. Please use SubscriptionDraftCommit. - """ - BILLING_CYCLE_ABSENT - - """ - Billing policy cannot be updated for billing cycle contract drafts. - """ - BILLING_CYCLE_CONTRACT_DRAFT_BILLING_POLICY_INVALID - - """ - Delivery policy cannot be updated for billing cycle contract drafts. - """ - BILLING_CYCLE_CONTRACT_DRAFT_DELIVERY_POLICY_INVALID - - """ - Cannot commit a billing cycle contract draft with this mutation. Please use SubscriptionBillingCycleContractDraftCommit. - """ - BILLING_CYCLE_PRESENT - - """ - The input value is blank. - """ - BLANK - - """ - Subscription draft has been already committed. - """ - COMMITTED - - """ - Contract draft must be a billing cycle contract draft for contract concatenation. - """ - CONCATENATION_BILLING_CYCLE_CONTRACT_DRAFT_REQUIRED - - """ - Cannot concatenate a contract draft from subscriptionContractCreate mutation. - """ - CONCATENATION_UNCOMMITTED_CONTRACT_DRAFT - - """ - Currency is not enabled. - """ - CURRENCY_NOT_ENABLED - - """ - The customer doesn't exist. - """ - CUSTOMER_DOES_NOT_EXIST - - """ - The payment method customer must be the same as the contract customer. - """ - CUSTOMER_MISMATCH - - """ - Customer is scheduled for redaction or has been redacted. - """ - CUSTOMER_REDACTED - - """ - The after cycle attribute must be unique between cycle discounts. - """ - CYCLE_DISCOUNTS_UNIQUE_AFTER_CYCLE - - """ - Billing cycle selector cannot select billing cycle outside of index range. - """ - CYCLE_INDEX_OUT_OF_RANGE - - """ - Billing cycle selector requires exactly one of index or date to be provided. - """ - CYCLE_SELECTOR_VALIDATE_ONE_OF - - """ - Billing cycle selector cannot select billing cycle outside of start date range. - """ - CYCLE_START_DATE_OUT_OF_RANGE - - """ - The delivery method can't be blank if any lines require shipping. - """ - DELIVERY_METHOD_REQUIRED - - """ - The delivery policy interval must be a multiple of the billing policy interval. - """ - DELIVERY_MUST_BE_MULTIPLE_OF_BILLING - - """ - Concatenated contracts cannot contain duplicate subscription contracts. - """ - DUPLICATE_CONCATENATED_CONTRACTS - - """ - Maximum number of concatenated contracts on a billing cycle contract draft exceeded. - """ - EXCEEDED_MAX_CONCATENATED_CONTRACTS - - """ - 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 - - """ - Cannot update a subscription contract with a current or upcoming billing cycle contract edit. - """ - HAS_FUTURE_EDITS - - """ - The input value is invalid. - """ - INVALID - - """ - The adjustment value must the same type as the adjustment type. - """ - INVALID_ADJUSTMENT_TYPE - - """ - The adjustment value must be either fixed_value or percentage. - """ - INVALID_ADJUSTMENT_VALUE - - """ - Next billing date is invalid. - """ - INVALID_BILLING_DATE - - """ - Must have at least one line. - """ - INVALID_LINES - - """ - Note length is too long. - """ - INVALID_NOTE_LENGTH - - """ - 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 - - """ - Customer payment method is required. - """ - MISSING_CUSTOMER_PAYMENT_METHOD - - """ - The local delivery options must be set for local delivery. - """ - MISSING_LOCAL_DELIVERY_OPTIONS - - """ - The value is not an integer. - """ - NOT_AN_INTEGER - - """ - Value is not in range. - """ - NOT_IN_RANGE - - """ - Discount must have at least one entitled line. - """ - NO_ENTITLED_LINES - - """ - Input value is not present. - """ - PRESENCE - - """ - The maximum number of cycles must be greater than the minimum. - """ - SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES - - """ - Another operation updated the contract concurrently as the commit was in progress. - """ - STALE_CONTRACT - - """ - The input value is too long. - """ - TOO_LONG - - """ - The contract draft has too many discounts. - """ - TOO_MANY_DISCOUNTS - - """ - The contract draft has too many lines. - """ - TOO_MANY_LINES - - """ - The input value is too short. - """ - TOO_SHORT - - """ - Billing cycle selector cannot select upcoming billing cycle past limit. - """ - UPCOMING_CYCLE_LIMIT_EXCEEDED -} - -""" -Return type for `subscriptionDraftFreeShippingDiscountAdd` mutation. -""" -type SubscriptionDraftFreeShippingDiscountAddPayload @componentName(name: "platform") { - """ - The added subscription free shipping discount. - """ - discountAdded: SubscriptionManualDiscount - - """ - The subscription contract draft object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionDraftFreeShippingDiscountUpdate` mutation. -""" -type SubscriptionDraftFreeShippingDiscountUpdatePayload @componentName(name: "platform") { - """ - The updated Subscription Discount. - """ - discountUpdated: SubscriptionManualDiscount - - """ - The Subscription Contract draft object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -The input fields required to create a Subscription Draft. -""" -input SubscriptionDraftInput @componentName(name: "sales") { - """ - The billing policy for the subscription contract. - """ - billingPolicy: SubscriptionBillingPolicyInput - - """ - A list of the custom attributes added to the subscription contract. - """ - customAttributes: [AttributeInput!] - - """ - The delivery method for the subscription contract. - """ - deliveryMethod: SubscriptionDeliveryMethodInput - - """ - The delivery policy for the subscription contract. - """ - deliveryPolicy: SubscriptionDeliveryPolicyInput - - """ - The shipping price for each renewal the subscription contract. - """ - deliveryPrice: Decimal - - """ - The next billing date for the subscription contract. - """ - nextBillingDate: DateTime - - """ - The note field that will be applied to the generated orders. - """ - note: String - - """ - The ID of the payment method to be used for the subscription contract. - """ - paymentMethodId: ID @gidTypes(types: ["CustomerPaymentMethod"]) - - """ - The current status of the subscription contract. - """ - status: SubscriptionContractSubscriptionStatus -} - -""" -Return type for `subscriptionDraftLineAdd` mutation. -""" -type SubscriptionDraftLineAddPayload @componentName(name: "platform") { - """ - The Subscription Contract draft object. - """ - draft: SubscriptionDraft - - """ - The added Subscription Line. - """ - lineAdded: SubscriptionLine - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionDraftLineRemove` mutation. -""" -type SubscriptionDraftLineRemovePayload @componentName(name: "platform") { - """ - The list of updated subscription discounts impacted by the removed line. - """ - discountsUpdated: [SubscriptionManualDiscount!] - - """ - The Subscription Contract draft object. - """ - draft: SubscriptionDraft - - """ - The removed Subscription Line. - """ - lineRemoved: SubscriptionLine - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionDraftLineUpdate` mutation. -""" -type SubscriptionDraftLineUpdatePayload @componentName(name: "platform") { - """ - The Subscription Contract draft object. - """ - draft: SubscriptionDraft - - """ - The updated Subscription Line. - """ - lineUpdated: SubscriptionLine - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Return type for `subscriptionDraftUpdate` mutation. -""" -type SubscriptionDraftUpdatePayload @componentName(name: "platform") { - """ - The Subscription Draft object. - """ - draft: SubscriptionDraft - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [SubscriptionDraftUserError!]! -} - -""" -Represents a Subscription Draft error. -""" -type SubscriptionDraftUserError implements DisplayableError @requiredAccess(scope: "`read_own_subscription_contracts` access scope.") @componentName(name: "sales") { - """ - The error code. - """ - code: SubscriptionDraftErrorCode - - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -The input fields for a subscription free shipping discount on a contract. -""" -input SubscriptionFreeShippingDiscountInput @componentName(name: "sales") { - """ - The maximum number of times the subscription free shipping discount will be applied on orders. - """ - recurringCycleLimit: Int - - """ - The title associated with the subscription free shipping discount. - """ - title: String -} - -""" -Gateway used for legacy subscription charges. -""" -type SubscriptionGateway implements Node @requiredAccess(scope: "`read_payment_settings` access scope or `read_customer_payment_methods` access scope.") @componentName(name: "payment_processing") { - """ - The status of the gateway. - """ - enabled: Boolean! - - """ - A globally-unique ID. - """ - id: ID! - - """ - Payment provider label. - """ - label: String! - - """ - Status of test mode for the gateway. - """ - testModeEnabled: Boolean! -} - -""" -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. - -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 SubscriptionLine @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") @protectedObject(subject: "customer") { - """ - The origin contract of the line if it was concatenated from another contract. - """ - concatenatedOriginContract: SubscriptionContract - - """ - The price per unit for the subscription line in the contract's currency. - """ - currentPrice: MoneyV2! - - """ - List of custom attributes associated to the line item. - """ - customAttributes: [Attribute!]! - - """ - Discount allocations. - """ - discountAllocations: [SubscriptionDiscountAllocation!]! - - """ - The unique ID. - """ - id: ID! - - """ - Total line price including all discounts. - """ - lineDiscountedPrice: MoneyV2! - - """ - Describe the price changes of the line over time. - """ - pricingPolicy: SubscriptionPricingPolicy - - """ - The product ID associated with the subscription line. - """ - productId: ID - - """ - The quantity of the unit selected for the subscription line. - """ - quantity: Int! - - """ - Whether physical shipping is required for the variant. - """ - requiresShipping: Boolean! - - """ - 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. - """ - sellingPlanId: ID - - """ - 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. - """ - sellingPlanName: String - - """ - Variant SKU number of the item associated with the subscription line. - """ - sku: String - - """ - Whether the variant is taxable. - """ - taxable: Boolean! - - """ - Product title of the item associated with the subscription line. - """ - title: String! - - """ - The product variant ID associated with the subscription line. - """ - variantId: ID - - """ - The image associated with the line item's variant or product. - """ - variantImage: Image - - """ - Product variant title of the item associated with the subscription line. - """ - variantTitle: String -} - -""" -An auto-generated type for paginating through multiple SubscriptionLines. -""" -type SubscriptionLineConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [SubscriptionLineEdge!]! - - """ - 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: [SubscriptionLine!]! - - """ - 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 SubscriptionLine and a cursor during pagination. -""" -type SubscriptionLineEdge @componentName(name: "sales") { - """ - 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 SubscriptionLineEdge. - """ - node: SubscriptionLine! -} - -""" -The input fields required to add a new subscription line to a contract. -""" -input SubscriptionLineInput @componentName(name: "sales") { - """ - The price of the product. - """ - currentPrice: Decimal! - - """ - The custom attributes for this subscription line. - """ - customAttributes: [AttributeInput!] - - """ - Describes expected price changes of the subscription line over time. - """ - pricingPolicy: SubscriptionPricingPolicyInput - - """ - The ID of the product variant the subscription line refers to. - """ - productVariantId: ID! @gidTypes(types: ["ProductVariant"]) - - """ - The quantity of the product. - """ - quantity: Int! - - """ - The selling plan for the subscription line. - """ - sellingPlanId: ID @gidTypes(types: ["SellingPlan"]) - - """ - The selling plan name for the subscription line. - - Defaults to using the selling plan's current name when not specified. - """ - sellingPlanName: String -} - -""" -The input fields required to update a subscription line on a contract. -""" -input SubscriptionLineUpdateInput @componentName(name: "sales") { - """ - The price of the product. - """ - currentPrice: Decimal - - """ - The custom attributes for this subscription line. - """ - customAttributes: [AttributeInput!] - - """ - Describes expected price changes of the subscription line over time. - """ - pricingPolicy: SubscriptionPricingPolicyInput - - """ - The ID of the product variant the subscription line refers to. - """ - productVariantId: ID @gidTypes(types: ["ProductVariant"]) - - """ - The quantity of the product. - """ - quantity: Int - - """ - The selling plan for the subscription line. - """ - sellingPlanId: ID @gidTypes(types: ["SellingPlan"]) - - """ - The selling plan name for the subscription line. - """ - sellingPlanName: String -} - -""" -A local delivery option for a subscription contract. -""" -type SubscriptionLocalDeliveryOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The code of the local delivery option. - """ - code: String! - - """ - The description of the local delivery option. - """ - description: String - - """ - Whether a phone number is required for the local delivery option. - """ - phoneRequired: Boolean! - - """ - The presentment title of the local delivery option. - """ - presentmentTitle: String - - """ - The price of the local delivery option. - """ - price: MoneyV2 - - """ - The title of the local delivery option. - """ - title: String! -} - -""" -Custom subscription discount. -""" -type SubscriptionManualDiscount @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - Entitled line items used to apply the subscription discount on. - """ - entitledLines: SubscriptionDiscountEntitledLines! - - """ - The unique ID. - """ - id: ID! - - """ - The maximum number of times the subscription discount will be applied on orders. - """ - recurringCycleLimit: Int - - """ - The reason that the discount on the subscription draft is rejected. - """ - rejectionReason: SubscriptionDiscountRejectionReason - - """ - Type of line the discount applies on. - """ - targetType: DiscountTargetType! - - """ - The title associated with the subscription discount. - """ - title: String - - """ - The type of the subscription discount. - """ - type: DiscountType! - - """ - The number of times the discount was applied. - """ - usageCount: Int! - - """ - The value of the subscription discount. - """ - value: SubscriptionDiscountValue! -} - -""" -An auto-generated type for paginating through multiple SubscriptionManualDiscounts. -""" -type SubscriptionManualDiscountConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [SubscriptionManualDiscountEdge!]! - - """ - 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: [SubscriptionManualDiscount!]! - - """ - 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 SubscriptionManualDiscount and a cursor during pagination. -""" -type SubscriptionManualDiscountEdge @componentName(name: "sales") { - """ - 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 SubscriptionManualDiscountEdge. - """ - node: SubscriptionManualDiscount! -} - -""" -The input fields for the subscription lines the discount applies on. -""" -input SubscriptionManualDiscountEntitledLinesInput @componentName(name: "sales") { - """ - Specify whether the subscription discount will apply on all subscription lines. - """ - all: Boolean - - """ - The ID of the lines to add to or remove from the subscription discount. - """ - lines: SubscriptionManualDiscountLinesInput -} - -""" -The input fields for the fixed amount value of the discount and distribution on the lines. -""" -input SubscriptionManualDiscountFixedAmountInput @componentName(name: "sales") { - """ - Fixed amount value. - """ - amount: Float - - """ - Whether the amount is intended per line item or once per subscription. - """ - appliesOnEachItem: Boolean -} - -""" -The input fields for a subscription discount on a contract. -""" -input SubscriptionManualDiscountInput @componentName(name: "sales") { - """ - Entitled line items used to apply the subscription discount on. - """ - entitledLines: SubscriptionManualDiscountEntitledLinesInput - - """ - The maximum number of times the subscription discount will be applied on orders. - """ - recurringCycleLimit: Int - - """ - The title associated with the subscription discount. - """ - title: String - - """ - Percentage or fixed amount value of the discount. - """ - value: SubscriptionManualDiscountValueInput -} - -""" -The input fields for line items that the discount refers to. -""" -input SubscriptionManualDiscountLinesInput @componentName(name: "sales") { - """ - The ID of the lines to add to the subscription discount. - """ - add: [ID!] @gidTypes(types: ["SubscriptionLine"]) - - """ - The ID of the lines to remove from the subscription discount. - """ - remove: [ID!] @gidTypes(types: ["SubscriptionLine"]) -} - -""" -The input fields for the discount value and its distribution. -""" -input SubscriptionManualDiscountValueInput @componentName(name: "sales") { - """ - Fixed amount input in the currency defined by the subscription. - """ - fixedAmount: SubscriptionManualDiscountFixedAmountInput - - """ - The percentage value of the discount. Value must be between 0 - 100. - """ - percentage: Int -} - -""" -Represents a payment gateway with its name and account ID for subscription migrations. -""" -type SubscriptionMigrationGateway @requiredAccess(scope: "The app must have read access to subscription migration gateways.") @componentName(name: "payment_processing") { - """ - The account ID associated with the payment gateway. - """ - accountId: String - - """ - Whether the payment gateway is the primary direct gateway for the shop. - """ - isPrimaryGateway: Boolean! - - """ - The name of the payment gateway. - """ - name: SubscriptionMigrationGatewayName! -} - -""" -The available payment gateways for subscription migrations. -""" -enum SubscriptionMigrationGatewayName @componentName(name: "payment_processing") { - """ - Adyen payment gateway. - """ - ADYEN - - """ - Authorize.net payment gateway. - """ - AUTHORIZE_NET - - """ - Braintree payment gateway. - """ - BRAINTREE - - """ - PayPal payment gateway. - """ - PAYPAL - - """ - Shopify Payments. - """ - SHOPIFY_PAYMENTS - - """ - Stripe payment gateway. - """ - STRIPE -} - -""" -A pickup option to deliver a subscription contract. -""" -type SubscriptionPickupOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The code of the pickup option. - """ - code: String! - - """ - The description of the pickup option. - """ - description: String - - """ - The pickup location. - """ - location: Location! - - """ - Whether a phone number is required for the pickup option. - """ - phoneRequired: Boolean! - - """ - The estimated amount of time it takes for the pickup to be ready. For example, "Usually ready in 24 hours".). - """ - pickupTime: String! - - """ - The presentment title of the pickup option. - """ - presentmentTitle: String - - """ - The price of the pickup option. - """ - price: MoneyV2 - - """ - The title of the pickup option. - """ - title: String! -} - -""" -Represents a Subscription Line Pricing Policy. -""" -type SubscriptionPricingPolicy @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The base price per unit for the subscription line in the contract's currency. - """ - basePrice: MoneyV2! - - """ - The adjustments per cycle for the subscription line. - """ - cycleDiscounts: [SubscriptionCyclePriceAdjustment!]! -} - -""" -The input fields for an array containing all pricing changes for each billing cycle. -""" -input SubscriptionPricingPolicyCycleDiscountsInput @componentName(name: "sales") { - """ - The price adjustment type. - """ - adjustmentType: SellingPlanPricingPolicyAdjustmentType! - - """ - The price adjustment value. - """ - adjustmentValue: SellingPlanPricingPolicyValueInput! - - """ - The cycle after which the pricing policy applies. - """ - afterCycle: Int! - - """ - 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 @componentName(name: "sales") { - """ - The base price per unit for the subscription line in the contract's currency. - """ - basePrice: Decimal! - - """ - An array containing all pricing changes for each billing cycle. - """ - cycleDiscounts: [SubscriptionPricingPolicyCycleDiscountsInput!]! -} - -""" -A shipping option to deliver a subscription contract. -""" -type SubscriptionShippingOption @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - The carrier service that's providing this shipping option. - This field isn't currently supported and returns null. - """ - carrierService: DeliveryCarrierService @deprecated(reason: "This field has never been implemented.") - - """ - The code of the shipping option. - """ - code: String! - - """ - The description of the shipping option. - """ - description: String - - """ - If a phone number is required for the shipping option. - """ - phoneRequired: Boolean - - """ - The presentment title of the shipping option. - """ - presentmentTitle: String - - """ - The price of the shipping option. - """ - price: MoneyV2 - - """ - The title of the shipping option. - """ - title: String! -} - -""" -The result of the query to fetch shipping options for the subscription contract. -""" -union SubscriptionShippingOptionResult @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") = SubscriptionShippingOptionResultFailure | SubscriptionShippingOptionResultSuccess - -""" -Failure determining available shipping options for delivery of a subscription contract. -""" -type SubscriptionShippingOptionResultFailure @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - Failure reason. - """ - message: String -} - -""" -A shipping option for delivery of a subscription contract. -""" -type SubscriptionShippingOptionResultSuccess @requiredAccess(scope: "the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.") @componentName(name: "sales") { - """ - Available shipping options. - """ - shippingOptions: [SubscriptionShippingOption!]! -} - -""" -A suggested transaction. Suggested transaction are usually used in the context of refunds -and exchanges. -""" -type SuggestedOrderTransaction @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { - """ - The masked account number associated with the payment method. - """ - accountNumber: String - - """ - The amount of the transaction. - """ - amount: Money! @deprecated(reason: "Use `amountSet` instead.") - - """ - The amount and currency of the suggested order transaction in shop and presentment currencies. - """ - amountSet: MoneyBag! - - """ - The human-readable payment gateway name suggested to process the transaction. - """ - formattedGateway: String - - """ - The suggested payment gateway used to process the transaction. - """ - gateway: String - - """ - Specifies the kind of the suggested order transaction. - """ - kind: SuggestedOrderTransactionKind! - - """ - Specifies the available amount to refund on the gateway. Only available within SuggestedRefund. - """ - maximumRefundable: Money @deprecated(reason: "Use `maximumRefundableSet` instead.") - - """ - Specifies the available amount to refund on the gateway in shop and - presentment currencies. Only available within SuggestedRefund. - """ - maximumRefundableSet: MoneyBag - - """ - The associated parent transaction, for example the authorization of a capture. - """ - parentTransaction: OrderTransaction - - """ - The associated payment details related to the transaction. - """ - paymentDetails: PaymentDetails - - """ - The types of refunds that the transaction supports. For example, if it's a - CARD_PRESENT_REFUND type, then the transaction requires chip data from reading - a physical card using a card reader to be refunded. Only available within - SuggestedRefund. - """ - supportedRefundType: TransactionSupportedRefundType! -} - -""" -Specifies the kind of the suggested order transaction. -""" -enum SuggestedOrderTransactionKind @componentName(name: "payment_processing") { - """ - A suggested refund transaction for an order. - """ - SUGGESTED_REFUND -} - -""" -The input fields for an exchange line item. -""" -input SuggestedOutcomeExchangeLineItemInput @componentName(name: "returns") { - """ - The ID of the exchange line item. - """ - id: ID! @gidTypes(types: ["ExchangeLineItem"]) - - """ - The quantity of the exchange line item. - """ - quantity: Int! -} - -""" -The input fields for a return line item. -""" -input SuggestedOutcomeReturnLineItemInput @componentName(name: "returns") { - """ - The ID of the return line item. - """ - id: ID! @gidTypes(types: ["ReturnLineItem"]) - - """ - The quantity of the return line item. - """ - quantity: Int! -} - -""" -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. - -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 SuggestedRefund @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { - """ - The total monetary value to be refunded. - """ - amount: Money! @deprecated(reason: "Use `amountSet` instead.") - - """ - The total monetary value to be refunded in shop and presentment currencies. - """ - amountSet: MoneyBag! - - """ - The sum of all the discounted prices of the line items being refunded. - """ - discountedSubtotalSet: MoneyBag! - - """ - The total monetary value available to refund. - """ - maximumRefundable: Money! @deprecated(reason: "Use `maximumRefundableSet` instead.") - - """ - The total monetary value available to refund in shop and presentment currencies. - """ - maximumRefundableSet: MoneyBag! - - """ - An array of additional fees that will be refunded to the customer. - """ - refundAdditionalFees: [RefundAdditionalFee!]! - - """ - A list of duties to be refunded from the order. - """ - refundDuties: [RefundDuty!]! - - """ - A list of line items to be refunded, along with restock instructions. - """ - refundLineItems: [RefundLineItem!]! - - """ - The shipping costs to be refunded from the order. - """ - shipping: ShippingRefund! - - """ - The sum of all the prices of the line items being refunded. - """ - subtotal: Money! @deprecated(reason: "Use `subtotalSet` instead.") - - """ - The sum of all the prices of the line items being refunded in shop and presentment currencies. - """ - subtotalSet: MoneyBag! - - """ - A list of suggested refund methods. - """ - suggestedRefundMethods: [SuggestedRefundMethod!]! - - """ - A list of suggested order transactions. - """ - suggestedTransactions: [SuggestedOrderTransaction!]! - - """ - The sum of all the additional fees being refunded from the order in shop and - presentment currencies. The value must be positive. - """ - totalAdditionalFeesSet: MoneyBag! - - """ - The total cart discount amount that was applied to all line items in this refund. - """ - totalCartDiscountAmountSet: MoneyBag! - - """ - The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. - """ - 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.") -} - -""" -Generic attributes of a suggested refund method. -""" -interface SuggestedRefundMethod @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { - """ - 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! -} - -""" -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. -""" -type SuggestedReturnFinancialOutcome @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - The sum of all the discounted prices of the line items being refunded. - """ - discountedSubtotal: MoneyBag! - - """ - The financial transfer details for the return outcome. - """ - financialTransfer: ReturnOutcomeFinancialTransfer - - """ - The total monetary value available to refund in shop and presentment currencies. - """ - maximumRefundable: MoneyBag! - - """ - A list of additional fees to be refunded from the order. - """ - refundAdditionalFees: [RefundAdditionalFee!]! - - """ - A list of duties to be refunded from the order. - """ - refundDuties: [RefundDuty!]! - - """ - The shipping costs to be refunded from the order. - """ - shipping: ShippingRefund! - - """ - The sum of all the additional fees being refunded in shop and presentment currencies. The value must be positive. - """ - totalAdditionalFees: MoneyBag! - - """ - The total cart discount amount that was applied to all line items in this refund. - """ - totalCartDiscountAmount: MoneyBag! - - """ - The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. - """ - totalDuties: MoneyBag! - - """ - The sum of the taxes being refunded in shop and presentment currencies. The value must be positive. - """ - 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 @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope. Also: Requires the `read_returns` access scope.") @componentName(name: "returns") { - """ - The total monetary value to be refunded in shop and presentment currencies. - """ - amount: MoneyBag! - - """ - The sum of all the discounted prices of the line items being refunded. - """ - discountedSubtotal: MoneyBag! - - """ - The total monetary value available to refund in shop and presentment currencies. - """ - maximumRefundable: MoneyBag! - - """ - A list of additional fees to be refunded from the order. - """ - refundAdditionalFees: [RefundAdditionalFee!]! - - """ - A list of duties to be refunded from the order. - """ - refundDuties: [RefundDuty!]! - - """ - The shipping costs to be refunded from the order. - """ - shipping: ShippingRefund! - - """ - The sum of all the prices of the line items being refunded in shop and presentment currencies. - """ - subtotal: MoneyBag! - - """ - A list of suggested order transactions. - """ - suggestedTransactions: [SuggestedOrderTransaction!]! - - """ - The sum of all the additional fees being refunded in shop and presentment currencies. The value must be positive. - """ - totalAdditionalFees: MoneyBag! - - """ - The total cart discount amount that was applied to all line items in this refund. - """ - totalCartDiscountAmount: MoneyBag! - - """ - The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive. - """ - totalDuties: MoneyBag! - - """ - The sum of the taxes being refunded in shop and presentment currencies. The value must be positive. - """ - totalTax: MoneyBag! -} - -""" -The suggested values for a refund to store credit. -""" -type SuggestedStoreCreditRefund implements SuggestedRefundMethod @requiredAccess(scope: "`read_orders` access scope or `read_marketplace_orders` access scope.") @componentName(name: "returns") { - """ - The suggested amount to refund in shop and presentment currencies. - """ - amount: MoneyBag! - - """ - The suggested expiration date for the store credit. - """ - expiresAt: DateTime - - """ - The maximum available amount to refund in shop and presentment currencies. - """ - maximumRefundable: MoneyBag! -} - -""" -Return type for `tagsAdd` mutation. -""" -type TagsAddPayload @componentName(name: "platform") { - """ - The object that was updated. - """ - node: Node - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `tagsRemove` mutation. -""" -type TagsRemovePayload @componentName(name: "platform") { - """ - The object that was updated. - """ - node: Node - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Tax app configuration of a merchant. -""" -type TaxAppConfiguration @requiredAccess(scope: "`read_taxes` access scope. Also: The user must have access to manage taxes.") @componentName(name: "taxes") { - """ - State of the tax app configuration. - """ - state: TaxPartnerState! -} - -""" -Return type for `taxAppConfigure` mutation. -""" -type TaxAppConfigurePayload @componentName(name: "platform") { - """ - The updated tax app configuration. - """ - taxAppConfiguration: TaxAppConfiguration - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [TaxAppConfigureUserError!]! -} - -""" -An error that occurs during the execution of `TaxAppConfigure`. -""" -type TaxAppConfigureUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: TaxAppConfigureUserErrorCode - - """ - 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 `TaxAppConfigureUserError`. -""" -enum TaxAppConfigureUserErrorCode @componentName(name: "platform") { - """ - Unable to update already active tax partner. - """ - TAX_PARTNER_ALREADY_ACTIVE - - """ - Unable to find the tax partner record. - """ - TAX_PARTNER_NOT_FOUND - - """ - Unable to update tax partner state. - """ - TAX_PARTNER_STATE_UPDATE_FAILED -} - -""" -Available customer tax exemptions. -""" -enum TaxExemption @componentName(name: "taxes") { - """ - This customer is exempt from GST taxes for holding a valid exemption. The - business customer should provide their GST number and account for the GST. - """ - AUSTRALIA_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in British Columbia. - """ - CA_BC_COMMERCIAL_FISHERY_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in British Columbia. - """ - CA_BC_CONTRACTOR_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in British Columbia. - """ - CA_BC_PRODUCTION_AND_MACHINERY_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in British Columbia. - """ - CA_BC_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in British Columbia. - """ - CA_BC_SUB_CONTRACTOR_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid DIPLOMAT_EXEMPTION in Canada. - """ - CA_DIPLOMAT_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Manitoba. - """ - CA_MB_COMMERCIAL_FISHERY_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Manitoba. - """ - CA_MB_FARMER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Manitoba. - """ - CA_MB_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Nova Scotia. - """ - CA_NS_COMMERCIAL_FISHERY_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Nova Scotia. - """ - CA_NS_FARMER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid PURCHASE_EXEMPTION in Ontario. - """ - CA_ON_PURCHASE_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Prince Edward Island. - """ - CA_PE_COMMERCIAL_FISHERY_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Saskatchewan. - """ - CA_SK_COMMERCIAL_FISHERY_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in Saskatchewan. - """ - CA_SK_CONTRACTOR_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Saskatchewan. - """ - CA_SK_FARMER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in Saskatchewan. - """ - CA_SK_PRODUCTION_AND_MACHINERY_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Saskatchewan. - """ - CA_SK_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in Saskatchewan. - """ - CA_SK_SUB_CONTRACTOR_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid STATUS_CARD_EXEMPTION in Canada. - """ - CA_STATUS_CARD_EXEMPTION - - """ - 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. - """ - EU_REVERSE_CHARGE_EXEMPTION_RULE - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Alaska. - """ - US_AK_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Alabama. - """ - US_AL_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Arkansas. - """ - US_AR_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Arizona. - """ - US_AZ_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in California. - """ - US_CA_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Colorado. - """ - US_CO_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Connecticut. - """ - US_CT_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Washington DC. - """ - US_DC_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Delaware. - """ - US_DE_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Florida. - """ - US_FL_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Georgia. - """ - US_GA_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Hawaii. - """ - US_HI_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Iowa. - """ - US_IA_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Idaho. - """ - US_ID_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Illinois. - """ - US_IL_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Indiana. - """ - US_IN_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Kansas. - """ - US_KS_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Kentucky. - """ - US_KY_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Louisiana. - """ - US_LA_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Massachusetts. - """ - US_MA_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Maryland. - """ - US_MD_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Maine. - """ - US_ME_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Michigan. - """ - US_MI_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Minnesota. - """ - US_MN_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Missouri. - """ - US_MO_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Mississippi. - """ - US_MS_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Montana. - """ - US_MT_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in North Carolina. - """ - US_NC_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in North Dakota. - """ - US_ND_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Nebraska. - """ - US_NE_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Hampshire. - """ - US_NH_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Jersey. - """ - US_NJ_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Mexico. - """ - US_NM_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Nevada. - """ - US_NV_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New York. - """ - US_NY_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Ohio. - """ - US_OH_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Oklahoma. - """ - US_OK_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Oregon. - """ - US_OR_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Pennsylvania. - """ - US_PA_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Rhode Island. - """ - US_RI_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in South Carolina. - """ - US_SC_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in South Dakota. - """ - US_SD_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Tennessee. - """ - US_TN_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Texas. - """ - US_TX_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Utah. - """ - US_UT_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Virginia. - """ - US_VA_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Vermont. - """ - US_VT_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Washington. - """ - US_WA_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wisconsin. - """ - US_WI_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in West Virginia. - """ - US_WV_RESELLER_EXEMPTION - - """ - This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wyoming. - """ - US_WY_RESELLER_EXEMPTION -} - -""" -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. - -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 @componentName(name: "sales") { - """ - Whether the channel that submitted the tax line is liable for remitting. A - value of null indicates unknown liability for this tax line. - """ - channelLiable: Boolean - - """ - The amount of tax, in shop currency, after discounts and before returns. - """ - price: Money! @deprecated(reason: "Use `priceSet` instead.") - - """ - The amount of tax, in shop and presentment currencies, after discounts and before returns. - """ - priceSet: MoneyBag! - - """ - The proportion of the line item price that the tax represents as a decimal. - """ - rate: Float - - """ - The proportion of the line item price that the tax represents as a percentage. - """ - ratePercentage: Float - - """ - The source of the tax. - """ - source: String - - """ - The name of the tax. - """ - title: String! -} - -""" -State of the tax app configuration. -""" -enum TaxPartnerState @componentName(name: "taxes") { - """ - App is configured and to be used for tax calculations. - """ - ACTIVE - - """ - App is not configured. - """ - PENDING - - """ - App is configured, but not used for tax calculations. - """ - READY -} - -""" -Tax settings for a customer. -""" -type TaxSettings @requiredAccess(scope: "`read_customers` access scope or `read_taxes` access scope.") @componentName(name: "taxes") { - """ - The customer's tax ID. - """ - taxId: String -} - -""" -Return type for `taxSummaryCreate` mutation. -""" -type TaxSummaryCreatePayload @componentName(name: "platform") { - """ - A list of orders that were successfully enqueued to create a tax summary. - """ - enqueuedOrders: [Order!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [TaxSummaryCreateUserError!]! -} - -""" -An error that occurs during the execution of `TaxSummaryCreate`. -""" -type TaxSummaryCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: TaxSummaryCreateUserErrorCode - - """ - 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 `TaxSummaryCreateUserError`. -""" -enum TaxSummaryCreateUserErrorCode @componentName(name: "platform") { - """ - There was an error during enqueueing of the tax summary creation job(s). - """ - GENERAL_ERROR - - """ - No order was not found. - """ - ORDER_NOT_FOUND -} - -""" -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. - -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 @componentName(name: "merchandising") { - """ - 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. - """ - categories( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The ID of the category associated with the child categories to return. - """ - childrenOf: ID @gidTypes(types: ["Category"]) - - """ - The ID of the category associated with the descendant categories to return. - """ - descendantsOf: ID @gidTypes(types: ["Category"]) - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Searches the product taxonomy for matching categories. - """ - search: String - - """ - The ID of the category associated with the sibling categories to return. - """ - siblingsOf: ID @gidTypes(types: ["Category"]) - ): TaxonomyCategoryConnection! -} - -""" -A Shopify product taxonomy attribute. -""" -type TaxonomyAttribute implements Node @componentName(name: "merchandising") { - """ - A globally-unique ID. - """ - id: ID! -} - -""" -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. - -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 @componentName(name: "merchandising") { - """ - The IDs of the category's ancestor categories. - """ - ancestorIds: [ID!]! - - """ - The attributes of the taxonomy category. - """ - attributes( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - ): TaxonomyCategoryAttributeConnection! - - """ - The IDs of the category's child categories. - """ - childrenIds: [ID!]! - - """ - The full name of the taxonomy category. For example, Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Beds. - """ - fullName: String! - - """ - The globally-unique ID of the TaxonomyCategory. - """ - id: ID! - - """ - Whether the category is archived. The default value is `false`. - """ - isArchived: Boolean! - - """ - 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. - """ - isLeaf: Boolean! - - """ - 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. - """ - isRoot: Boolean! - - """ - 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. - """ - level: Int! - - """ - The name of the taxonomy category. For example, Dog Beds. - """ - name: String! - - """ - The ID of the category's parent category. - """ - parentId: ID -} - -""" -A product taxonomy attribute interface. -""" -union TaxonomyCategoryAttribute @componentName(name: "merchandising") = TaxonomyAttribute | TaxonomyChoiceListAttribute | TaxonomyMeasurementAttribute - -""" -An auto-generated type for paginating through multiple TaxonomyCategoryAttributes. -""" -type TaxonomyCategoryAttributeConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [TaxonomyCategoryAttributeEdge!]! - - """ - 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!]! - - """ - 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 TaxonomyCategoryAttribute and a cursor during pagination. -""" -type TaxonomyCategoryAttributeEdge @componentName(name: "merchandising") { - """ - 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 TaxonomyCategoryAttributeEdge. - """ - node: TaxonomyCategoryAttribute! -} - -""" -An auto-generated type for paginating through multiple TaxonomyCategories. -""" -type TaxonomyCategoryConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - 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! -} - -""" -An auto-generated type which holds one TaxonomyCategory and a cursor during pagination. -""" -type TaxonomyCategoryEdge @componentName(name: "merchandising") { - """ - 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 TaxonomyCategoryEdge. - """ - node: TaxonomyCategory! -} - -""" -A Shopify product taxonomy choice list attribute. -""" -type TaxonomyChoiceListAttribute implements Node @componentName(name: "merchandising") { - """ - The unique ID of the TaxonomyAttribute. - """ - id: ID! - - """ - The name of the product taxonomy attribute. For example, Color. - """ - name: String! - - """ - A list of values on the choice list attribute. - """ - values( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - ): TaxonomyValueConnection! -} - -""" -A Shopify product taxonomy measurement attribute. -""" -type TaxonomyMeasurementAttribute implements Node @componentName(name: "merchandising") { - """ - The unique ID of the TaxonomyAttribute. - """ - id: ID! - - """ - The name of the product taxonomy attribute. For example, Color. - """ - name: String! - - """ - The product taxonomy attribute options. - """ - options: [Attribute!]! -} - -""" -Represents a Shopify product taxonomy value. -""" -type TaxonomyValue implements Node @componentName(name: "merchandising") { - """ - A globally-unique ID. - """ - id: ID! - - """ - The name of the product taxonomy value. For example, Red. - """ - name: String! -} - -""" -An auto-generated type for paginating through multiple TaxonomyValues. -""" -type TaxonomyValueConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [TaxonomyValueEdge!]! - - """ - 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. - """ - nodes: [TaxonomyValue!]! - - """ - 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 TaxonomyValue and a cursor during pagination. -""" -type TaxonomyValueEdge @componentName(name: "merchandising") { - """ - 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 TaxonomyValueEdge. - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { - """ - The amount and currency of the tender transaction. - """ - amount: MoneyV2! - - """ - A globally-unique ID. - """ - id: ID! - - """ - The order that's related to the tender transaction. This value is null if the order has been deleted. - """ - order: Order - - """ - Information about the payment method used for the transaction. - """ - paymentMethod: String - - """ - Date and time when the transaction was processed. - """ - processedAt: DateTime - - """ - The remote gateway reference associated with the tender transaction. - """ - remoteReference: String - - """ - Whether the transaction is a test transaction. - """ - test: Boolean! - - """ - Information about the payment instrument used for the transaction. - """ - transactionDetails: TenderTransactionDetails - - """ - The staff member who performed the transaction. - """ - user: StaffMember -} - -""" -An auto-generated type for paginating through multiple TenderTransactions. -""" -type TenderTransactionConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [TenderTransactionEdge!]! - - """ - 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. - """ - nodes: [TenderTransaction!]! - - """ - An object that’s used to retrieve [cursor - information](https://shopify.dev/api/usage/pagination-graphql) about the current page. - """ - pageInfo: PageInfo! -} - -""" -Information about the credit card used for this transaction. -""" -type TenderTransactionCreditCardDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") @protectedObject(subject: "customer") { - """ - The name of the company that issued the customer's credit card. Example: `Visa`. - """ - creditCardCompany: String - - """ - The customer's credit card number, with all digits except the last 4 redacted. Example: `•••• •••• •••• 1234` - """ - creditCardNumber: String -} - -""" -Information about the payment instrument used for this transaction. -""" -union TenderTransactionDetails @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") = TenderTransactionCreditCardDetails - -""" -An auto-generated type which holds one TenderTransaction and a cursor during pagination. -""" -type TenderTransactionEdge @componentName(name: "payment_processing") { - """ - 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 TenderTransactionEdge. - """ - node: TenderTransaction! -} - -""" -Return type for `themeCreate` mutation. -""" -type ThemeCreatePayload @componentName(name: "platform") { - """ - The theme that was created. - """ - theme: OnlineStoreTheme - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ThemeCreateUserError!]! -} - -""" -An error that occurs during the execution of `ThemeCreate`. -""" -type ThemeCreateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ThemeCreateUserErrorCode - - """ - 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 `ThemeCreateUserError`. -""" -enum ThemeCreateUserErrorCode @componentName(name: "platform") { - """ - Invalid theme role for theme creation. - """ - INVALID_THEME_ROLE_FOR_THEME_CREATION - - """ - Must be a zip file. - """ - INVALID_ZIP - - """ - Theme creation is not allowed for your shop's plan. - """ - THEME_CREATION_NOT_ALLOWED_FOR_THEME_LIMITED_PLAN - - """ - Zip is empty. - """ - ZIP_IS_EMPTY - - """ - May not be used to fetch a file bigger - than 50MB. - """ - ZIP_TOO_LARGE -} - -""" -Return type for `themeDelete` mutation. -""" -type ThemeDeletePayload @componentName(name: "platform") { - """ - The ID of the deleted theme. - """ - deletedThemeId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ThemeDeleteUserError!]! -} - -""" -An error that occurs during the execution of `ThemeDelete`. -""" -type ThemeDeleteUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ThemeDeleteUserErrorCode - - """ - 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 `ThemeDeleteUserError`. -""" -enum ThemeDeleteUserErrorCode @componentName(name: "platform") { - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -Return type for `themeDuplicate` mutation. -""" -type ThemeDuplicatePayload @componentName(name: "platform") { - """ - The newly duplicated theme. - """ - newTheme: OnlineStoreTheme - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ThemeDuplicateUserError!]! -} - -""" -An error that occurs during the execution of `ThemeDuplicate`. -""" -type ThemeDuplicateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ThemeDuplicateUserErrorCode - - """ - 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 `ThemeDuplicateUserError`. -""" -enum ThemeDuplicateUserErrorCode @componentName(name: "platform") { - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND -} - -""" -The input fields for the file copy. -""" -input ThemeFilesCopyFileInput @componentName(name: "online_store") { - """ - The new file where the content is copied to. - """ - dstFilename: String! - - """ - The source file to copy from. - """ - srcFilename: String! -} - -""" -Return type for `themeFilesCopy` mutation. -""" -type ThemeFilesCopyPayload @componentName(name: "platform") { - """ - The resulting theme files. - """ - copiedThemeFiles: [OnlineStoreThemeFileOperationResult!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [OnlineStoreThemeFilesUserErrors!]! -} - -""" -Return type for `themeFilesDelete` mutation. -""" -type ThemeFilesDeletePayload @componentName(name: "platform") { - """ - The resulting theme files. - """ - deletedThemeFiles: [OnlineStoreThemeFileOperationResult!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [OnlineStoreThemeFilesUserErrors!]! -} - -""" -Return type for `themeFilesUpsert` mutation. -""" -type ThemeFilesUpsertPayload @componentName(name: "platform") { - """ - The theme files write job triggered by the mutation. - """ - job: Job - - """ - The resulting theme files. - """ - upsertedThemeFiles: [OnlineStoreThemeFileOperationResult!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [OnlineStoreThemeFilesUserErrors!]! -} - -""" -Return type for `themePublish` mutation. -""" -type ThemePublishPayload @componentName(name: "platform") { - """ - The theme that was published. - """ - theme: OnlineStoreTheme - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ThemePublishUserError!]! -} - -""" -An error that occurs during the execution of `ThemePublish`. -""" -type ThemePublishUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ThemePublishUserErrorCode - - """ - 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 `ThemePublishUserError`. -""" -enum ThemePublishUserErrorCode @componentName(name: "platform") { - """ - Theme publishing is not available during install. - """ - CANNOT_PUBLISH_THEME_DURING_INSTALL - - """ - The record with the ID used as the input value couldn't be found. - """ - NOT_FOUND - - """ - Theme publishing is not allowed on this plan. - """ - THEME_PUBLISH_NOT_AVAILABLE_FOR_THEME_LIMITED_PLAN -} - -""" -The role of the theme. -""" -enum ThemeRole @componentName(name: "online_store") { - """ - 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. - """ - ARCHIVED - - """ - 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. - """ - DEMO - - """ - The theme is automatically created by the CLI for previewing purposes when in a development session. - """ - DEVELOPMENT - - """ - The theme is locked if it is identified as unlicensed. Customization and - publishing are restricted until the merchant resolves the licensing issue. - """ - LOCKED - - """ - The currently published theme. There can only be one main theme at any time. - """ - MAIN - - """ - The currently published theme that is only accessible to a mobile client. - """ - MOBILE @deprecated(reason: "The feature for this role has been deprecated.") - - """ - The theme is currently not published. It can be transitioned to the main role if it is published by the merchant. - """ - UNPUBLISHED -} - -""" -Return type for `themeUpdate` mutation. -""" -type ThemeUpdatePayload @componentName(name: "platform") { - """ - The theme that was updated. - """ - theme: OnlineStoreTheme - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ThemeUpdateUserError!]! -} - -""" -An error that occurs during the execution of `ThemeUpdate`. -""" -type ThemeUpdateUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: ThemeUpdateUserErrorCode - - """ - 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 `ThemeUpdateUserError`. -""" -enum ThemeUpdateUserErrorCode @componentName(name: "platform") { - """ - 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 -} - -""" -A sale associated with a tip. -""" -type TipSale implements Sale @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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! -} - -""" -Represents duties that applied to the order. -""" -type TotalDuties @requiredAccess(scope: "`read_order_edits` access scope.") @componentName(name: "sales") { - """ - The amount of duties, in shop and presentment currencies. - """ - priceSet: MoneyBag! - - """ - The description of the duties. - """ - title: String -} - -""" -Transaction fee related to an order transaction. -""" -type TransactionFee implements Node @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "payment_processing") { - """ - Amount of the fee. - """ - amount: MoneyV2! - - """ - Flat rate charge for a transaction. - """ - flatFee: MoneyV2! - - """ - Name of the credit card flat fee. - """ - flatFeeName: String - - """ - A globally-unique ID. - """ - id: ID! - - """ - Percentage charge. - """ - rate: Decimal! - - """ - Name of the credit card rate. - """ - rateName: String - - """ - Tax amount charged on the fee. - """ - taxAmount: MoneyV2! - - """ - Name of the type of fee. - """ - type: String! -} - -""" -The set of valid sort keys for the Transaction query. -""" -enum TransactionSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `expires_at` value. - """ - EXPIRES_AT -} - -""" -The supported methods for processing a refund, indicating whether or not a physical card must be present. -""" -enum TransactionSupportedRefundType @componentName(name: "returns") { - """ - Refund without a physical card. - """ - CARD_NOT_PRESENT_REFUND - - """ - Refund requiring card present data. For example, the physical card and a - reader. Note: third party developers can't refund this type. - """ - CARD_PRESENT_REFUND -} - -""" -Return type for `transactionVoid` mutation. -""" -type TransactionVoidPayload @componentName(name: "platform") { - """ - The created void transaction. - """ - transaction: OrderTransaction - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [TransactionVoidUserError!]! -} - -""" -An error that occurs during the execution of `TransactionVoid`. -""" -type TransactionVoidUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: TransactionVoidUserErrorCode - - """ - 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 `TransactionVoidUserError`. -""" -enum TransactionVoidUserErrorCode @componentName(name: "platform") { - """ - Transaction must be a successful authorization. - """ - AUTH_NOT_SUCCESSFUL - - """ - Transaction must be voidable. - """ - AUTH_NOT_VOIDABLE - - """ - A generic error occurred while attempting to void the transaction. - """ - GENERIC_ERROR - - """ - Transaction does not exist. - """ - TRANSACTION_NOT_FOUND -} - -""" -The set of valid sort keys for the Transfer query. -""" -enum TransferSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `destination_name` value. - """ - DESTINATION_NAME - - """ - Sort by the `expected_shipment_arrival` value. - """ - EXPECTED_SHIPMENT_ARRIVAL - - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `name` value. - """ - NAME - - """ - Sort by the `origin_name` value. - """ - ORIGIN_NAME - - """ - Sort by the `source_name` value. - """ - SOURCE_NAME - - """ - Sort by the `status` value. - """ - STATUS -} - -""" -Translatable content of a resource's field. -""" -type TranslatableContent @componentName(name: "markets") { - """ - Hash digest representation of the content value. - """ - digest: String - - """ - The resource field that's being translated. - """ - key: String! - - """ - Locale of the content. - """ - locale: String! - - """ - Type of the translatable content. - """ - type: LocalizableContentType! - - """ - Content value. - """ - 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 @requiredAccess(scope: "`read_translations` access scope.") @componentName(name: "markets") { - """ - Nested translatable resources under the current resource. - """ - nestedTranslatableResources( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Return only resources of a type. - """ - resourceType: TranslatableResourceType - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): TranslatableResourceConnection! - - """ - GID of the resource. - """ - resourceId: ID! - - """ - Translatable content. - """ - translatableContent( - """ - Filters translatable content by market ID. Use this argument to retrieve translatable content specific to a market. - """ - marketId: ID @gidTypes(types: ["Market"]) - ): [TranslatableContent!]! - - """ - Translatable content translations (includes unpublished locales). - """ - translations( - """ - Filters translations by locale. - """ - locale: String! - - """ - Filters translations by market ID. Use this argument to retrieve content specific to a market. - """ - marketId: ID @gidTypes(types: ["Market"]) - - """ - Filters by outdated translations. - """ - outdated: Boolean - ): [Translation!]! -} - -""" -An auto-generated type for paginating through multiple TranslatableResources. -""" -type TranslatableResourceConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [TranslatableResourceEdge!]! - - """ - 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. - """ - nodes: [TranslatableResource!]! - - """ - 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 TranslatableResource and a cursor during pagination. -""" -type TranslatableResourceEdge @componentName(name: "markets") { - """ - 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 TranslatableResourceEdge. - """ - node: TranslatableResource! -} - -""" -Specifies the type of resources that are translatable. -""" -enum TranslatableResourceType @componentName(name: "markets") { - """ - A blog post. Translatable fields: `title`, `body_html`, `summary_html`, `handle`, `meta_title`, `meta_description`. - """ - ARTICLE - - """ - An article image. Translatable fields: `alt`. - """ - ARTICLE_IMAGE - - """ - A blog. Translatable fields: `title`, `handle`, `meta_title`, `meta_description`. - """ - BLOG - - """ - A product collection. Translatable fields: `title`, `body_html`, `handle`, `meta_title`, `meta_description`. - """ - COLLECTION - - """ - A collection image. Translatable fields: `alt`. - """ - COLLECTION_IMAGE - - """ - The shop's cookie banner. Translatable fields: `policy_link_text`, `title`, - `text`, `button_prefs_open_text`, `button_accept_text`, `button_decline_text`, - `preferences_title`, `preferences_intro_title`, `preferences_intro_text`, - `preferences_button_accept_text`, `preferences_button_decline_text`, - `preferences_button_save_text`, `preferences_bullet_points_title`, - `preferences_bullet_points_first_text`, - `preferences_bullet_points_second_text`, - `preferences_bullet_points_third_text`, `preferences_purposes_essential_name`, - `preferences_purposes_essential_desc`, - `preferences_purposes_performance_name`, - `preferences_purposes_performance_desc`, - `preferences_purposes_preferences_name`, - `preferences_purposes_preferences_desc`, - `preferences_purposes_marketing_name`, `preferences_purposes_marketing_desc`, - `policy_link_url`. - """ - COOKIE_BANNER - - """ - The delivery method definition. For example, "Standard", or "Expedited". Translatable fields: `name`, `description`. - """ - DELIVERY_METHOD_DEFINITION - - """ - An email template. Translatable fields: `title`, `body_html`. - """ - EMAIL_TEMPLATE - - """ - A filter. Translatable fields: `label`. - """ - FILTER - - """ - A link to direct users. Translatable fields: `title`. - """ - LINK - - """ - An image. Translatable fields: `alt`. - """ - MEDIA_IMAGE - - """ - A category of links. Translatable fields: `title`. - """ - MENU - - """ - A Metafield. Translatable fields: `value`. - """ - METAFIELD - - """ - A Metaobject. Translatable fields are determined by the Metaobject type. - """ - METAOBJECT - - """ - An online store theme. Translatable fields: `dynamic keys based on theme data`. - """ - ONLINE_STORE_THEME - - """ - A theme app embed. Translatable fields: `dynamic keys based on theme data`. - """ - ONLINE_STORE_THEME_APP_EMBED - - """ - A theme json template. Translatable fields: `dynamic keys based on theme data`. - """ - ONLINE_STORE_THEME_JSON_TEMPLATE - - """ - Locale file content of an online store theme. Translatable fields: `dynamic keys based on theme data`. - """ - ONLINE_STORE_THEME_LOCALE_CONTENT - - """ - A theme json section group. Translatable fields: `dynamic keys based on theme data`. - """ - ONLINE_STORE_THEME_SECTION_GROUP - - """ - A theme setting category. Translatable fields: `dynamic keys based on theme data`. - """ - ONLINE_STORE_THEME_SETTINGS_CATEGORY - - """ - Shared static sections of an online store theme. Translatable fields: `dynamic keys based on theme data`. - """ - ONLINE_STORE_THEME_SETTINGS_DATA_SECTIONS - - """ - A packing slip template. Translatable fields: `body`. - """ - PACKING_SLIP_TEMPLATE - - """ - A page. Translatable fields: `title`, `body_html`, `handle`, `meta_title`, `meta_description`. - """ - PAGE - - """ - A payment gateway. Translatable fields: `name`, `message`, `before_payment_instructions`. - """ - PAYMENT_GATEWAY - - """ - An online store product. Translatable fields: `title`, `body_html`, `handle`, - `product_type`, `meta_title`, `meta_description`. - """ - PRODUCT - - """ - An online store custom product property name. For example, "Size", "Color", or "Material". - Translatable fields: `name`. - """ - PRODUCT_OPTION - - """ - The product option value names. For example, "Red", "Blue", and "Green" for a "Color" option. Translatable fields: `name`. - """ - PRODUCT_OPTION_VALUE - - """ - A selling plan. Translatable fields:`name`, `option1`, `option2`, `option3`, `description`. - """ - SELLING_PLAN - - """ - A selling plan group. Translatable fields: `name`, `option1`, `option2`, `option3`. - """ - SELLING_PLAN_GROUP - - """ - A shop. Translatable fields: `meta_title`, `meta_description`. - """ - SHOP - - """ - A shop policy. Translatable fields: `body`. - """ - SHOP_POLICY -} - -""" -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. - -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. - -Learn more about [managing translated content](https://shopify.dev/docs/apps/build/markets/manage-translated-content). -""" -type Translation @componentName(name: "markets") { - """ - On the resource that this translation belongs to, the reference to the value being translated. - """ - key: String! - - """ - ISO code of the translation locale. - """ - locale: String! - - """ - The market that the translation is specific to. Null value means the translation is available in all markets. - """ - market: Market - - """ - Whether the original content has changed since this translation was updated. - """ - outdated: Boolean! - - """ - The date and time when the translation was updated. - """ - updatedAt: DateTime - - """ - Translation value. - """ - value: String -} - -""" -Possible error codes that can be returned by `TranslationUserError`. -""" -enum TranslationErrorCode @componentName(name: "platform") { - """ - The input value is blank. - """ - BLANK - - """ - Translation value is invalid. - """ - FAILS_RESOURCE_VALIDATION - - """ - The input value is invalid. - """ - INVALID - - """ - Locale language code is invalid. - """ - INVALID_CODE - - """ - Locale code format is invalid. - """ - INVALID_FORMAT - - """ - Translation key is invalid. - """ - INVALID_KEY_FOR_MODEL - - """ - The locale is missing on the market corresponding to the `marketId` argument. - """ - 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") - - """ - Locale is invalid for the shop. - """ - INVALID_LOCALE_FOR_SHOP - - """ - Market localizable content is invalid. - """ - INVALID_MARKET_LOCALIZABLE_CONTENT - - """ - Translatable content is invalid. - """ - INVALID_TRANSLATABLE_CONTENT - - """ - The handle is already taken for this resource. - """ - INVALID_VALUE_FOR_HANDLE_TRANSLATION - - """ - The shop isn't allowed to operate on market custom content. - """ - MARKET_CUSTOM_CONTENT_NOT_ALLOWED - - """ - The market corresponding to the `marketId` argument doesn't exist. - """ - MARKET_DOES_NOT_EXIST - - """ - The market override locale creation failed. - """ - MARKET_LOCALE_CREATION_FAILED - - """ - Resource does not exist. - """ - RESOURCE_NOT_FOUND - - """ - The specified resource can't be customized for a market. - """ - RESOURCE_NOT_MARKET_CUSTOMIZABLE - - """ - Resource is not translatable. - """ - RESOURCE_NOT_TRANSLATABLE - - """ - Too many translation keys for the resource. - """ - TOO_MANY_KEYS_FOR_RESOURCE -} - -""" -The input fields and values for creating or updating a translation. -""" -input TranslationInput @componentName(name: "markets") { - """ - On the resource that this translation belongs to, the reference to the value being translated. - """ - key: String! - - """ - ISO code of the locale being translated into. Only locales returned in `shopLocales` are valid. - """ - locale: String! - - """ - 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. - """ - marketId: ID @gidTypes(types: ["Market"]) - - """ - Hash digest representation of the content being translated. - """ - translatableContentDigest: String! - - """ - The value of the translation. - """ - value: String! -} - -""" -Represents an error that happens during the execution of a translation mutation. -""" -type TranslationUserError implements DisplayableError @requiredAccess(scope: "`read_translations` access scope.") @componentName(name: "markets") { - """ - The error code. - """ - code: TranslationErrorCode - - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -Return type for `translationsRegister` mutation. -""" -type TranslationsRegisterPayload @componentName(name: "platform") { - """ - The translations that were created or updated. - """ - translations: [Translation!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [TranslationUserError!]! -} - -""" -Return type for `translationsRemove` mutation. -""" -type TranslationsRemovePayload @componentName(name: "platform") { - """ - The translations that were deleted. - """ - translations: [Translation!] - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [TranslationUserError!]! -} - -""" -Represents a typed custom attribute. -""" -type TypedAttribute @componentName(name: "sales") { - """ - Key or name of the attribute. - """ - 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 @componentName(name: "merchant_marketing") { - """ - The name of the UTM campaign. - """ - campaign: String! - - """ - The UTM campaign medium. - """ - medium: String! - - """ - The name of the website or application where the referral link exists. - """ - source: String! -} - -""" -Represents a set of UTM parameters. -""" -type UTMParameters @componentName(name: "merchant_marketing") @protectedObject(subject: "customer") { - """ - The name of a marketing campaign. - """ - campaign: String - - """ - 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. - """ - content: String - - """ - The medium of a marketing campaign, such as a banner or email newsletter. - """ - medium: String - - """ - The source of traffic to the merchant's store, such as Google or an email newsletter. - """ - source: String - - """ - Paid search terms used by a marketing campaign. - """ - term: String -} - -""" -The input fields that identify a unique valued metafield. -""" -input UniqueMetafieldValueInput @componentName(name: "content") { - """ - The key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - - """ - The value of the metafield. - """ - value: String! -} - -""" -The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). -""" -type UnitPriceMeasurement @componentName(name: "merchandising") { - """ - 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 input fields for the measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). -""" -input UnitPriceMeasurementInput @componentName(name: "merchandising") { - """ - 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 @componentName(name: "merchandising") { - """ - Unit of measurements representing areas. - """ - AREA - - """ - Unit of measurements representing counts. - """ - COUNT - - """ - Unit of measurements representing lengths. - """ - LENGTH - - """ - The type of measurement is unknown. Upgrade to the latest version of the API to resolve this type. - """ - UNKNOWN - - """ - Unit of measurements representing volumes. - """ - VOLUME - - """ - Unit of measurements representing weights. - """ - WEIGHT -} - -""" -The valid units of measurement for a unit price measurement. -""" -enum UnitPriceMeasurementMeasuredUnit @componentName(name: "merchandising") { - """ - 100 centiliters equals 1 liter. - """ - CL - - """ - 100 centimeters equals 1 meter. - """ - CM - - """ - Imperial system unit of volume (U.S. customary unit). - """ - FLOZ - - """ - 1 foot equals 12 inches. - """ - FT - - """ - Imperial system unit of area. - """ - FT2 - - """ - Metric system unit of weight. - """ - G - - """ - 1 gallon equals 128 fluid ounces (U.S. customary unit). - """ - GAL - - """ - Imperial system unit of length. - """ - IN - - """ - 1 item, a unit of count. - """ - ITEM - - """ - 1 kilogram equals 1000 grams. - """ - KG - - """ - Metric system unit of volume. - """ - L - - """ - Imperial system unit of weight. - """ - LB - - """ - Metric system unit of length. - """ - M - - """ - Metric system unit of area. - """ - M2 - - """ - 1 cubic meter equals 1000 liters. - """ - M3 - - """ - 1000 milligrams equals 1 gram. - """ - MG - - """ - 1000 milliliters equals 1 liter. - """ - ML - - """ - 1000 millimeters equals 1 meter. - """ - MM - - """ - 16 ounces equals 1 pound. - """ - OZ - - """ - 1 pint equals 16 fluid ounces (U.S. customary unit). - """ - PT - - """ - 1 quart equals 32 fluid ounces (U.S. customary unit). - """ - QT - - """ - The unit of measurement is unknown. Upgrade to the latest version of the API to resolve this unit. - """ - UNKNOWN - - """ - 1 yard equals 36 inches. - """ - YD -} - -""" -Systems of weights and measures. -""" -enum UnitSystem @componentName(name: "platform") { - """ - Imperial system of weights and measures. - """ - IMPERIAL_SYSTEM - - """ - Metric system of weights and measures. - """ - 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 @requiredAccess(scope: "`read_orders` access scope.") @componentName(name: "sales") { - """ - 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! -} - -""" -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 @requiredAccess(scope: "`read_returns` access scope or `read_marketplace_returns` access scope.") @componentName(name: "returns") { - """ - 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 total price of the unverified return line item. - """ - totalPrice: MoneyV2! - - """ - The unit price of the unverified return line item. - """ - unitPrice: MoneyV2! - - """ - The quantity that has't been processed. - """ - unprocessedQuantity: Int! -} - -""" -The input fields required to update a media object. -""" -input UpdateMediaInput @componentName(name: "merchandising") { - """ - The alt text associated to the media. - """ - alt: String - - """ - Specifies the media to update. - """ - id: ID! @gidTypes(types: ["Media"]) - - """ - The source from which to update the media preview image. May be an external URL or staged upload URL. - """ - previewImageSource: String -} - -""" -The URL redirect for the online store. -""" -type UrlRedirect implements Node @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { - """ - The ID of the URL redirect. - """ - id: ID! - - """ - The old path to be redirected from. When the user visits this path, they will be redirected to the target location. - """ - path: String! - - """ - The target location where the user will be redirected to. - """ - target: String! -} - -""" -Return type for `urlRedirectBulkDeleteAll` mutation. -""" -type UrlRedirectBulkDeleteAllPayload @componentName(name: "platform") { - """ - The asynchronous job removing the redirects. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `urlRedirectBulkDeleteByIds` mutation. -""" -type UrlRedirectBulkDeleteByIdsPayload @componentName(name: "platform") { - """ - The asynchronous job removing the redirects. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UrlRedirectBulkDeleteByIdsUserError!]! -} - -""" -An error that occurs during the execution of `UrlRedirectBulkDeleteByIds`. -""" -type UrlRedirectBulkDeleteByIdsUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: UrlRedirectBulkDeleteByIdsUserErrorCode - - """ - 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 `UrlRedirectBulkDeleteByIdsUserError`. -""" -enum UrlRedirectBulkDeleteByIdsUserErrorCode @componentName(name: "platform") { - """ - You must pass one or more [`URLRedirect`]( - https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect - ) object IDs. - """ - IDS_EMPTY -} - -""" -Return type for `urlRedirectBulkDeleteBySavedSearch` mutation. -""" -type UrlRedirectBulkDeleteBySavedSearchPayload @componentName(name: "platform") { - """ - The asynchronous job removing the redirects. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UrlRedirectBulkDeleteBySavedSearchUserError!]! -} - -""" -An error that occurs during the execution of `UrlRedirectBulkDeleteBySavedSearch`. -""" -type UrlRedirectBulkDeleteBySavedSearchUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: UrlRedirectBulkDeleteBySavedSearchUserErrorCode - - """ - 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 `UrlRedirectBulkDeleteBySavedSearchUserError`. -""" -enum UrlRedirectBulkDeleteBySavedSearchUserErrorCode @componentName(name: "platform") { - """ - The saved search's query cannot match all entries or be empty. - """ - INVALID_SAVED_SEARCH_QUERY - - """ - Saved search not found. - """ - SAVED_SEARCH_NOT_FOUND -} - -""" -Return type for `urlRedirectBulkDeleteBySearch` mutation. -""" -type UrlRedirectBulkDeleteBySearchPayload @componentName(name: "platform") { - """ - The asynchronous job removing the redirects. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UrlRedirectBulkDeleteBySearchUserError!]! -} - -""" -An error that occurs during the execution of `UrlRedirectBulkDeleteBySearch`. -""" -type UrlRedirectBulkDeleteBySearchUserError implements DisplayableError @componentName(name: "platform") { - """ - The error code. - """ - code: UrlRedirectBulkDeleteBySearchUserErrorCode - - """ - 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 `UrlRedirectBulkDeleteBySearchUserError`. -""" -enum UrlRedirectBulkDeleteBySearchUserErrorCode @componentName(name: "platform") { - """ - Invalid search string. - """ - INVALID_SEARCH_ARGUMENT -} - -""" -An auto-generated type for paginating through multiple UrlRedirects. -""" -type UrlRedirectConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [UrlRedirectEdge!]! - - """ - 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. - """ - nodes: [UrlRedirect!]! - - """ - 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 `urlRedirectCreate` mutation. -""" -type UrlRedirectCreatePayload @componentName(name: "platform") { - """ - The created redirect. - """ - urlRedirect: UrlRedirect - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UrlRedirectUserError!]! -} - -""" -Return type for `urlRedirectDelete` mutation. -""" -type UrlRedirectDeletePayload @componentName(name: "platform") { - """ - The ID of the deleted redirect. - """ - deletedUrlRedirectId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UrlRedirectUserError!]! -} - -""" -An auto-generated type which holds one UrlRedirect and a cursor during pagination. -""" -type UrlRedirectEdge @componentName(name: "online_store") { - """ - 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 UrlRedirectEdge. - """ - node: UrlRedirect! -} - -""" -Possible error codes that can be returned by `UrlRedirectUserError`. -""" -enum UrlRedirectErrorCode @componentName(name: "platform") { - """ - Redirect could not be created. - """ - CREATE_FAILED - - """ - Redirect could not be deleted. - """ - DELETE_FAILED - - """ - Redirect does not exist. - """ - DOES_NOT_EXIST - - """ - Redirect could not be updated. - """ - UPDATE_FAILED -} - -""" -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. - -For more information, see [`url-redirect`](https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect)s. -""" -type UrlRedirectImport implements Node @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { - """ - The number of rows in the file. - """ - count: Int - - """ - The number of redirects created from the import. - """ - createdCount: Int - - """ - The number of redirects that failed to be imported. - """ - failedCount: Int - - """ - Whether the import is finished. - """ - finished: Boolean! - - """ - The date and time when the import finished. - """ - finishedAt: DateTime - - """ - The ID of the `UrlRedirectImport` object. - """ - id: ID! - - """ - A list of up to three previews of the URL redirects to be imported. - """ - previewRedirects: [UrlRedirectImportPreview!]! - - """ - The number of redirects updated during the import. - """ - updatedCount: Int -} - -""" -Return type for `urlRedirectImportCreate` mutation. -""" -type UrlRedirectImportCreatePayload @componentName(name: "platform") { - """ - The created `URLRedirectImport` object. - """ - urlRedirectImport: UrlRedirectImport - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UrlRedirectImportUserError!]! -} - -""" -Possible error codes that can be returned by `UrlRedirectImportUserError`. -""" -enum UrlRedirectImportErrorCode @componentName(name: "platform") { - """ - The import has already completed. - """ - ALREADY_IMPORTED - - """ - CSV file does not exist at given URL. - """ - FILE_DOES_NOT_EXIST @deprecated(reason: "This error code is never returned") - - """ - The import is already in progress. - """ - IN_PROGRESS - - """ - URL redirect import not found. - """ - NOT_FOUND -} - -""" -A preview of a URL redirect import row. -""" -type UrlRedirectImportPreview @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { - """ - The old path to be redirected from. When the user visits this path, they will be redirected to the target location. - """ - path: String! - - """ - The target location where the user will be redirected to. - """ - target: String! -} - -""" -Return type for `urlRedirectImportSubmit` mutation. -""" -type UrlRedirectImportSubmitPayload @componentName(name: "platform") { - """ - The asynchronous job importing the redirects. - """ - job: Job - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UrlRedirectImportUserError!]! -} - -""" -Represents an error that happens during execution of a redirect import mutation. -""" -type UrlRedirectImportUserError implements DisplayableError @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { - """ - The error code. - """ - code: UrlRedirectImportErrorCode - - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -The input fields to create or update a URL redirect. -""" -input UrlRedirectInput @componentName(name: "online_store") { - """ - The old path to be redirected from. When the user visits this path, they will be redirected to the target location. - """ - path: String - - """ - The target location where the user will be redirected to. - """ - target: String -} - -""" -The set of valid sort keys for the UrlRedirect query. -""" -enum UrlRedirectSortKeys @componentName(name: "platform") { - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `path` value. - """ - PATH - - """ - 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 -} - -""" -Return type for `urlRedirectUpdate` mutation. -""" -type UrlRedirectUpdatePayload @componentName(name: "platform") { - """ - Returns the updated URL redirect. - """ - urlRedirect: UrlRedirect - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UrlRedirectUserError!]! -} - -""" -Represents an error that happens during execution of a redirect mutation. -""" -type UrlRedirectUserError implements DisplayableError @requiredAccess(scope: "`read_online_store_navigation` access scope.") @componentName(name: "online_store") { - """ - The error code. - """ - code: UrlRedirectErrorCode - - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - 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 @componentName(name: "platform") { - """ - The path to the input field that caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -Time between UTC time and a location's observed time, in the format `"+HH:MM"` or `"-HH:MM"`. - -Example value: `"-07:00"`. -""" -scalar UtcOffset - -""" -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 @requiredAccess(scope: "`read_validations` access scope.") @componentName(name: "checkouts") { - """ - Whether the validation should block on failures other than expected violations. - """ - blockOnFailure: Boolean! - - """ - Whether the validation is enabled on the merchant checkout. - """ - enabled: Boolean! - - """ - The error history on the most recent version of the validation function. - """ - errorHistory: FunctionsErrorHistory - - """ - Global ID for the validation. - """ - 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 key for the metafield. - """ - key: String! - - """ - The container the metafield belongs to. If omitted, the app-reserved namespace will be used. - """ - namespace: String - ): Metafield - - """ - List of metafield definitions. - """ - metafieldDefinitions( - """ - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - Filter metafield definitions by namespace. - """ - namespace: String - - """ - Filter by the definition's pinned status. - """ - pinnedStatus: MetafieldDefinitionPinnedStatus = ANY - - """ - A filter made up of terms, connectives, modifiers, and comparators. - | name | type | description | acceptable_values | default_value | example_use | - | ---- | ---- | ---- | ---- | ---- | ---- | - | default | string | Filter by a case-insensitive search of multiple fields - in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | - | 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` | - | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | - | key | string | Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) - field. | | | - `key:some-key` | - | namespace | string | Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) - field. | | | - `namespace:some-namespace` | - | 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` | - | 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` | - | 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` | - You can apply one or more filters to a query. Learn more about [Shopify API - search syntax](https://shopify.dev/api/usage/search-syntax). - """ - query: 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 - ): 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 elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - after: String - - """ - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). - """ - before: String - - """ - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - first: Int - - """ - List of keys of metafields in the format `namespace.key`, will be returned in the same format. - """ - keys: [String!] - - """ - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). - """ - last: Int - - """ - The metafield namespace to filter by. If omitted, all metafields are returned. - """ - namespace: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The metafields associated with the resource matching the supplied list of namespaces and keys. - """ - metafieldsByIdentifiers( - """ - The list of metafields to retrieve by namespace and key. - """ - identifiers: [HasMetafieldsIdentifier!]! - ): [Metafield]! - - """ - The Shopify Function implementing the validation. - """ - shopifyFunction: ShopifyFunction! - - """ - The merchant-facing validation name. - """ - title: String! -} - -""" -An auto-generated type for paginating through multiple Validations. -""" -type ValidationConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [ValidationEdge!]! - - """ - 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. - """ - nodes: [Validation!]! - - """ - 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 install a validation. -""" -input ValidationCreateInput @componentName(name: "checkouts") { - """ - Whether the validation should block on failures other than expected violations. - """ - blockOnFailure: Boolean = false - - """ - Whether the validation should be live on the merchant checkout. - """ - enable: Boolean = false - - """ - The function handle representing the extension to install. - """ - functionHandle: String - - """ - The function ID representing the extension to install. - """ - functionId: String @deprecated(reason: "Use `functionHandle` instead.") - - """ - Additional metafields to associate to the validation. - """ - metafields: [MetafieldInput!] = [] - - """ - The title of the validation. - """ - title: String -} - -""" -Return type for `validationCreate` mutation. -""" -type ValidationCreatePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ValidationUserError!]! - - """ - The created validation. - """ - validation: Validation -} - -""" -Return type for `validationDelete` mutation. -""" -type ValidationDeletePayload @componentName(name: "platform") { - """ - Returns the deleted validation ID. - """ - deletedId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ValidationUserError!]! -} - -""" -An auto-generated type which holds one Validation and a cursor during pagination. -""" -type ValidationEdge @componentName(name: "checkouts") { - """ - 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 ValidationEdge. - """ - node: Validation! -} - -""" -The set of valid sort keys for the Validation query. -""" -enum ValidationSortKeys @componentName(name: "platform") { - """ - Sort by the `id` value. - """ - ID -} - -""" -The input fields required to update a validation. -""" -input ValidationUpdateInput @componentName(name: "checkouts") { - """ - Whether the validation should block on failures other than expected violations. - """ - blockOnFailure: Boolean = false - - """ - Whether the validation should be live on the merchant checkout. - """ - enable: Boolean = false - - """ - Additional metafields to associate to the validation. - """ - metafields: [MetafieldInput!] = [] - - """ - The title of the validation. - """ - title: String -} - -""" -Return type for `validationUpdate` mutation. -""" -type ValidationUpdatePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ValidationUserError!]! - - """ - The updated validation. - """ - validation: Validation -} - -""" -An error that occurs during the execution of a validation mutation. -""" -type ValidationUserError implements DisplayableError @requiredAccess(scope: "`read_validations` access scope.") @componentName(name: "checkouts") { - """ - The error code. - """ - code: ValidationUserErrorCode - - """ - 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 `ValidationUserError`. -""" -enum ValidationUserErrorCode @componentName(name: "platform") { - """ - ApiPermission metafields can only be created or updated by the app owner. - """ - APP_NOT_AUTHORIZED - - """ - The input value is blank. - """ - BLANK - - """ - The metafield violates a capability restriction. - """ - CAPABILITY_VIOLATION - - """ - Shop must be on a Shopify Plus plan to activate functions from a custom app. - """ - CUSTOM_APP_FUNCTION_NOT_ELIGIBLE - - """ - Owner type can't be used in this mutation. - """ - DISALLOWED_OWNER_TYPE - - """ - Function does not implement the required interface for this cart & checkout validation. - """ - FUNCTION_DOES_NOT_IMPLEMENT - - """ - Function not found. - """ - FUNCTION_NOT_FOUND - - """ - Function is pending deletion. - """ - FUNCTION_PENDING_DELETION - - """ - The input value isn't included in the list. - """ - INCLUSION - - """ - An internal error occurred. - """ - INTERNAL_ERROR - - """ - The input value is invalid. - """ - INVALID - - """ - The type is invalid. - """ - INVALID_TYPE - - """ - The value is invalid for the metafield type or for the definition options. - """ - INVALID_VALUE - - """ - Cannot have more than 25 active validation functions. - """ - MAX_VALIDATIONS_ACTIVATED - - """ - 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 - - """ - Validation not found. - """ - NOT_FOUND - - """ - The input value needs to be blank. - """ - PRESENT - - """ - Only unlisted apps can be used for this cart & checkout validation. - """ - PUBLIC_APP_NOT_ALLOWED - - """ - The input value is already taken. - """ - TAKEN - - """ - The input value is too long. - """ - TOO_LONG - - """ - The input value is too short. - """ - TOO_SHORT - - """ - Unstructured reserved namespace. - """ - UNSTRUCTURED_RESERVED_NAMESPACE -} - -""" -The input fields required to create or modify a product variant's option value. -""" -input VariantOptionValueInput @componentName(name: "merchandising") { - """ - Specifies the product option value by ID. - """ - id: ID @gidTypes(types: ["ProductOptionValue"]) - - """ - Metafield value associated with an option. - """ - linkedMetafieldValue: String - - """ - Specifies the product option value by name. - """ - name: String - - """ - Specifies the product option by ID. - """ - optionId: ID @gidTypes(types: ["ProductOption"]) - - """ - Specifies the product option by name. - """ - optionName: String -} - -""" -Represents a credit card payment instrument. -""" -type VaultCreditCard @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - The billing address of the card. - """ - billingAddress: CustomerCreditCardBillingAddress - - """ - The brand for the card. - """ - brand: String! - - """ - Whether the card has been expired. - """ - expired: Boolean! - - """ - The expiry month of the card. - """ - expiryMonth: Int! - - """ - The expiry year of the card. - """ - expiryYear: Int! - - """ - The last four digits for the card. - """ - lastDigits: String! - - """ - The name of the card holder. - """ - name: String! @protectedField(subject: "customer", content: "name") -} - -""" -Represents a paypal billing agreement payment instrument. -""" -type VaultPaypalBillingAgreement @requiredAccess(scope: "`read_payment_mandate` access scope.") @componentName(name: "payments") @protectedObject(subject: "customer") { - """ - Whether the paypal billing agreement is inactive. - """ - inactive: Boolean! - - """ - The paypal account name. - """ - name: String! @protectedField(subject: "customer", content: "name") - - """ - The paypal account email address. - """ - paypalAccountEmail: String! @protectedField(subject: "customer", content: "email") -} - -""" -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 Vector3 @requiredAccess(scope: "`read_products` access scope.") @componentName(name: "merchandising") { - """ - The x coordinate of Vector3. - """ - x: Float! - - """ - The y coordinate of Vector3. - """ - y: Float! - - """ - The z coordinate of Vector3. - """ - z: Float! -} - -""" -Represents a Shopify hosted video. -""" -type Video implements File & Media & Node @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - 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! - - """ - 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). - """ - duration: Int - - """ - Any errors that have occurred on the file. - """ - fileErrors: [FileError!]! - - """ - The status of the file. - """ - fileStatus: FileStatus! - - """ - The video'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 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). - """ - originalSource: VideoSource - - """ - The preview image for the media. - """ - preview: MediaPreviewImage - - """ - 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). - """ - sources: [VideoSource!]! - - """ - Current status of the media. - """ - status: MediaStatus! - - """ - Status resulting from the latest update operation. See fileErrors for details. - """ - updateStatus: FileStatus - - """ - The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the file was last updated. - """ - updatedAt: DateTime! -} - -""" -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. - -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 VideoSource @requiredAccess(scope: "`read_products` access scope, `read_files` access scope, `read_themes` access scope, `read_orders` access scope, `read_draft_orders` access scope, `read_images` access scope or `read_quick_sale` access scope.") @componentName(name: "merchandising") { - """ - The video source's file size in bytes. - """ - fileSize: Int - - """ - The video source's file format extension. - """ - format: String! - - """ - The video source's height. - """ - height: Int! - - """ - The video source's MIME type. - """ - mimeType: String! - - """ - The video source's URL. - """ - url: String! - - """ - The video source's width. - """ - width: Int! -} - -""" -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 WebPixel implements Node @requiredAccess(scope: "`read_pixels` access scope.") @componentName(name: "merchant_marketing") { - """ - The current data sharing state of the pixel. - """ - dataSharingState: PixelDataSharingState! - - """ - A globally-unique ID. - """ - id: ID! - - """ - 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`. - """ - settings: JSON! -} - -""" -Return type for `webPixelCreate` mutation. -""" -type WebPixelCreatePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ErrorsWebPixelUserError!]! - - """ - The created web pixel settings. - """ - webPixel: WebPixel -} - -""" -Return type for `webPixelDelete` mutation. -""" -type WebPixelDeletePayload @componentName(name: "platform") { - """ - The ID of the web pixel settings that was deleted. - """ - deletedWebPixelId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ErrorsWebPixelUserError!]! -} - -""" -The input fields for creating or updating a web pixel. -""" -input WebPixelInput @componentName(name: "merchant_marketing") { - """ - 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`. - """ - settings: JSON! -} - -""" -Return type for `webPixelUpdate` mutation. -""" -type WebPixelUpdatePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [ErrorsWebPixelUserError!]! - - """ - The updated web pixel settings. - """ - webPixel: WebPixel -} - -""" -The input fields used to create a web presence. -""" -input WebPresenceCreateInput @componentName(name: "markets") { - """ - The alternate locales for the web presence. - """ - alternateLocales: [String!] - - """ - The default locale for the web presence. - """ - defaultLocale: String! - - """ - The web presence's domain ID. This field must be `null` if the `subfolderSuffix` isn't `null`. - """ - domainId: ID @gidTypes(types: ["Domain"]) - - """ - 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 `webPresenceCreate` mutation. -""" -type WebPresenceCreatePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MarketUserError!]! - - """ - The created web presence object. - """ - webPresence: MarketWebPresence -} - -""" -Return type for `webPresenceDelete` mutation. -""" -type WebPresenceDeletePayload @componentName(name: "platform") { - """ - The ID of the deleted web presence. - """ - deletedId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MarketUserError!]! -} - -""" -The input fields used to update a web presence. -""" -input WebPresenceUpdateInput @componentName(name: "markets") { - """ - The alternate locales for the web presence. - """ - alternateLocales: [String!] - - """ - The default locale for the web presence. - """ - defaultLocale: 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 subfolder suffix is not already defined for the web presence. - """ - subfolderSuffix: String -} - -""" -Return type for `webPresenceUpdate` mutation. -""" -type WebPresenceUpdatePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [MarketUserError!]! - - """ - The web presence object. - """ - webPresence: MarketWebPresence -} - -""" -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. - -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 @componentName(name: "apps") { - """ - The ARN of this EventBridge partner event source. - """ - 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 @componentName(name: "apps") { - """ - The URL to which the webhooks events are sent. - """ - 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 @componentName(name: "apps") { - """ - The Google Cloud Pub/Sub project ID. - """ - pubSubProject: String! - - """ - The Google Cloud Pub/Sub topic ID. - """ - pubSubTopic: String! -} - -""" -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 WebhookSubscription implements LegacyInteroperability & Node @componentName(name: "apps") { - """ - The Admin API version that Shopify uses to serialize webhook events. This - value is inherited from the app that created the webhook subscription. - """ - apiVersion: ApiVersion! - - """ - The destination URI to which the webhook subscription will send a message when an event occurs. - """ - callbackUrl: URL! @deprecated(reason: "Use `uri` instead.") - - """ - The date and time when the webhook subscription was created. - """ - createdAt: DateTime! - - """ - The endpoint to which the webhook subscription will send events. - """ - endpoint: WebhookSubscriptionEndpoint! @deprecated(reason: "Use `uri` instead.") - - """ - 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 format in which the webhook subscription should send the data. - """ - format: WebhookSubscriptionFormat! - - """ - A globally-unique ID. - """ - id: ID! - - """ - 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!]! - - """ - The ID of the corresponding resource in the REST Admin API. - """ - legacyResourceId: UnsignedInt64! - - """ - The list of namespaces for any metafields that should be included in the webhook subscription. - """ - metafieldNamespaces: [String!]! - - """ - The list of identifiers specifying metafields to include in the webhook subscription. - """ - metafields: [WebhookSubscriptionMetafieldIdentifier!]! - - """ - A human-readable name for the webhook subscription. - """ - name: String - - """ - 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. - """ - topic: WebhookSubscriptionTopic! - - """ - The date and time when the webhook subscription was updated. - """ - updatedAt: DateTime! - - """ - The URI to which the webhook subscription will send events. - """ - uri: String! -} - -""" -An auto-generated type for paginating through multiple WebhookSubscriptions. -""" -type WebhookSubscriptionConnection @componentName(name: "platform") { - """ - The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. - """ - edges: [WebhookSubscriptionEdge!]! - - """ - 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. - """ - nodes: [WebhookSubscription!]! - - """ - 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 `webhookSubscriptionCreate` mutation. -""" -type WebhookSubscriptionCreatePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! - - """ - The webhook subscription that was created. - """ - webhookSubscription: WebhookSubscription -} - -""" -Return type for `webhookSubscriptionDelete` mutation. -""" -type WebhookSubscriptionDeletePayload @componentName(name: "platform") { - """ - The ID of the deleted webhook subscription. - """ - deletedWebhookSubscriptionId: ID - - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -An auto-generated type which holds one WebhookSubscription and a cursor during pagination. -""" -type WebhookSubscriptionEdge @componentName(name: "apps") { - """ - 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 WebhookSubscriptionEdge. - """ - node: WebhookSubscription! -} - -""" -An endpoint to which webhook subscriptions send webhooks events. -""" -union WebhookSubscriptionEndpoint @componentName(name: "apps") = WebhookEventBridgeEndpoint | WebhookHttpEndpoint | WebhookPubSubEndpoint - -""" -The supported formats for webhook subscriptions. -""" -enum WebhookSubscriptionFormat @componentName(name: "apps") { - JSON - XML -} - -""" -The input fields for a webhook subscription. -""" -input WebhookSubscriptionInput @componentName(name: "apps") { - """ - URL where the webhook subscription should send the POST request when the event occurs. - """ - callbackUrl: URL @deprecated(reason: "Use `uri` instead.") - - """ - 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 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!] - - """ - 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!] - - """ - A human-readable name for the webhook subscription. - """ - name: String - - """ - 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. - """ - uri: String -} - -""" -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 @componentName(name: "apps") { - """ - 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 set of valid sort keys for the WebhookSubscription query. -""" -enum WebhookSubscriptionSortKeys @componentName(name: "platform") { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `id` value. - """ - ID -} - -""" -The supported topics for webhook subscriptions. You can use webhook subscriptions to receive -notifications about particular events in a shop. - -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 @componentName(name: "apps") { - """ - The webhook topic for `app_purchases_one_time/update` events. Occurs whenever a one-time app charge is updated. - """ - APP_PURCHASES_ONE_TIME_UPDATE - - """ - 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. - """ - APP_SCOPES_UPDATE - - """ - 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. - """ - APP_SUBSCRIPTIONS_APPROACHING_CAPPED_AMOUNT - - """ - The webhook topic for `app_subscriptions/update` events. Occurs whenever an app subscription is updated. - """ - APP_SUBSCRIPTIONS_UPDATE - - """ - The webhook topic for `app/uninstalled` events. Occurs whenever a shop has uninstalled the app. - """ - APP_UNINSTALLED - - """ - 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. - """ - ATTRIBUTED_SESSIONS_FIRST @privatelyDocumented - - """ - 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. - """ - ATTRIBUTED_SESSIONS_LAST @privatelyDocumented - - """ - 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. - """ - AUDIT_EVENTS_ADMIN_API_ACTIVITY - - """ - The webhook topic for `bulk_operations/finish` events. Notifies when a Bulk Operation finishes. - """ - BULK_OPERATIONS_FINISH - - """ - 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. - """ - CARTS_CREATE - - """ - 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. - """ - CARTS_UPDATE - - """ - The webhook topic for `channels/delete` events. Occurs whenever a channel is - deleted. Requires the `read_publications` scope. - """ - CHANNELS_DELETE - - """ - The webhook topic for `checkouts/create` events. Occurs whenever a checkout is created. Requires the `read_orders` scope. - """ - CHECKOUTS_CREATE - - """ - The webhook topic for `checkouts/delete` events. Occurs whenever a checkout is deleted. Requires the `read_orders` scope. - """ - CHECKOUTS_DELETE - - """ - The webhook topic for `checkouts/paid` events. Occurs whenever a checkout is paid. Requires the `read_orders` scope. - """ - CHECKOUTS_PAID - - """ - The webhook topic for `checkouts/update` events. Occurs whenever a checkout is updated. Requires the `read_orders` scope. - """ - CHECKOUTS_UPDATE - - """ - The webhook topic for `checkout_and_accounts_configurations/update` events. - The event occurs whenever a published checkout and account configuration is updated. - """ - CHECKOUT_AND_ACCOUNTS_CONFIGURATIONS_UPDATE @privatelyDocumented - - """ - The webhook topic for `collections/create` events. Occurs whenever a - collection is created. Requires the `read_products` scope. - """ - COLLECTIONS_CREATE - - """ - The webhook topic for `collections/delete` events. Occurs whenever a - collection is deleted. Requires the `read_products` scope. - """ - COLLECTIONS_DELETE - - """ - 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. - """ - COLLECTIONS_UPDATE - - """ - The webhook topic for `collection_listings/add` events. Occurs whenever a - collection listing is added. Requires the `read_product_listings` scope. - """ - COLLECTION_LISTINGS_ADD - - """ - The webhook topic for `collection_listings/remove` events. Occurs whenever a - collection listing is removed. Requires the `read_product_listings` scope. - """ - COLLECTION_LISTINGS_REMOVE - - """ - The webhook topic for `collection_listings/update` events. Occurs whenever a - collection listing is updated. Requires the `read_product_listings` scope. - """ - COLLECTION_LISTINGS_UPDATE - - """ - The webhook topic for `collection_publications/create` events. Occurs whenever - a collection publication listing is created. Requires the `read_publications` scope. - """ - COLLECTION_PUBLICATIONS_CREATE - - """ - The webhook topic for `collection_publications/delete` events. Occurs whenever - a collection publication listing is deleted. Requires the `read_publications` scope. - """ - COLLECTION_PUBLICATIONS_DELETE - - """ - The webhook topic for `collection_publications/update` events. Occurs whenever - a collection publication listing is updated. Requires the `read_publications` scope. - """ - COLLECTION_PUBLICATIONS_UPDATE - - """ - 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. - """ - COMPANIES_CREATE - - """ - 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. - """ - COMPANIES_DELETE - - """ - 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. - """ - COMPANIES_UPDATE - - """ - 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. - """ - COMPANY_CONTACTS_CREATE - - """ - 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. - """ - COMPANY_CONTACTS_DELETE - - """ - 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. - """ - COMPANY_CONTACTS_UPDATE - - """ - 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. - """ - COMPANY_CONTACT_ROLES_ASSIGN - - """ - 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. - """ - COMPANY_CONTACT_ROLES_REVOKE - - """ - 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. - """ - COMPANY_LOCATIONS_CREATE - - """ - 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. - """ - COMPANY_LOCATIONS_DELETE - - """ - 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. - """ - COMPANY_LOCATIONS_UPDATE - - """ - The webhook topic for `customers/create` events. Occurs whenever a customer is - created. Requires the `read_customers` scope. - """ - CUSTOMERS_CREATE - - """ - The webhook topic for `customers/delete` events. Occurs whenever a customer is - deleted. Requires the `read_customers` scope. - """ - CUSTOMERS_DELETE - - """ - The webhook topic for `customers/disable` events. Occurs whenever a customer - account is disabled. Requires the `read_customers` scope. - """ - CUSTOMERS_DISABLE - - """ - 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. - """ - CUSTOMERS_EMAIL_MARKETING_CONSENT_UPDATE - - """ - The webhook topic for `customers/enable` events. Occurs whenever a customer - account is enabled. Requires the `read_customers` scope. - """ - CUSTOMERS_ENABLE - - """ - The webhook topic for `customers_marketing_consent/update` events. Occurs - whenever a customer's SMS marketing consent is updated. Requires the - `read_customers` scope. - """ - CUSTOMERS_MARKETING_CONSENT_UPDATE - - """ - The webhook topic for `customers/merge` events. Triggers when two customers - are merged Requires the `read_customer_merge` scope. - """ - CUSTOMERS_MERGE - - """ - The webhook topic for `customers/purchasing_summary` events. Occurs when a - customer sales history change. Requires the `read_customers` scope. - """ - CUSTOMERS_PURCHASING_SUMMARY - - """ - The webhook topic for `customers/update` events. Occurs whenever a customer is - updated. Requires the `read_customers` scope. - """ - CUSTOMERS_UPDATE - - """ - The webhook topic for `customer_account_settings/update` events. Triggers when merchants change customer account setting. - """ - CUSTOMER_ACCOUNT_SETTINGS_UPDATE - - """ - The webhook topic for `customer_behavior_tracking_preferences/update` events. - Triggers when data sharing level is created or updated. - """ - CUSTOMER_BEHAVIOR_TRACKING_PREFERENCES_UPDATE @privatelyDocumented - - """ - The webhook topic for `customer_groups/create` events. Occurs whenever a - customer saved search is created. Requires the `read_customers` scope. - """ - CUSTOMER_GROUPS_CREATE - - """ - The webhook topic for `customer_groups/delete` events. Occurs whenever a - customer saved search is deleted. Requires the `read_customers` scope. - """ - CUSTOMER_GROUPS_DELETE - - """ - The webhook topic for `customer_groups/update` events. Occurs whenever a - customer saved search is updated. Requires the `read_customers` scope. - """ - CUSTOMER_GROUPS_UPDATE - - """ - The webhook topic for `customer.joined_segment` events. Triggers when a - customer joins a segment. Requires the `read_customers` scope. - """ - CUSTOMER_JOINED_SEGMENT - - """ - The webhook topic for `customer.left_segment` events. Triggers when a customer - leaves a segment. Requires the `read_customers` scope. - """ - CUSTOMER_LEFT_SEGMENT - - """ - The webhook topic for `customer_payment_methods/create` events. Occurs - whenever a customer payment method is created. Requires the - `read_customer_payment_methods` scope. - """ - CUSTOMER_PAYMENT_METHODS_CREATE - - """ - The webhook topic for `customer_payment_methods/revoke` events. Occurs - whenever a customer payment method is revoked. Requires the - `read_customer_payment_methods` scope. - """ - CUSTOMER_PAYMENT_METHODS_REVOKE - - """ - The webhook topic for `customer_payment_methods/update` events. Occurs - whenever a customer payment method is updated. Requires the - `read_customer_payment_methods` scope. - """ - CUSTOMER_PAYMENT_METHODS_UPDATE - - """ - The webhook topic for `customer.tags_added` events. Triggers when tags are - added to a customer. Requires the `read_customers` scope. - """ - CUSTOMER_TAGS_ADDED - - """ - The webhook topic for `customer.tags_removed` events. Triggers when tags are - removed from a customer. Requires the `read_customers` scope. - """ - CUSTOMER_TAGS_REMOVED - - """ - The webhook topic for `delivery_promise_settings/update` events. Occurs when a - promise setting is updated. Requires the `read_shipping` scope. - """ - DELIVERY_PROMISE_SETTINGS_UPDATE - - """ - The webhook topic for `discounts/create` events. Occurs whenever a discount is - created. Requires the `read_discounts` scope. - """ - DISCOUNTS_CREATE - - """ - The webhook topic for `discounts/delete` events. Occurs whenever a discount is - deleted. Requires the `read_discounts` scope. - """ - DISCOUNTS_DELETE - - """ - The webhook topic for `discounts/redeemcode_added` events. Occurs whenever a - redeem code is added to a code discount. Requires the `read_discounts` scope. - """ - DISCOUNTS_REDEEMCODE_ADDED - - """ - The webhook topic for `discounts/redeemcode_removed` events. Occurs whenever a - redeem code on a code discount is deleted. Requires the `read_discounts` scope. - """ - DISCOUNTS_REDEEMCODE_REMOVED - - """ - The webhook topic for `discounts/update` events. Occurs whenever a discount is - updated. Requires the `read_discounts` scope. - """ - DISCOUNTS_UPDATE - - """ - The webhook topic for `disputes/create` events. Occurs whenever a dispute is - created. Requires the `read_shopify_payments_disputes` scope. - """ - DISPUTES_CREATE - - """ - The webhook topic for `disputes/update` events. Occurs whenever a dispute is - updated. Requires the `read_shopify_payments_disputes` scope. - """ - DISPUTES_UPDATE - - """ - The webhook topic for `domains/create` events. Occurs whenever a domain is created. - """ - DOMAINS_CREATE - - """ - The webhook topic for `domains/destroy` events. Occurs whenever a domain is destroyed. - """ - DOMAINS_DESTROY - - """ - The webhook topic for `domains/update` events. Occurs whenever a domain is updated. - """ - DOMAINS_UPDATE - - """ - The webhook topic for `draft_orders/create` events. Occurs whenever a draft - order is created. Requires the `read_draft_orders` scope. - """ - DRAFT_ORDERS_CREATE - - """ - The webhook topic for `draft_orders/delete` events. Occurs whenever a draft - order is deleted. Requires the `read_draft_orders` scope. - """ - DRAFT_ORDERS_DELETE - - """ - The webhook topic for `draft_orders/update` events. Occurs whenever a draft - order is updated. Requires the `read_draft_orders` scope. - """ - DRAFT_ORDERS_UPDATE - - """ - 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. - """ - FINANCE_APP_STAFF_MEMBER_DELETE - - """ - 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. - """ - FINANCE_APP_STAFF_MEMBER_GRANT - - """ - 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. - """ - FINANCE_APP_STAFF_MEMBER_REVOKE - - """ - 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. - """ - FINANCE_APP_STAFF_MEMBER_UPDATE - - """ - 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. - """ - FINANCE_KYC_INFORMATION_UPDATE - - """ - 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. - """ - FULFILLMENTS_CREATE - - """ - 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. - """ - FULFILLMENTS_UPDATE - - """ - The webhook topic for `fulfillment_events/create` events. Occurs whenever a - fulfillment event is created. Requires the `read_fulfillments` scope. - """ - FULFILLMENT_EVENTS_CREATE - - """ - The webhook topic for `fulfillment_events/delete` events. Occurs whenever a - fulfillment event is deleted. Requires the `read_fulfillments` scope. - """ - FULFILLMENT_EVENTS_DELETE - - """ - 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. - """ - FULFILLMENT_HOLDS_ADDED - - """ - 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. - """ - FULFILLMENT_HOLDS_RELEASED - - """ - 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. - """ - FULFILLMENT_ORDERS_CANCELLATION_REQUEST_ACCEPTED - - """ - 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. - """ - FULFILLMENT_ORDERS_CANCELLATION_REQUEST_REJECTED - - """ - 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. - """ - FULFILLMENT_ORDERS_CANCELLATION_REQUEST_SUBMITTED - - """ - 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. - """ - FULFILLMENT_ORDERS_CANCELLED - - """ - 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. - """ - FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_ACCEPTED - - """ - 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. - """ - FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_REJECTED - - """ - 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. - """ - FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_SUBMITTED - - """ - 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. - """ - FULFILLMENT_ORDERS_FULFILLMENT_SERVICE_FAILED_TO_COMPLETE - - """ - 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. - """ - FULFILLMENT_ORDERS_HOLD_RELEASED - - """ - 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. - """ - FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_LOCAL_DELIVERY - - """ - 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. - """ - FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_PICKUP - - """ - The webhook topic for `fulfillment_orders/manually_reported_progress_stopped` - events. Occurs when a fulfillment order that has previously been manually - marked as in progress is marked back as open. Requires at least one of the - following scopes: read_merchant_managed_fulfillment_orders, - read_assigned_fulfillment_orders, read_third_party_fulfillment_orders. - """ - FULFILLMENT_ORDERS_MANUALLY_REPORTED_PROGRESS_STOPPED - - """ - 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. - """ - FULFILLMENT_ORDERS_MERGED - - """ - 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. - """ - FULFILLMENT_ORDERS_MOVED - - """ - 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. - """ - FULFILLMENT_ORDERS_ORDER_ROUTING_COMPLETE - - """ - 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. - """ - FULFILLMENT_ORDERS_PLACED_ON_HOLD - - """ - The webhook topic for `fulfillment_orders/progress_reported` events. Occurs - when progress is reported for 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. - """ - FULFILLMENT_ORDERS_PROGRESS_REPORTED - - """ - The webhook topic for `fulfillment_orders/ready_to_fulfill` events. - [Deprecated: subscribe to fulfillment_orders/order_routing_complete instead] - Occurs whenever a fulfillment order is ready to fulfill. Requires at least one - of the following scopes: read_merchant_managed_fulfillment_orders, - read_assigned_fulfillment_orders, read_third_party_fulfillment_orders. - """ - FULFILLMENT_ORDERS_READY_TO_FULFILL @privatelyDocumented - - """ - 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. - """ - FULFILLMENT_ORDERS_RESCHEDULED - - """ - 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. - """ - FULFILLMENT_ORDERS_SCHEDULED_FULFILLMENT_ORDER_READY - - """ - 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. - """ - FULFILLMENT_ORDERS_SPLIT - - """ - The webhook topic for `global_catalog/product_update` events. Occurs when a - product’s state changes on an agentic channel. Requires the - `read_publications` scope. - """ - GLOBAL_CATALOG_PRODUCT_UPDATE @privatelyDocumented - - """ - 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. - """ - INVENTORY_ITEMS_CREATE - - """ - 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. - """ - INVENTORY_ITEMS_DELETE - - """ - 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. - """ - INVENTORY_ITEMS_UPDATE - - """ - The webhook topic for `inventory_levels/connect` events. Occurs whenever an - inventory level is connected. Requires the `read_inventory` scope. - """ - INVENTORY_LEVELS_CONNECT - - """ - The webhook topic for `inventory_levels/disconnect` events. Occurs whenever an - inventory level is disconnected. Requires the `read_inventory` scope. - """ - INVENTORY_LEVELS_DISCONNECT - - """ - The webhook topic for `inventory_levels/update` events. Occurs whenever an - inventory level is updated. Requires the `read_inventory` scope. - """ - INVENTORY_LEVELS_UPDATE - - """ - The webhook topic for `inventory_shipments/add_items` events. Occurs whenever - items are added to a shipment. Requires the `read_inventory_shipments` scope. - """ - INVENTORY_SHIPMENTS_ADD_ITEMS - - """ - The webhook topic for `inventory_shipments/create` events. Triggers when a - shipment is created. Requires the `read_inventory_shipments` scope. - """ - INVENTORY_SHIPMENTS_CREATE - - """ - The webhook topic for `inventory_shipments/delete` events. Triggers when a - shipment is deleted. Requires the `read_inventory_shipments` scope. - """ - INVENTORY_SHIPMENTS_DELETE - - """ - 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. - """ - INVENTORY_SHIPMENTS_MARK_IN_TRANSIT - - """ - 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. - """ - INVENTORY_SHIPMENTS_RECEIVE_ITEMS - - """ - The webhook topic for `inventory_shipments/remove_items` events. Occurs - whenever items are removed from a shipment. Requires the - `read_inventory_shipments` scope. - """ - INVENTORY_SHIPMENTS_REMOVE_ITEMS - - """ - The webhook topic for `inventory_shipments/update_item_quantities` events. - Occurs whenever quantities change on a shipment. Requires the - `read_inventory_shipments` scope. - """ - INVENTORY_SHIPMENTS_UPDATE_ITEM_QUANTITIES - - """ - The webhook topic for `inventory_shipments/update_tracking` events. Triggers - when tracking info on a shipment is updated. Requires the - `read_inventory_shipments` scope. - """ - INVENTORY_SHIPMENTS_UPDATE_TRACKING - - """ - The webhook topic for `inventory_transfers/add_items` events. Occurs any time - items are added to a transfer. Requires the `read_inventory_transfers` scope. - """ - INVENTORY_TRANSFERS_ADD_ITEMS - - """ - The webhook topic for `inventory_transfers/cancel` events. Triggers when a - transfer is canceled. Requires the `read_inventory_transfers` scope. - """ - INVENTORY_TRANSFERS_CANCEL - - """ - The webhook topic for `inventory_transfers/complete` events. Triggers when a - transfer is completed. Requires the `read_inventory_transfers` scope. - """ - INVENTORY_TRANSFERS_COMPLETE - - """ - 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. - """ - INVENTORY_TRANSFERS_READY_TO_SHIP - - """ - The webhook topic for `inventory_transfers/remove_items` events. Occurs any - time items are removed from a transfer. Requires the - `read_inventory_transfers` scope. - """ - INVENTORY_TRANSFERS_REMOVE_ITEMS - - """ - 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. - """ - INVENTORY_TRANSFERS_UPDATE_ITEM_QUANTITIES - - """ - The webhook topic for `locales/create` events. Occurs whenever a shop locale is created Requires the `read_locales` scope. - """ - LOCALES_CREATE - - """ - The webhook topic for `locales/destroy` events. Occurs whenever a shop locale - is destroyed Requires the `read_locales` scope. - """ - LOCALES_DESTROY - - """ - The webhook topic for `locales/update` events. Occurs whenever a shop locale - is updated, such as published or unpublished Requires the `read_locales` scope. - """ - LOCALES_UPDATE - - """ - The webhook topic for `locations/activate` events. Occurs whenever a - deactivated location is re-activated. Requires the `read_locations` scope. - """ - LOCATIONS_ACTIVATE - - """ - The webhook topic for `locations/create` events. Occurs whenever a location is - created. Requires the `read_locations` scope. - """ - LOCATIONS_CREATE - - """ - The webhook topic for `locations/deactivate` events. Occurs whenever a - location is deactivated. Requires the `read_locations` scope. - """ - LOCATIONS_DEACTIVATE - - """ - The webhook topic for `locations/delete` events. Occurs whenever a location is - deleted. Requires the `read_locations` scope. - """ - LOCATIONS_DELETE - - """ - The webhook topic for `locations/update` events. Occurs whenever a location is - updated. Requires the `read_locations` scope. - """ - LOCATIONS_UPDATE - - """ - The webhook topic for `marketplace_payments_configurations/update` events. - Occurs when the ready status of a marketplace payments configuration feature - has been updated. Requires the `read_marketplace_payments_configurations` scope. - """ - MARKETPLACE_PAYMENTS_CONFIGURATIONS_UPDATE @privatelyDocumented - - """ - The webhook topic for `markets_backup_region/update` events. Occurs when a - backup region is updated. Requires the `read_markets` scope. - """ - MARKETS_BACKUP_REGION_UPDATE - - """ - The webhook topic for `markets/create` events. Occurs when a new market is created. Requires the `read_markets` scope. - """ - MARKETS_CREATE - - """ - The webhook topic for `markets/delete` events. Occurs when a market is deleted. Requires the `read_markets` scope. - """ - MARKETS_DELETE - - """ - The webhook topic for `markets/update` events. Occurs when a market is updated. Requires the `read_markets` scope. - """ - MARKETS_UPDATE - - """ - The webhook topic for `metafield_definitions/create` events. Occurs when a - metafield definition is created. Requires the `read_content` scope. - """ - METAFIELD_DEFINITIONS_CREATE - - """ - The webhook topic for `metafield_definitions/delete` events. Occurs when a - metafield definition is deleted. Requires the `read_content` scope. - """ - METAFIELD_DEFINITIONS_DELETE - - """ - The webhook topic for `metafield_definitions/update` events. Occurs when a - metafield definition is updated. Requires the `read_content` scope. - """ - METAFIELD_DEFINITIONS_UPDATE - - """ - The webhook topic for `metaobjects/create` events. Occurs when a metaobject is - created. Requires the `read_metaobjects` scope. - """ - METAOBJECTS_CREATE - - """ - The webhook topic for `metaobjects/delete` events. Occurs when a metaobject is - deleted. Requires the `read_metaobjects` scope. - """ - METAOBJECTS_DELETE - - """ - The webhook topic for `metaobjects/update` events. Occurs when a metaobject is - updated. Requires the `read_metaobjects` scope. - """ - METAOBJECTS_UPDATE - - """ - 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. - """ - ORDERS_CANCELLED - - """ - 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. - """ - ORDERS_CREATE - - """ - The webhook topic for `orders/delete` events. Occurs whenever an order is deleted. Requires the `read_orders` scope. - """ - ORDERS_DELETE - - """ - 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. - """ - ORDERS_EDITED - - """ - 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. - """ - ORDERS_FULFILLED - - """ - 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. - """ - ORDERS_LINK_REQUESTED - - """ - 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. - """ - ORDERS_PAID - - """ - 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. - """ - ORDERS_PARTIALLY_FULFILLED - - """ - 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. - """ - ORDERS_RISK_ASSESSMENT_CHANGED - - """ - 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. - """ - ORDERS_SHOPIFY_PROTECT_ELIGIBILITY_CHANGED - - """ - 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. - """ - ORDERS_UPDATED - - """ - 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. - """ - ORDER_TRANSACTIONS_CREATE - - """ - The webhook topic for `payment_schedules/due` events. Occurs whenever payment - schedules are due. Requires the `read_payment_terms` scope. - """ - PAYMENT_SCHEDULES_DUE - - """ - The webhook topic for `payment_terms/create` events. Occurs whenever payment - terms are created. Requires the `read_payment_terms` scope. - """ - PAYMENT_TERMS_CREATE - - """ - The webhook topic for `payment_terms/delete` events. Occurs whenever payment - terms are deleted. Requires the `read_payment_terms` scope. - """ - PAYMENT_TERMS_DELETE - - """ - The webhook topic for `payment_terms/update` events. Occurs whenever payment - terms are updated. Requires the `read_payment_terms` scope. - """ - PAYMENT_TERMS_UPDATE - - """ - The webhook topic for `products/create` events. Occurs whenever a product is created. Requires the `read_products` scope. - """ - PRODUCTS_CREATE - - """ - The webhook topic for `products/delete` events. Occurs whenever a product is deleted. Requires the `read_products` scope. - """ - PRODUCTS_DELETE - - """ - 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. - """ - PRODUCTS_UPDATE - - """ - The webhook topic for `product_feeds/create` events. Triggers when product - feed is created Requires the `read_product_listings` scope. - """ - PRODUCT_FEEDS_CREATE - - """ - 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. - """ - PRODUCT_FEEDS_FULL_SYNC - - """ - The webhook topic for `product_feeds/full_sync_finish` events. Triggers when a - full sync finishes Requires the `read_product_listings` scope. - """ - PRODUCT_FEEDS_FULL_SYNC_FINISH - - """ - 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. - """ - PRODUCT_FEEDS_INCREMENTAL_SYNC - - """ - The webhook topic for `product_feeds/incremental_update` events. Occurs - whenever a product or variant is changed Requires the `read_product_listings` scope. - """ - PRODUCT_FEEDS_INCREMENTAL_UPDATE @privatelyDocumented - - """ - The webhook topic for `product_feeds/update` events. Triggers when product - feed is updated Requires the `read_product_listings` scope. - """ - PRODUCT_FEEDS_UPDATE - - """ - The webhook topic for `product_listings/add` events. Occurs whenever an active - product is listed on a channel. Requires the `read_product_listings` scope. - """ - PRODUCT_LISTINGS_ADD - - """ - The webhook topic for `product_listings/remove` events. Occurs whenever a - product listing is removed from the channel. Requires the - `read_product_listings` scope. - """ - PRODUCT_LISTINGS_REMOVE - - """ - The webhook topic for `product_listings/update` events. Occurs whenever a - product publication is updated. Requires the `read_product_listings` scope. - """ - PRODUCT_LISTINGS_UPDATE - - """ - The webhook topic for `product_operations/finish` events. Triggers when a - product operation completes Requires the `read_products` scope. - """ - PRODUCT_OPERATIONS_FINISH - - """ - 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. - """ - PRODUCT_PUBLICATIONS_CREATE - - """ - 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. - """ - PRODUCT_PUBLICATIONS_DELETE - - """ - 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. - """ - PRODUCT_PUBLICATIONS_UPDATE - - """ - 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. - """ - PROFILES_CREATE - - """ - 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. - """ - PROFILES_DELETE - - """ - 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. - """ - PROFILES_UPDATE - - """ - The webhook topic for `publications/delete` events. Occurs whenever a - publication is deleted. Requires the `read_publications` scope. - """ - PUBLICATIONS_DELETE @privatelyDocumented - - """ - 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. - """ - REFUNDS_CREATE - - """ - 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. - """ - RETURNS_APPROVE - - """ - 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. - """ - RETURNS_CANCEL - - """ - 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. - """ - RETURNS_CLOSE - - """ - 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. - """ - RETURNS_DECLINE - - """ - 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. - """ - RETURNS_PROCESS - - """ - 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. - """ - RETURNS_REOPEN - - """ - 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. - """ - RETURNS_REQUEST - - """ - 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. - """ - RETURNS_UPDATE - - """ - 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. - """ - REVERSE_DELIVERIES_ATTACH_DELIVERABLE - - """ - 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. - """ - REVERSE_FULFILLMENT_ORDERS_DISPOSE - - """ - The webhook topic for `scheduled_product_listings/add` events. Occurs whenever - a product is scheduled to be published. Requires the `read_product_listings` scope. - """ - SCHEDULED_PRODUCT_LISTINGS_ADD - - """ - 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. - """ - SCHEDULED_PRODUCT_LISTINGS_REMOVE - - """ - The webhook topic for `scheduled_product_listings/update` events. Occurs - whenever a product's scheduled availability date changes. Requires the - `read_product_listings` scope. - """ - SCHEDULED_PRODUCT_LISTINGS_UPDATE - - """ - The webhook topic for `segments/create` events. Occurs whenever a segment is created. Requires the `read_customers` scope. - """ - SEGMENTS_CREATE - - """ - The webhook topic for `segments/delete` events. Occurs whenever a segment is deleted. Requires the `read_customers` scope. - """ - SEGMENTS_DELETE - - """ - The webhook topic for `segments/update` events. Occurs whenever a segment is updated. Requires the `read_customers` scope. - """ - SEGMENTS_UPDATE - - """ - The webhook topic for `selling_plan_groups/create` events. Notifies when a - SellingPlanGroup is created. Requires the `read_products` scope. - """ - SELLING_PLAN_GROUPS_CREATE - - """ - The webhook topic for `selling_plan_groups/delete` events. Notifies when a - SellingPlanGroup is deleted. Requires the `read_products` scope. - """ - SELLING_PLAN_GROUPS_DELETE - - """ - The webhook topic for `selling_plan_groups/update` events. Notifies when a - SellingPlanGroup is updated. Requires the `read_products` scope. - """ - SELLING_PLAN_GROUPS_UPDATE - - """ - The webhook topic for `shipping_addresses/create` events. Occurs whenever a - shipping address is created. Requires the `read_shipping` scope. - """ - SHIPPING_ADDRESSES_CREATE - - """ - The webhook topic for `shipping_addresses/update` events. Occurs whenever a - shipping address is updated. Requires the `read_shipping` scope. - """ - SHIPPING_ADDRESSES_UPDATE - - """ - The webhook topic for `shop/update` events. Occurs whenever a shop is updated. - """ - SHOP_UPDATE - - """ - 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. - """ - SUBSCRIPTION_BILLING_ATTEMPTS_CHALLENGED - - """ - The webhook topic for `subscription_billing_attempts/failure` events. Occurs - whenever a subscription billing attempt fails. Requires the - `read_own_subscription_contracts` scope. - """ - SUBSCRIPTION_BILLING_ATTEMPTS_FAILURE - - """ - The webhook topic for `subscription_billing_attempts/success` events. Occurs - whenever a subscription billing attempt succeeds. Requires the - `read_own_subscription_contracts` scope. - """ - SUBSCRIPTION_BILLING_ATTEMPTS_SUCCESS - - """ - 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. - """ - SUBSCRIPTION_BILLING_CYCLES_SKIP - - """ - 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. - """ - SUBSCRIPTION_BILLING_CYCLES_UNSKIP - - """ - 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. - """ - SUBSCRIPTION_BILLING_CYCLE_EDITS_CREATE - - """ - 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. - """ - SUBSCRIPTION_BILLING_CYCLE_EDITS_DELETE - - """ - 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. - """ - SUBSCRIPTION_BILLING_CYCLE_EDITS_UPDATE - - """ - The webhook topic for `subscription_contracts/activate` events. Occurs when a - subscription contract is activated. Requires the - `read_own_subscription_contracts` scope. - """ - SUBSCRIPTION_CONTRACTS_ACTIVATE - - """ - The webhook topic for `subscription_contracts/cancel` events. Occurs when a - subscription contract is canceled. Requires the - `read_own_subscription_contracts` scope. - """ - SUBSCRIPTION_CONTRACTS_CANCEL - - """ - The webhook topic for `subscription_contracts/create` events. Occurs whenever - a subscription contract is created. Requires the - `read_own_subscription_contracts` scope. - """ - SUBSCRIPTION_CONTRACTS_CREATE - - """ - The webhook topic for `subscription_contracts/expire` events. Occurs when a - subscription contract expires. Requires the `read_own_subscription_contracts` scope. - """ - SUBSCRIPTION_CONTRACTS_EXPIRE - - """ - The webhook topic for `subscription_contracts/fail` events. Occurs when a - subscription contract is failed. Requires the - `read_own_subscription_contracts` scope. - """ - SUBSCRIPTION_CONTRACTS_FAIL - - """ - The webhook topic for `subscription_contracts/pause` events. Occurs when a - subscription contract is paused. Requires the - `read_own_subscription_contracts` scope. - """ - SUBSCRIPTION_CONTRACTS_PAUSE - - """ - The webhook topic for `subscription_contracts/update` events. Occurs whenever - a subscription contract is updated. Requires the - `read_own_subscription_contracts` scope. - """ - SUBSCRIPTION_CONTRACTS_UPDATE - - """ - The webhook topic for `tax_partners/update` events. Occurs whenever a tax - partner is created or updated. Requires the `read_taxes` scope. - """ - TAX_PARTNERS_UPDATE @privatelyDocumented - - """ - The webhook topic for `tax_services/create` events. Occurs whenever a tax - service is created. Requires the `read_taxes` scope. - """ - TAX_SERVICES_CREATE - - """ - The webhook topic for `tax_services/update` events. Occurs whenver a tax - service is updated. Requires the `read_taxes` scope. - """ - TAX_SERVICES_UPDATE - - """ - 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. - """ - TAX_SUMMARIES_CREATE @privatelyDocumented - - """ - The webhook topic for `tender_transactions/create` events. Occurs when a - tender transaction is created. Requires the `read_orders` scope. - """ - TENDER_TRANSACTIONS_CREATE - - """ - 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. - """ - THEMES_CREATE - - """ - 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. - """ - THEMES_DELETE - - """ - 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. - """ - THEMES_PUBLISH - - """ - 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. - """ - THEMES_UPDATE - - """ - The webhook topic for `translatable_content/create` events. Occurs whenever a - resource that has translatable content is created. A webhook per created - translatable field in the resource will be triggered. Requires the - `read_translations` scope. - """ - TRANSLATABLE_CONTENT_CREATE @privatelyDocumented - - """ - The webhook topic for `translatable_content/update` events. Occurs whenever a - resource that has translatable content is updated. A webhook per updated - translatable field in the resource will be triggered. Requires the - `read_translations` scope. - """ - TRANSLATABLE_CONTENT_UPDATE @privatelyDocumented - - """ - 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. - """ - VARIANTS_IN_STOCK - - """ - 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. - """ - VARIANTS_OUT_OF_STOCK -} - -""" -Return type for `webhookSubscriptionUpdate` mutation. -""" -type WebhookSubscriptionUpdatePayload @componentName(name: "platform") { - """ - The list of errors that occurred from executing the mutation. - """ - userErrors: [UserError!]! - - """ - The webhook subscription that was updated. - """ - webhookSubscription: WebhookSubscription -} - -""" -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. -""" -type Weight @componentName(name: "platform") { - """ - The unit of measurement for `value`. - """ - unit: WeightUnit! - - """ - The weight value using the unit system specified with `unit`. - """ - value: Float! -} - -""" -The input fields for the weight unit and value inputs. -""" -input WeightInput @componentName(name: "platform") { - """ - Unit of measurement for `value`. - """ - unit: WeightUnit! - - """ - The weight value using the unit system specified with `weight_unit`. - """ - value: Float! -} - -""" -Units of measurement for weight. -""" -enum WeightUnit @componentName(name: "platform") { - """ - Metric system unit of mass. - """ - GRAMS - - """ - 1 kilogram equals 1000 grams. - """ - KILOGRAMS - - """ - Imperial system unit of mass. - """ - OUNCES - - """ - 1 pound equals 16 ounces. - """ - POUNDS -} diff --git a/packages/store/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql b/packages/store/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql deleted file mode 100644 index 4adda2ab68a..00000000000 --- a/packages/store/src/cli/api/graphql/business-platform-destinations/destinations_schema.graphql +++ /dev/null @@ -1,691 +0,0 @@ -enum AccountStatus { - """ - Account is active on the destination - """ - ACTIVE - - """ - Account is pending on the destination - """ - PENDING - - """ - Account is suspended on the destination - """ - SUSPENDED -} - -type Category { - """ - Destinations in this category. - """ - destinations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): DestinationConnection! - - """ - The category name. - """ - name: String! -} - -enum CategoryHandle { - """ - Administration category such as: Apps, Billing, Staff, ... - """ - ADMINISTRATION - - """ - Sections category. Other sections in an organization. - """ - SECTIONS - - """ - Stores category such as a Shopify store. - """ - STORES - - """ - Tools category such as: Flow, Customer support, ... - """ - TOOLS -} - -type Destination { - """ - Account's status on the destination. - """ - accountStatus: AccountStatus - - """ - Child destinations associated with this destination. - """ - children( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - status: DestinationStatus - ): DestinationConnection - - """ - Destination handle - """ - handle: String - - """ - For organization destinations, whether it has a developer dashboard link. - """ - hasDevDashboardLink: Boolean! - - """ - For organization destinations, whether it has a partner dashboard link. - """ - hasPartnerDashboardLink: Boolean! - - """ - Destination Icon. - """ - icon: Icon - - """ - Destination global identifier. - """ - id: DestinationID! - - """ - Shops destination is an app development store. - """ - isAppDevelopment: Boolean - - """ - Destination is able to be deactivated by the user. - """ - isDeactivatable: Boolean - - """ - Destination last access timestamp. - """ - lastAccess: ISO8601DateTime - - """ - Destination name. - """ - name: String! - - """ - For shop destinations, the name of the parent organization. Null for non-shop destinations. - """ - parentDestinationName: String - - """ - Primary domain of the destination. - """ - primaryDomain: String - - """ - Destination public identifier. - """ - publicId: DestinationPublicID! - - """ - Shops destination short name. - """ - shortName: String - - """ - Destination status. - """ - status: DestinationStatus! - - """ - Destination type. - """ - type: DestinationType! - - """ - Web destination address. - """ - webUrl: String! -} - -""" -The connection type for Destination. -""" -type DestinationConnection { - """ - A list of edges. - """ - edges: [DestinationEdge!]! - - """ - A list of nodes. - """ - nodes: [Destination!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type DestinationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Destination! -} - -scalar DestinationID - -scalar DestinationPublicID - -enum DestinationStatus { - ACTIVE - INACTIVE -} - -enum DestinationType { - """ - App destination. - """ - APP - - """ - Organization destination. - """ - ORGANIZATION - - """ - Shop destination. - """ - SHOP -} - -""" -Result payload for fetching an optional checkout identity token. -""" -type FetchOptionalCheckoutIdentityTokenResult { - """ - The checkout identity token if retrieval was successful. - """ - identityToken: String -} - -scalar GlobalID - -""" -An ISO 8601-encoded datetime -""" -scalar ISO8601DateTime @specifiedBy(url: "https://tools.ietf.org/html/rfc3339") - -type Icon { - """ - Icon text. - """ - altText: String - - """ - Icon asset name. - """ - asset: String - - """ - Icon url. - """ - url: String -} - -type Mutation { - """ - Fetches a checkout identity token for optional billing integrations. - """ - fetchOptionalCheckoutIdentityToken: FetchOptionalCheckoutIdentityTokenResult! - - """ - Updates the timestamp of most recently accessed store or organization - """ - updateStoreAccessTimestamp(updateDestinationAccessTimeInput: UpdateDestinationAccessTimeInput!): Boolean! -} - -interface Node { - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! -} - -type Organization implements Node { - """ - Whether or not the user can unlock new plus tools. - """ - canUnlockPlusTools: Boolean! - - """ - Destination categories. - """ - categories( - """ - Destination category set. - """ - handles: [CategoryHandle!] = [STORES, TOOLS, ADMINISTRATION, SECTIONS] - ): [Category!] - - """ - Returns true/false values indicating if each flag is enabled for the organization. - """ - enabledFlags( - """ - The hashed handles of the flags to check. - """ - flagHandles: [String!]! - ): [Boolean!]! - - """ - The ID for an object. - """ - id: GlobalID! - - """ - Organization name. - """ - name: String! - queryComplexity: Int! - queryDepth: Int! - - """ - Returns number of shops in the organization. - """ - shopCount: Int - - """ - Organization status. - """ - status: OrganizationStatus! - - """ - Denotes if this is a test Organization - """ - testOrganization: Boolean! - - """ - Organization address. - """ - url: String! -} - -""" -The connection type for Organization. -""" -type OrganizationConnection { - """ - A list of edges. - """ - edges: [OrganizationEdge!]! - - """ - A list of nodes. - """ - nodes: [Organization!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type OrganizationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Organization! -} - -""" -The ID for a Organization. -""" -scalar OrganizationID - -enum OrganizationStatus { - """ - Organization is active. - """ - ACTIVE - - """ - Organization is locked. - """ - LOCKED -} - -type OrphanDestination { - """ - Destination categories. - """ - categories( - """ - Destination category set. - """ - handles: [CategoryHandle!] = [STORES] - ): [Category!] -} - -""" -Information about pagination in a connection. -""" -type PageInfo { - """ - When paginating forwards, the cursor to continue. - """ - endCursor: String - - """ - When paginating forwards, are there more items? - """ - hasNextPage: Boolean! - - """ - When paginating backwards, are there more items? - """ - hasPreviousPage: Boolean! - - """ - When paginating backwards, the cursor to continue. - """ - startCursor: String -} - -type Query { - """ - Returns the current user account. - """ - currentUserAccount( - """ - The identity UUID of the account. - """ - uuid: ID - ): UserAccount - - """ - Returns a specific account by identity uuid. - """ - loadTesting( - """ - The identity UUID of the account. - """ - uuid: ID! - ): UserAccount - - """ - Returns a specific user account by identity uuid. - """ - userAccount( - """ - The identity UUID of the account. - """ - uuid: ID! - ): UserAccount -} - -enum RestrictedDestinations { - APPS_CLI - DEVELOPER_DASHBOARD -} - -input UpdateDestinationAccessTimeInput { - """ - Destination public identifier. - """ - destinationPublicId: DestinationPublicID! -} - -type UserAccount { - """ - Specific destination associated with the account. - """ - destination(id: DestinationPublicID!): Destination - - """ - Destinations associated with an account. - """ - destinations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Search for destinations by name and uri. - """ - search: String - - """ - Only return flat shop destinations. - """ - shopsOnly: Boolean - - """ - Filter destinations by status. If not provided, defaults to active. - """ - status: DestinationStatus = ACTIVE - ): DestinationConnection! - - """ - User account's email address. - """ - email: String! - - """ - Returns true/false values indicating if each flag is enabled for the current user. - """ - enabledUserFlags( - """ - The hashed handles of the flags to check. - """ - flagHandles: [String!]! - ): [Boolean!]! - - """ - Whether the user has at least one active store. - """ - hasActiveStores: Boolean! - - """ - Whether the user has at least one store. - """ - hasAnyStores: Boolean! - - """ - Whether the user has inactive stores. - """ - hasInactiveStores: Boolean! - - """ - The last destination the user accessed. - """ - lastAccessedDestination: Destination - - """ - Specific group associated with the account. - """ - organization( - """ - The remote ID of the organization to look up. - """ - id: OrganizationID! - ): Organization - - """ - Group associated with the destination. - """ - organizationForDestination( - """ - The public ID of the destination to look up the organization for. - """ - destinationPublicId: DestinationPublicID! - ): Organization - - """ - Organizations associated with an account. - """ - organizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - hasAccessToDestination: RestrictedDestinations - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationConnection! - - """ - Organizations associated with an account for which the user has store create permission. - """ - organizationsForStoreCreationInSignup( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationConnection! - - """ - Organizations associated with an account for which the user has access to the destination. - """ - organizationsWithAccessToDestination( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - destination: RestrictedDestinations! - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationConnection! - - """ - Destinations that do not belong to any organization. - """ - orphanDestinations: OrphanDestination! - - """ - Returns the most recently accessed stores for the signup screen, mixing active and inactive. - """ - recentStoresForSignup( - """ - Maximum number of stores to return (1-10, default 4). - """ - limit: Int = 4 - ): [Destination!]! - - """ - User account's identity UUID. - """ - uuid: ID! -} diff --git a/packages/store/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql b/packages/store/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql deleted file mode 100644 index 889f619ecbf..00000000000 --- a/packages/store/src/cli/api/graphql/business-platform-organizations/organizations_schema.graphql +++ /dev/null @@ -1,19059 +0,0 @@ -""" -Requires that exactly one field must be supplied and that field must not be `null`. -""" -directive @oneOf on INPUT_OBJECT - -type AccessActionAudit implements Node { - action: String! - actorName: String! - - """ - The date of the audit event. - """ - date: ISO8601DateTime! - - """ - Action audit details for the organization. - """ - details( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ActionAuditDetailConnection! - event: String! - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! - subjectType: String! -} - -""" -The connection type for AccessActionAudit. -""" -type AccessActionAuditConnection { - """ - A list of edges. - """ - edges: [AccessActionAuditEdge!]! - - """ - A list of nodes. - """ - nodes: [AccessActionAudit!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type AccessActionAuditEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: AccessActionAudit! -} - -type AccessAggregatedRoleAssignment { - role: AccessRole! - shopsCount: Int - targetType: AccessRoleAssignmentTarget! - userGroup: Group -} - -""" -The connection type for AccessAggregatedRoleAssignment. -""" -type AccessAggregatedRoleAssignmentConnection { - """ - A list of edges. - """ - edges: [AccessAggregatedRoleAssignmentEdge!]! - - """ - A list of nodes. - """ - nodes: [AccessAggregatedRoleAssignment!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type AccessAggregatedRoleAssignmentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: AccessAggregatedRoleAssignment! -} - -enum AccessLevel { - ALLOW - APPROVAL_REQUIRED - DENY -} - -input AccessOrganizationOwnerChangeInput { - """ - The email of new organization owner. - """ - email: String! -} - -type AccessOrganizationOwnerChangeResult { - """ - New organization owner. - """ - newOrganizationOwner: OrganizationUser - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -The result of enabling RBAC for a Partner organization. -""" -type AccessPartnersMigrationEnableRbacResult { - success: Boolean - userErrors: [UserError!] -} - -""" -The result of migrating Partners users to Business Platform RBAC. -""" -type AccessPartnersMigrationMigrateUsersResult { - success: Boolean - userErrors: [UserError!] -} - -type AccessPointOfSaleAccess { - """ - Indicates whether the role grants access to Point of Sale. - """ - hasPosAccess: Boolean! - - """ - Indicates whether the role grants access to initialize new Point of Sale devices. - """ - initializePos: Boolean! -} - -input AccessPointOfSaleAccessInput { - """ - Indicates whether the role grants access to Point of Sale. - """ - hasPosAccess: Boolean - - """ - Indicates whether the role grants access to initialize new Point of Sale device. - """ - initializePos: Boolean -} - -enum AccessRecordPermissionAccessLevel { - ALLOW - DENY -} - -type AccessRole implements Node { - accessConditions: [String!] - - """ - Returns a list of assignable shops for the role. - """ - assignableShops( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - assignee: AccessRoleAssignee! - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - ): AssignableShopConnection! - category: AccessRoleCategory! - description: String - - """ - The ID for an object. - """ - id: GlobalID! - name: String! - permissions: [AccessRolePermission!]! - pointOfSaleAccess: AccessPointOfSaleAccess - queryComplexity: Int! - queryDepth: Int! - - """ - Returns a list of record permissions in the role. - """ - recordPermissions( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AccessRoleRecordPermissionConnection! - roleType: AccessRoleType! - systemRoleHandle: String - usersCount: Int -} - -scalar AccessRoleAssignee - -enum AccessRoleAssignmentAssignee { - """ - An organization user. - """ - ORGANIZATION_USER - - """ - A group. - """ - USER_GROUP -} - -enum AccessRoleAssignmentRole { - """ - A point of sale role. - """ - POINT_OF_SALE - - """ - A store role. - """ - STORE -} - -enum AccessRoleAssignmentTarget { - ALL_COLLABORATOR_STORES - ALL_OWNED_STORES - ALL_STORES - INDIVIDUAL_COLLABORATOR_STORE - INDIVIDUAL_STORES - ORGANIZATION -} - -enum AccessRoleCategory { - ORGANIZATION - PARTNER - POINT_OF_SALE - STORE -} - -""" -The connection type for AccessRole. -""" -type AccessRoleConnection { - """ - A list of edges. - """ - edges: [AccessRoleEdge!]! - - """ - A list of nodes. - """ - nodes: [AccessRole!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -input AccessRoleCreateInput { - """ - The conditions of the access condition. - """ - accessConditions: [String!] - - """ - The category of the role. - """ - category: AccessRoleCategory! - - """ - The description of the role. - """ - description: String - - """ - The name of the role. - """ - name: String! - - """ - Granular permissions in a role. - """ - permissions: [AccessRolePermissionInput!]! - - """ - Point of Sale Access. - """ - pointOfSaleAccess: AccessPointOfSaleAccessInput - - """ - Record permissions in a role. - """ - recordPermissions: [AccessRoleRecordId!] -} - -type AccessRoleCreateResult { - """ - The created role. - """ - role: AccessRole - - """ - Indicates whether the creation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input AccessRoleDeleteInput { - """ - The ID of the Role to delete. - """ - id: AccessRoleID! -} - -type AccessRoleDeleteResult { - """ - The deleted role id. - """ - deletedId: AccessRoleID - - """ - Indicates whether the deletion was successful. - """ - success: Boolean - - """ - List of user errors of role delete operation. - """ - userErrors: [UserError!] -} - -input AccessRoleDuplicateInput { - """ - The custom name for the duplicated Role. - """ - customRoleName: String - - """ - The ID of the Role to duplicated. - """ - roleId: AccessRoleID! -} - -type AccessRoleDuplicateResult { - """ - The newly created duplicate role. - """ - role: AccessRole - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -An edge in a connection. -""" -type AccessRoleEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: AccessRole! -} - -""" -Field options for filtering roles queries. -""" -enum AccessRoleFilterField { - """ - The category of a role. - """ - CATEGORY - - """ - The ID of a role. - """ - ID -} - -""" -Operators for filtering roles queries. -""" -enum AccessRoleFilterOperator { - """ - Equals operator. - """ - EQUALS - - """ - In operator. - """ - IN - - """ - Not equals operator. - """ - NOT_EQUALS -} - -""" -The ID for a AccessRole. -""" -scalar AccessRoleID - -type AccessRolePermission implements Node { - """ - Access level granted for the handle. - """ - accessLevel: AccessLevel! - - """ - The handle of the permission. - """ - handle: String! - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! -} - -input AccessRolePermissionInput { - """ - Access level granted for the handle. - """ - accessLevel: AccessLevel! - - """ - The handle of the permission. - """ - handle: String! -} - -union AccessRoleRecord = ShopApp - -scalar AccessRoleRecordId - -type AccessRoleRecordPermission { - """ - The record itself. - """ - record: AccessRoleRecord! - - """ - Identifier for the record - """ - recordId: ID! -} - -""" -The connection type for AccessRoleRecordPermission. -""" -type AccessRoleRecordPermissionConnection { - """ - A list of edges. - """ - edges: [AccessRoleRecordPermissionEdge!]! - - """ - A list of nodes. - """ - nodes: [AccessRoleRecordPermission!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type AccessRoleRecordPermissionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: AccessRoleRecordPermission! -} - -input AccessRoleRecordPermissionInput { - """ - Represents whether a record access is allowed or denied. - """ - accessLevel: AccessRecordPermissionAccessLevel! - - """ - Global Id of the record associated with the permission. - """ - recordId: AccessRoleRecordId! -} - -enum AccessRoleType { - CUSTOM - SYSTEM -} - -input AccessRoleUpdateInput { - """ - The conditions of the access condition. - """ - accessConditions: [String!] - - """ - The description of the Role. - """ - description: String - - """ - The ID of the Role to update. - """ - id: AccessRoleID! - - """ - The name of the Role. - """ - name: String - - """ - Granular permissions modified for the role. - """ - permissionsToUpdate: [AccessRolePermissionInput!] - - """ - Access to Point of Sale. - """ - pointOfSaleAccess: AccessPointOfSaleAccessInput - - """ - Record permissions the were updated for the role. - """ - recordPermissionsToUpdate: [AccessRoleRecordPermissionInput!] -} - -type AccessRoleUpdateResult { - """ - The updated role. - """ - role: AccessRole - - """ - Indicates whether the update was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input AccessRolesDeleteInput { - """ - The IDs of the Roles to delete. - """ - ids: [AccessRoleID!]! -} - -input AccessStoreOwnerChangeInput { - """ - The email of new store owner. - """ - email: String! - - """ - The ID of the store. - """ - shopifyShopId: ShopifyShopID! -} - -type AccessStoreOwnerChangeResult { - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type AccessSummary { - """ - A summary of the permissions for a user or group. - """ - permissionsSummary(shopifyShopId: PropertyPublicID): PermissionsSummary - - """ - A summary of current store access for the user (legacy or RBAC). - """ - storeAccessSummary: StoreAccessSummary -} - -enum AccountTypeOfUser { - IDENTITY - LEGACY - PIN - SAML - SCIM -} - -type ActionAuditDetail implements Node { - event: String! - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! - subjectType: String! -} - -""" -The connection type for ActionAuditDetail. -""" -type ActionAuditDetailConnection { - """ - A list of edges. - """ - edges: [ActionAuditDetailEdge!]! - - """ - A list of nodes. - """ - nodes: [ActionAuditDetail!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type ActionAuditDetailEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ActionAuditDetail! -} - -""" -Field options for filtering action audit queries. -""" -enum ActionAuditFilterField { - """ - The created at timestamp of the action audit. - """ - CREATED_AT - - """ - The subject of the action audit. - """ - SUBJECT -} - -""" -Represents a single filter option for action audit queries. -""" -input ActionAuditFilterInput { - field: ActionAuditFilterField! - operator: ActionAuditFilterOperator! - value: String! -} - -""" -Operators for filtering action audit queries. -""" -enum ActionAuditFilterOperator { - """ - Equals operator. - """ - EQUALS - - """ - Greater than operator. - """ - GREATER_THAN - - """ - Less than operator. - """ - LESS_THAN -} - -""" -The ID for a ActionAudit. -""" -scalar ActionAuditID - -input AddRoleInput { - """ - List of administrative permissions. - """ - administrativePermissions: [String!] - - """ - The name of the role. - """ - name: String! - - """ - List of shop accesses. - """ - shopAccess: [ShopAccessInput!] -} - -type AddRoleResult { - """ - The added role. - """ - role: Role - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type Address implements Node { - addressLine1: String - addressLine2: String - addressVariants: [AddressVariant!] - city: String - countryCode: CountryCode! - - """ - The ID for an object. - """ - id: GlobalID! - postalCode: String - queryComplexity: Int! - queryDepth: Int! - region: String - stateOrProvince: String - town: String -} - -""" -The connection type for Address. -""" -type AddressConnection { - """ - A list of edges. - """ - edges: [AddressEdge!]! - - """ - A list of nodes. - """ - nodes: [Address!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type AddressEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Address! -} - -""" -The ID for a Address. -""" -scalar AddressID - -input AddressInput { - """ - The first line of the address. Typically the street address or PO Box number. - """ - addressLine1: String - - """ - The second line of the address. Typically the number of the apartment, suite, or unit. - """ - addressLine2: String - - """ - The address variants. - """ - addressVariants: [AddressVariantInput!] - - """ - The name of the city, district, village, or town. - """ - city: String - - """ - The two-letter code for the country of the address. - """ - countryCode: CountryCode! - - """ - The zip or postal code of the address. - """ - postalCode: String - - """ - The code for the region of the address. - """ - stateOrProvince: String -} - -type AddressVariant { - """ - The first line of the address variant - """ - addressLine1: String - - """ - The second line of the address variant - """ - addressLine2: String - - """ - The city of the address variant - """ - city: String - - """ - The country code of the address variant - """ - countryCode: String - - """ - The postal code of the address variant - """ - postalCode: String - - """ - The region of the address variant - """ - region: String - - """ - The state or province of the address variant - """ - stateOrProvince: String - - """ - The town of the address variant - """ - town: String - - """ - The type of address variant (e.g., 'kanji', 'kana', 'formal') - """ - variantType: String! -} - -input AddressVariantInput { - """ - The first line of the address variant - """ - addressLine1: String - - """ - The second line of the address variant - """ - addressLine2: String - - """ - The city of the address variant - """ - city: String - - """ - The country code of the address variant - """ - countryCode: String - - """ - The postal code of the address variant - """ - postalCode: String - - """ - The region of the address variant - """ - region: String - - """ - The state or province of the address variant - """ - stateOrProvince: String - - """ - The type of address variant - """ - variantType: AlphabetType! -} - -type AdminBrowserSession { - """ - The date of the admin browser session. - """ - date: ISO8601Date - - """ - The IP address of the browser session. - """ - ipAddress: String - - """ - The location the browser session originated from. - """ - ipLocation: String - - """ - The name of the ISP the session originated from. - """ - ispName: String - - """ - The user agent of the browser. - """ - userAgent: String -} - -enum AlphabetType { - KANA - KANJI -} - -""" -The type of entity that metadata applies to -""" -enum ApplicableEntityType { - """ - Applies to legal entities/businesses - """ - LEGAL_ENTITY - - """ - Applies to individual persons/principals - """ - PERSON -} - -input AssignOrCreateAddressInput { - """ - The first line of the address. Typically the street address or PO Box number. - """ - addressLine1: String - - """ - The second line of the address. Typically the number of the apartment, suite, or unit. - """ - addressLine2: String - - """ - The address variants. - """ - addressVariants: [AddressVariantInput!] - - """ - The name of the city, district, village, or town. - """ - city: String - - """ - The two-letter code for the country of the address. - """ - countryCode: CountryCode! - - """ - The id of the address to assign or create. - """ - id: AddressID - - """ - The zip or postal code of the address. - """ - postalCode: String - - """ - The code for the region of the address. - """ - stateOrProvince: String -} - -input AssignPartnerOrganizationOwnerInput { - """ - Whether the OrganizationUser should be assigned as organization owner (admin). - """ - admin: Boolean! - - """ - The organization user to assign as owner. - """ - organizationUserId: OrganizationUserID! - - """ - The organization user making the request. - """ - requesterOrganizationUserId: OrganizationUserID -} - -type AssignPartnerOrganizationOwnerResult { - """ - The ID of the organization user assigned as owner. - """ - organizationUserId: OrganizationUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type AssignablePointOfSalePermissions { - """ - All assignable point of sale permissions. - """ - allPermissions: [String!]! - - """ - All assignable ternary point of sale permissions. Will be a subset of all_permissions - """ - ternaryPermissions: [String!]! -} - -type AssignableShop { - assigned: Boolean! - shop: Shop! -} - -""" -The connection type for AssignableShop. -""" -type AssignableShopConnection { - """ - A list of edges. - """ - edges: [AssignableShopEdge!]! - - """ - A list of nodes. - """ - nodes: [AssignableShop!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type AssignableShopEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: AssignableShop! -} - -enum Attachment { - BACK - FRONT - PAGE -} - -""" -An attestation recorded against an organization-scoped resource. -""" -type Attestation { - """ - True when the attestation has not been revoked, superseded, or expired. - """ - active: Boolean! - - """ - Canonical GID of the resource the attestation is about. - """ - attestableGid: String! - - """ - Handle of the attestation type recorded. - """ - attestationTypeHandle: AttestationTypeHandle! - - """ - The time at which the attestation was recorded. - """ - attestedAt: ISO8601DateTime! - - """ - Domain-specific payload captured at attestation time (e.g. declared UBOs). - """ - attestedData: JSON - - """ - The time at which the attestation expires, if any. - """ - expiresAt: ISO8601DateTime - id: AttestationID! - - """ - Auxiliary metadata persisted with the attestation (e.g. ip_address, user_agent). - """ - metadata: JSON - - """ - Supporting documents linked to this attestation as evidence. - """ - supportingDocuments: [SupportingDocument!]! -} - -""" -The connection type for Attestation. -""" -type AttestationConnection { - """ - A list of edges. - """ - edges: [AttestationEdge!]! - - """ - A list of nodes. - """ - nodes: [Attestation!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type AttestationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Attestation! -} - -""" -The ID for a Attestation. -""" -scalar AttestationID - -""" -The handle of an attestation type from the catalog. -""" -enum AttestationTypeHandle { - """ - Confirms that the listed directors are accurate and complete. - """ - DIRECTORSHIP_DECLARATION - - """ - Confirms that the listed beneficial owners (UBOs) are accurate and complete. - """ - OWNERSHIP_DECLARATION -} - -type AuthorizedApplication { - """ - The number of active authorizations for the user using the app. - """ - accessCount: Int! - - """ - The GID of the app. - """ - appId: ID! - - """ - The date of the user's last access using the app. - """ - lastAccess: ISO8601DateTime! - - """ - The name of the app. - """ - title: String! -} - -input BackfillPartnerOrganizationsShopPropertiesInput { - """ - The type of the backfill event. - """ - backfillType: PartnerOrganizationsShopPropertiesBackfill! - - """ - The id of the partner organization that owns/owned the shop. - """ - organizationId: OrganizationID! - - """ - The id of the shop has/had a relationship with the partner organization. - """ - shopifyShopId: ShopifyShopID! -} - -type BackfillPartnerOrganizationsShopPropertiesResult { - """ - The ID of the re-assigned property. - """ - propertyId: PropertyID - - """ - The ID of the new property transfer request. - """ - transferRequestId: PropertyTransferRequestID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input BackfillPartnerUserInput { - """ - If the user should be deleted (for use in backfilling) - """ - isDeleted: Boolean - - """ - The ID of the Partner organization. - """ - organizationId: OrganizationID! - - """ - Identity UUID of the user. - """ - userIdentityUuid: String! -} - -type BackfillPartnerUserResult { - """ - The ID of the updated organization user. - """ - organizationUserId: OrganizationUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type BillingAccount implements PropertyInterface { - """ - Property public identifier. - """ - externalId: PropertyPublicID - - """ - Property global identifier. - """ - id: PropertyId! - - """ - The offering for this property. - """ - offering: Offering - - """ - The organization this property belongs to. - """ - organization: Organization - queryComplexity: Int! - queryDepth: Int! -} - -input BulkAssignRoleInput { - """ - The IDs of the Organization Users who are assigned a Role. - """ - organizationUserIds: [OrganizationUserID!]! - - """ - The ID of the Role to assign. - """ - roleId: RoleID! -} - -type BulkAssignRoleResult { - """ - The organization user ids with the updated role. - """ - organizationUserIds: [OrganizationUserID!] - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type BulkData implements Node { - """ - The ID for an object. - """ - id: GlobalID! - operation(id: BulkDataOperationID!): BulkDataOperation - queryComplexity: Int! - queryDepth: Int! -} - -type BulkDataOperation implements Node { - """ - The ID for an object. - """ - id: GlobalID! - operationType: BulkDataOperationType! - queryComplexity: Int! - queryDepth: Int! - sourceStore: Shop - status: BulkDataOperationStatus! - storeOperations: [BulkDataStoreOperation!]! - targetStore: Shop -} - -""" -The ID for a BulkDataOperation. -""" -scalar BulkDataOperationID - -enum BulkDataOperationStatus { - COMPLETED - CREATED - FAILED - RUNNING -} - -enum BulkDataOperationType { - STORE_COPY - STORE_EXPORT - STORE_IMPORT -} - -input BulkDataResourceConfigsCustomIdInput { - key: String! - namespace: String! -} - -input BulkDataResourceConfigsInput { - products: BulkDataResourceConfigsProductsConfigInput -} - -input BulkDataResourceConfigsProductsConfigInput { - identifier: BulkDataResourceConfigsProductsIdentifierInput! -} - -enum BulkDataResourceConfigsProductsField { - HANDLE - ID -} - -input BulkDataResourceConfigsProductsIdentifierInput @oneOf { - customId: BulkDataResourceConfigsCustomIdInput - field: BulkDataResourceConfigsProductsField -} - -input BulkDataStoreCopyStartInput { - resourceConfigs: BulkDataResourceConfigsInput - sourceStoreIdentifier: StoreIdentifierInput! - targetStoreIdentifier: StoreIdentifierInput! -} - -type BulkDataStoreCopyStartResult { - """ - The operation to track progress of the store copy. - """ - operation: BulkDataOperation - - """ - Indicates whether the creation was successful. - """ - success: Boolean! - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input BulkDataStoreExportStartInput { - sourceStoreIdentifier: StoreIdentifierInput! -} - -type BulkDataStoreExportStartResult { - """ - The operation to track progress of the store export. - """ - operation: BulkDataOperation - - """ - Indicates whether the creation was successful. - """ - success: Boolean! - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input BulkDataStoreImportStartInput { - importUrl: String! - resourceConfigs: BulkDataResourceConfigsInput - targetStoreIdentifier: StoreIdentifierInput! -} - -type BulkDataStoreImportStartResult { - """ - The operation to track progress of the store import. - """ - operation: BulkDataOperation - - """ - Indicates whether the creation was successful. - """ - success: Boolean! - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type BulkDataStoreOperation implements Node { - completedObjectCount: Int! - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! - remoteOperationStatus: String! - remoteOperationType: String! - store: Shop! - totalObjectCount: Int! - url: String -} - -input BusinessPrincipalInput { - """ - The equity ownership percentage associated with the principal. - """ - equityOwnership: Float - - """ - The job title associated with the principal. - """ - jobTitle: String - - """ - The roles associated with the principal. - """ - roles: [PrincipalRoleTypeEnum!] -} - -""" -The ID for a BusinessUser. -""" -scalar BusinessUserID - -""" -The ID for a BusinessUsersImport. -""" -scalar BusinessUsersImportID - -""" -A business users import run. -""" -type BusinessUsersImportRun implements Node { - """ - When the import record was created. - """ - createdAt: ISO8601DateTime! - - """ - Whether the CSV passed validation. - """ - csvValid: Boolean - - """ - Number of rows that failed to import. - """ - failed: Int - - """ - When processing finished. - """ - finishedAt: ISO8601DateTime - - """ - The ID for an object. - """ - id: GlobalID! - - """ - Number of successfully imported rows. - """ - imported: Int - - """ - The original filename of the uploaded CSV. - """ - originalFilename: String - queryComplexity: Int! - queryDepth: Int! - - """ - Structured per-row results with status and error details. Available once the import has finished. - """ - rowResults: [ImportRowResult!] - - """ - Total number of rows in the CSV. - """ - rows: Int - - """ - Number of rows that were skipped. - """ - skipped: Int - - """ - When processing started. - """ - startedAt: ISO8601DateTime - - """ - The current status of the import. - """ - status: BusinessUsersImportStatus! - - """ - When the import was submitted. - """ - submittedAt: ISO8601DateTime -} - -""" -The connection type for BusinessUsersImportRun. -""" -type BusinessUsersImportRunConnection { - """ - A list of edges. - """ - edges: [BusinessUsersImportRunEdge!]! - - """ - A list of nodes. - """ - nodes: [BusinessUsersImportRun!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type BusinessUsersImportRunEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: BusinessUsersImportRun! -} - -""" -The status of a business users import. -""" -enum BusinessUsersImportStatus { - """ - Import finished successfully - """ - COMPLETED - - """ - Import finished with some row failures - """ - COMPLETED_WITH_FAILURES - - """ - Import failed due to invalid CSV or unexpected error - """ - FAILED - - """ - Import record created, not yet submitted - """ - PENDING - - """ - Import is actively running - """ - PROCESSING - - """ - CSV uploaded, waiting for processing - """ - SUBMITTED -} - -input CancelShopTransferInput { - """ - The ID of the shop to cancel a pending transfer on. - """ - shopifyShopId: PropertyPublicID! -} - -type CancelShopTransferResult { - """ - The shop property which had a pending tranfer request. - """ - property: PropertyInterface - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -enum Category { - BUSINESS - INDIVIDUAL - UNSPECIFIED -} - -input ChangeDomainEnforcementStateInput { - """ - The IDs of the domains to change enforcement state. - """ - domainIds: [OrganizationDomainID!]! - - """ - The enforcement state the domains are changing to. - """ - enforcementState: OrganizationDomainStatus! -} - -type ChangeDomainEnforcementStateResult { - """ - The organization with the changed domains enforcement states. - """ - organization: Organization - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -A client transfer request for a shop. -""" -type ClientTransferRequest implements Node { - """ - When the transfer request was created. - """ - createdAt: ISO8601DateTime! - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! - - """ - The current status of the transfer request. - """ - status: ClientTransferRequestStatus! - - """ - The organization the shop is being transferred to. - """ - targetOrganization: OrganizationReference -} - -""" -The status of a client transfer request. -""" -enum ClientTransferRequestStatus { - CANCELLED - COMPLETED - EXPIRED - PENDING - REJECTED -} - -""" -TrustedToRequestCollaboration decision result for the current viewer. -""" -type CollaborationEligibility { - """ - Signed IDV challenge URL when status is `REQUIRED` or `PENDING`. Null otherwise. - """ - challengeUrl: URL - - """ - Whether IDV is required before requesting collaboration. - """ - status: CollaborationEligibilityStatus! -} - -""" -IDV gate state for requesting collaboration. See TrustedToRequestCollaboration. -""" -enum CollaborationEligibilityStatus { - """ - TrustBattery was unreachable; the operation failed open. Clients should treat as `NOT_REQUIRED`. - """ - ERROR - - """ - No IDV required. - """ - NOT_REQUIRED - - """ - IDV is processing or under appeal. No user action required. - """ - PENDING - - """ - IDV must be completed before requesting collaboration. - """ - REQUIRED - - """ - IDV completed. - """ - VERIFIED -} - -input CollaboratorAcceptInput { - """ - The role to be created and assigned to the collaborator. - """ - newRole: AccessRoleCreateInput - - """ - The ID of the user to assign the role to. - """ - organizationUserId: OrganizationUserID - - """ - The IDs of the existing roles to assign to the collaborator. - """ - roleIds: [AccessRoleID!]! -} - -type CollaboratorAcceptResult { - organizationUser: OrganizationUserInterface - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type CollaboratorAccessRequirements { - """ - The collaborator access code for the shop. - """ - accessCode: String - - """ - Whether collaborator access code is enabled. - """ - accessCodeEnabled: Boolean! - - """ - Whether partner apps are installed on the shop. - """ - hasPartnerApps: Boolean! - - """ - Whether collaborator access code is required. - """ - requiresAccessCode: Boolean! -} - -enum CollaboratorAccessStatus { - """ - The users access is pending. - """ - ACCESS_PENDING - - """ - The user is active. - """ - ACTIVE - - """ - The users access has expired. - """ - EXPIRED - - """ - The users access is inactive. - """ - INACTIVE -} - -type CollaboratorPermissionResult { - """ - Whether the user has the requested collaborator permission. True if - authorized, false if denied, null if the result is inconclusive. - """ - hasPermission: Boolean -} - -type CollaboratorRelationship implements Node { - """ - The date and time when this collaborator relationship was approved. - """ - approvedAt: ISO8601DateTime - - """ - The date and time when this collaborator relationship was created. - """ - createdAt: ISO8601DateTime! - - """ - The ID for an object. - """ - id: GlobalID! - - """ - The date and time when this collaborator relationship was last re-requested. - """ - lastRerequestAt: ISO8601DateTime - - """ - The organization user ID associated with this collaborator relationship. - """ - organizationUserId: OrganizationUserID - queryComplexity: Int! - queryDepth: Int! - - """ - The shop this collaborator relationship is associated with. - """ - shop: Shop - - """ - The Shopify collaborator user ID (GID) for this collaborator relationship. - """ - shopifyCollaboratorUserId: String - - """ - The status of this collaborator relationship. - """ - status: CollaboratorAccessStatus! -} - -""" -A summary of collaborator relationship access for the user. -""" -type CollaboratorRelationshipAccessSummary { - """ - Shop ids of shops the user has collaborator relationship access to. - """ - shopifyShopIds: [ShopifyShopID!] -} - -""" -The connection type for Shop. -""" -type ConnectedShopsConnection { - """ - A list of edges. - """ - edges: [ShopEdge!]! - - """ - A list of nodes. - """ - nodes: [Shop!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - Total count of active shops connected to this legal entity as reported by QueryEngine. Snapshot data may be stale. - """ - totalCount: Int -} - -input ConvertUsersFromSamlInput { - """ - The IDs of the Organization users to convert from SAML. - """ - organizationUserIds: [OrganizationUserID!]! -} - -type ConvertUsersFromSamlResult { - """ - The organization that was updated. - """ - organization: Organization! - - """ - List of user errors from removing SAML access. - """ - userErrors: [UserError!] -} - -input ConvertUsersToSamlInput { - """ - IDs of the users to convert to SAML. - """ - organizationUserIds: [OrganizationUserID!]! -} - -type ConvertUsersToSamlResult { - """ - The organization object. - """ - organization: Organization - - """ - List of user errors for convert users to saml operation. - """ - userErrors: [UserError!] -} - -enum CountryCode { - AC - AD - AE - AF - AG - AI - AL - AM - AO - AR - AT - AU - AW - AX - AZ - BA - BB - BD - BE - BF - BG - BH - BI - BJ - BL - BM - BN - BO - BQ - BR - BS - BT - BV - BW - BY - BZ - CA - CC - CD - CF - CG - CH - CI - CK - CL - CM - CN - CO - CR - CU - CV - CW - CX - CY - CZ - DE - DJ - DK - DM - DO - DZ - EC - EE - EG - EH - ER - ES - ET - FI - FJ - FK - FO - FR - GA - GB - GD - GE - GF - GG - GH - GI - GL - GM - GN - GP - GQ - GR - GS - GT - GW - GY - HK - HM - HN - HR - HT - HU - ID - IE - IL - IM - IN - IO - IQ - IR - IS - IT - JE - JM - JO - JP - KE - KG - KH - KI - KM - KN - KP - KR - KW - KY - KZ - LA - LB - LC - LI - LK - LR - LS - LT - LU - LV - LY - MA - MC - MD - ME - MF - MG - MK - ML - MM - MN - MO - MQ - MR - MS - MT - MU - MV - MW - MX - MY - MZ - NA - NC - NE - NF - NG - NI - NL - NO - NP - NR - NU - NZ - OM - PA - PE - PF - PG - PH - PK - PL - PM - PN - PS - PT - PY - QA - RE - RO - RS - RU - RW - SA - SB - SC - SD - SE - SG - SH - SI - SJ - SK - SL - SM - SN - SO - SR - SS - ST - SV - SX - SY - SZ - TA - TC - TD - TF - TG - TH - TJ - TK - TL - TM - TN - TO - TR - TT - TV - TW - TZ - UA - UG - UM - US - UY - UZ - VA - VC - VE - VG - VN - VU - WF - WS - XK - YE - YT - ZA - ZM - ZW -} - -enum CountryCodeWithDefault { - AC - AD - AE - AF - AG - AI - AL - AM - AO - AR - AT - AU - AW - AX - AZ - BA - BB - BD - BE - BF - BG - BH - BI - BJ - BL - BM - BN - BO - BQ - BR - BS - BT - BV - BW - BY - BZ - CA - CC - CD - CF - CG - CH - CI - CK - CL - CM - CN - CO - CR - CU - CV - CW - CX - CY - CZ - DE - - """ - The default fallback country code. - """ - DEFAULT - DJ - DK - DM - DO - DZ - EC - EE - EG - EH - ER - ES - ET - FI - FJ - FK - FO - FR - GA - GB - GD - GE - GF - GG - GH - GI - GL - GM - GN - GP - GQ - GR - GS - GT - GW - GY - HK - HM - HN - HR - HT - HU - ID - IE - IL - IM - IN - IO - IQ - IR - IS - IT - JE - JM - JO - JP - KE - KG - KH - KI - KM - KN - KP - KR - KW - KY - KZ - LA - LB - LC - LI - LK - LR - LS - LT - LU - LV - LY - MA - MC - MD - ME - MF - MG - MK - ML - MM - MN - MO - MQ - MR - MS - MT - MU - MV - MW - MX - MY - MZ - NA - NC - NE - NF - NG - NI - NL - NO - NP - NR - NU - NZ - OM - PA - PE - PF - PG - PH - PK - PL - PM - PN - PS - PT - PY - QA - RE - RO - RS - RU - RW - SA - SB - SC - SD - SE - SG - SH - SI - SJ - SK - SL - SM - SN - SO - SR - SS - ST - SV - SX - SY - SZ - TA - TC - TD - TF - TG - TH - TJ - TK - TL - TM - TN - TO - TR - TT - TV - TW - TZ - UA - UG - UM - US - UY - UZ - VA - VC - VE - VG - VN - VU - WF - WS - XK - YE - YT - ZA - ZM - ZW -} - -type CreateAppDevelopmentStoreResult { - shopAdminUrl: String - shopDomain: String - - """ - The ID of the newly created shop in Shopify. - """ - shopifyShopId: ID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Input for creating an attestation against an organization-scoped resource. -""" -input CreateAttestationInput { - """ - Canonical GID of the resource being attested (e.g. gid://organization/LegalEntity/123). - """ - attestableGid: String! - - """ - Handle of the attestation type being recorded. - """ - attestationTypeHandle: AttestationTypeHandle! - - """ - Domain-specific payload captured at attestation time (e.g. declared UBOs). Must be a JSON object. - """ - attestedData: JSON - - """ - Identity UUID of the attester. - """ - attesterIdentityUuid: String! - - """ - Auxiliary metadata (e.g. ipAddress, userAgent). Only supported keys are persisted. - """ - metadata: JSON - - """ - IDs of pre-staged supporting documents to link to this attestation as evidence. - """ - supportingDocumentIds: [SupportingDocumentID!] -} - -""" -Result of the createAttestation mutation. -""" -type CreateAttestationResult { - """ - The persisted attestation, or null when the mutation failed. - """ - attestation: Attestation - - """ - Errors encountered while attempting to create the attestation. - """ - userErrors: [UserError!]! -} - -input CreateCliTokenOrganizationUserInput { - """ - The ID of the organization. - """ - organizationId: OrganizationID! - - """ - Handle of the system role to assign (e.g. 'automated_app_development'). - """ - roleHandle: String! - - """ - Email address of the service account. - """ - userEmail: String! - - """ - Identity UUID of the service account. - """ - userIdentityUuid: String! -} - -type CreateCliTokenOrganizationUserResult { - """ - The ID of the created organization user. - """ - organizationUserId: OrganizationUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type CreateClientDevelopmentShopResult { - shopAdminUrl: String - shopDomain: String - shopId: ID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input CreateCollaboratorRelationshipInput { - """ - Whether the collaborator relationship request required an access code. - """ - accessCodeRequired: Boolean - - """ - The UTC datetime the collaborator relationship was approved. - """ - approvedAt: ISO8601DateTime - - """ - The UTC datetime the collaborator relationship ended. - """ - endedAt: ISO8601DateTime - - """ - The ID of the organization the collaborator relationship belongs to. - """ - organizationId: OrganizationID! - - """ - The UTC datetime the collaborator relationship was rejected. - """ - rejectedAt: ISO8601DateTime - - """ - The ID of the shop associated with the collaborator relationship. - """ - shopifyShopId: PropertyPublicID! - - """ - The ID of the shop user associated with the collaborator relationship. - """ - shopifyUserId: ID! - - """ - The UTC datetime the collaborator relationship started. - """ - startedAt: ISO8601DateTime -} - -type CreateCollaboratorRelationshipResult { - """ - The collaborator relationship that was created. - """ - collaboratorRelationship: CollaboratorRelationship - - """ - Errors that occurred while creating the collaborator relationship. - """ - userErrors: [UserError!] -} - -input CreateGovernmentIdentifierForLegalEntityInput { - """ - The country code of the GovernmentIdentifier. - """ - countryCode: CountryCode! - - """ - The type of the GovernmentIdentifier. - """ - identifierType: GovernmentIdentifierTypeInput! - - """ - The legal entity to create the government identifier for. - """ - legalEntityId: LegalEntityID! - - """ - The value of the GovernmentIdentifier. - """ - value: String! -} - -input CreateGovernmentIdentifierInput { - """ - The country code of the GovernmentIdentifier. - """ - countryCode: CountryCode! - - """ - The entity to create the government identifier for. - """ - entityId: SupportedEntityId! - - """ - The type of the GovernmentIdentifier. - """ - identifierType: GovernmentIdentifierTypeInput! - - """ - The value of the GovernmentIdentifier. - """ - value: String! -} - -input CreateLegalEntityInput { - """ - The address of the entity. - """ - address: AddressInput - - """ - The category of the entity. - """ - category: ValidLegalEntityCategoryInput! - - """ - The country where the entity is registered. - """ - countryCode: CountryCode! - - """ - The individual when the entity is not registered. - """ - individual: IndividualInput - - """ - Whether the entity is registered. - """ - isRegistered: Boolean - - """ - The specific type of legal entity. - """ - legalEntityType: LegalEntityTypeInput - - """ - The legal name of the entity. - """ - legalName: String - - """ - The nickname of the entity. - """ - nickname: String - - """ - The phone number associated with the entity. - """ - phoneNumber: String - - """ - The trade name of the entity. - """ - tradeName: String @deprecated(reason: "Trade name is deprecated from Legal Entity scope and will be replaced with a shop scope field.") -} - -input CreateLegalEntityOnSignupInput { - """ - The address of the entity. - """ - address: AddressInput - - """ - The country where the entity is registered. - """ - countryCode: CountryCode! - - """ - The nickname of the entity. - """ - nickname: String -} - -""" -The result of creating a legal entity tax filing preference. -""" -type CreateLegalEntityTaxFilingPreferenceResult { - """ - The legal entity tax filing preference that was created. - """ - legalEntityTaxFilingPreference: LegalEntityTaxFilingPreference - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input CreateOrganizationDomainInput { - """ - The given domain. - """ - domainName: String -} - -type CreateOrganizationDomainResult { - """ - The organization object. - """ - organization: Organization - - """ - The collection of errors. - """ - userErrors: [UserError!] - - """ - The generated domain verification code. - """ - verificationCode: String -} - -input CreateOrganizationUsersInput { - """ - List of administrative permissions to be granted to the created OrganizationUser(s). - """ - administrativePermissions: [String!] - - """ - The emails of the users to be invited / created. - """ - emails: [String!]! - - """ - The ID of the Role to grant to the user. - """ - roleId: RoleID - - """ - List of shop access to be granted to the created OrganizationUser(s). - """ - shopAccesses: [ShopAccessInput!] - - """ - Whether or not TFA is enforced for the created OrganizationUser(s). - """ - tfaEnforced: Boolean -} - -type CreateOrganizationUsersResult { - """ - The emails of the invited users. - """ - emails: [String!] - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input CreatePartnerOrganizationUserInput { - """ - The ID of the Partner organization. - """ - organizationId: OrganizationID! - - """ - The ID of the organization user requesting the new user to join. - """ - requesterOrganizationUserId: OrganizationUserID - - """ - Identity UUID of the user. - """ - userIdentityUuid: String! -} - -type CreatePartnerOrganizationUserResult { - """ - The ID of the created organization user. - """ - organizationUserId: OrganizationUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input CreatePartnerShopTransferInput { - """ - Email of the user the shop is being transferred to. - """ - externalRecipientEmail: String - - """ - The id of the organization that owns the shop to be transferred. - """ - organizationId: OrganizationID! - - """ - UUID of the user who requested transferring the shop. - """ - requesterUuid: String! - - """ - The id of the shop to be transferred. - """ - shopifyShopId: ShopifyShopID! -} - -type CreatePartnerShopTransferResult { - """ - The ID of the new owning organization. - """ - targetOrganizationId: OrganizationID - - """ - The token of the PropertyTransferRequest. - """ - token: String - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input CreatePersonAliasInput { - """ - The alias variants of the person alias. - """ - aliasVariants: [NameVariantInput!] - - """ - The first name of the person alias. - """ - firstName: String - - """ - The last name of the person alias. - """ - lastName: String - - """ - The middle name of the person alias. - """ - middleName: String - - """ - The ID of the person this alias belongs to. - """ - personId: PersonID! - - """ - The prefix of the person alias. - """ - prefix: String - - """ - The suffix of the person alias. - """ - suffix: String -} - -input CreatePersonInput { - """ - The address of the person. - """ - address: AddressInput - - """ - The date of birth of the person. - """ - dateOfBirth: ISO8601Date - - """ - The email associated with the person. - """ - email: String - - """ - The first name of the person. - """ - firstName: String - - """ - The last name of the person. - """ - lastName: String - - """ - The middle name of the person. - """ - middleName: String - - """ - The name variants of the person. - """ - nameVariants: [NameVariantInput!] - - """ - The nationalities of the person. - """ - nationalities: [CountryCode!] - - """ - The phone number associated with the person. - """ - phoneNumber: String - - """ - The prefix of the person. - """ - prefix: String - - """ - The suffix of the person. - """ - suffix: String -} - -input CreatePrincipalInput { - """ - The address of the person. - """ - applicableAddress: AssignOrCreateAddressInput - - """ - The business attributes associated with the principal. - """ - businessAttributes: BusinessPrincipalInput - - """ - The contact information associated with the principal. - """ - contactInformation: PrincipalContactInformationInput - - """ - The legal entity identifier to create the person relationship with. - """ - legalEntityId: LegalEntityID! - - """ - Additional person details. - """ - person: UpdatePersonInput - - """ - The person identifier to create the legal entity relationship with. - """ - personId: PersonID! -} - -""" -The result of creating a principal. -""" -type CreatePrincipalResult { - """ - The created principal. - """ - principal: Principal - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input CreatePropertyTransferRequestInput { - """ - The external id of the property to be transferred. - """ - externalId: PropertyPublicID! - - """ - Email of the user the property is being transferred to. - """ - externalRecipientEmail: String - - """ - Transfer type (internal/external). - """ - transferType: PropertyTransfer! -} - -type CreatePropertyTransferRequestResult { - """ - The token of the PropertyTransferRequest. - """ - token: String - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input CreateStoreAdditionRequestInput { - """ - The internal store code. - """ - customInternalStoreCode: String - - """ - The internal store name. - """ - customInternalStoreName: String - - """ - The legal entity id for the store. - """ - legalEntityId: LegalEntityID - - """ - The reason for the store addition request. - """ - reason: String - - """ - The store copy request details. - """ - storeCopyRequestDetails: StoreCopyCreationInput - - """ - The public store name. - """ - storeName: String! - - """ - The store type. - """ - storeType: Store! - - """ - The subdomain of the store. - """ - subdomain: String! - - """ - Whether the store is within the brand. - """ - withinBrand: Boolean! -} - -type CreateStoreAdditionRequestResult { - """ - The newly created store addition request. - """ - storeAdditionRequest: StoreAdditionRequest - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type CreateStoreResult { - shopAdminUrl: String - shopDomain: String - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input CreateVibeTransferRequestInput { - """ - Email of the user the shop is being transferred to. - """ - externalRecipientEmail: String! - - """ - Optional URL to redirect to after the transfer is accepted. - """ - returnUrl: String - - """ - The ID of the shop to be transferred. - """ - shopId: PropertyPublicID! -} - -type CreateVibeTransferRequestResult { - """ - The claim URL for the store transfer. - """ - claimStoreUrl: String - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Content types supported for CSV user import file uploads -""" -enum CsvFileContent { - """ - CSV file. - """ - TEXT_CSV -} - -""" -ISO currency code. -""" -enum CurrencyCode { - """ - United Arab Emirates Dirham - """ - AED - - """ - Afghan Afghani - """ - AFN - - """ - Albanian Lek - """ - ALL - - """ - Armenian Dram - """ - AMD - - """ - Netherlands Antillean Gulden - """ - ANG - - """ - Angolan Kwanza - """ - AOA - - """ - Argentine Peso - """ - ARS - - """ - Australian Dollar - """ - AUD - - """ - Aruban Florin - """ - AWG - - """ - Azerbaijani Manat - """ - AZN - - """ - Bosnia and Herzegovina Convertible Mark - """ - BAM - - """ - Barbadian Dollar - """ - BBD - - """ - Bangladeshi Taka - """ - BDT - - """ - Bulgarian Lev - """ - BGN - - """ - Bahraini Dinar - """ - BHD - - """ - Burundian Franc - """ - BIF - - """ - Bermudian Dollar - """ - BMD - - """ - Brunei Dollar - """ - BND - - """ - Bolivian Boliviano - """ - BOB - - """ - Brazilian Real - """ - BRL - - """ - Bahamian Dollar - """ - BSD - - """ - Bhutanese Ngultrum - """ - BTN - - """ - Botswana Pula - """ - BWP - - """ - Belarusian Ruble - """ - BYN - - """ - Belarusian Ruble - """ - BYR - - """ - Belize Dollar - """ - BZD - - """ - Canadian Dollar - """ - CAD - - """ - Congolese Franc - """ - CDF - - """ - Swiss Franc - """ - CHF - - """ - Unidad de Fomento - """ - CLF - - """ - Chilean Peso - """ - CLP - - """ - Chinese Renminbi Yuan - """ - CNY - - """ - Colombian Peso - """ - COP - - """ - Costa Rican Colón - """ - CRC - - """ - Cuban Convertible Peso - """ - CUC - - """ - Cuban Peso - """ - CUP - - """ - Cape Verdean Escudo - """ - CVE - - """ - Cypriot pound - """ - CYP - - """ - Czech Koruna - """ - CZK - - """ - Djiboutian Franc - """ - DJF - - """ - Danish Krone - """ - DKK - - """ - Dominican Peso - """ - DOP - - """ - Algerian Dinar - """ - DZD - - """ - Estonian Kroon - """ - EEK - - """ - Egyptian Pound - """ - EGP - - """ - Eritrean Nakfa - """ - ERN - - """ - Ethiopian Birr - """ - ETB - - """ - Euro - """ - EUR - - """ - Fijian Dollar - """ - FJD - - """ - Falkland Pound - """ - FKP - - """ - British Pound - """ - GBP - - """ - British Penny - """ - GBX - - """ - Georgian Lari - """ - GEL - - """ - Guernsey Pound - """ - GGP - - """ - Ghanaian Cedi - """ - GHC - - """ - Ghanaian Cedi - """ - GHS - - """ - Gibraltar Pound - """ - GIP - - """ - Gambian Dalasi - """ - GMD - - """ - Guinean Franc - """ - GNF - - """ - Guatemalan Quetzal - """ - GTQ - - """ - Guyanese Dollar - """ - GYD - - """ - Hong Kong Dollar - """ - HKD - - """ - Honduran Lempira - """ - HNL - - """ - Croatian Kuna - """ - HRK - - """ - Haitian Gourde - """ - HTG - - """ - Hungarian Forint - """ - HUF - - """ - Indonesian Rupiah - """ - IDR - - """ - Israeli New Shekel - """ - ILS - - """ - Isle of Man Pound - """ - IMP - - """ - Indian Rupee - """ - INR - - """ - Iraqi Dinar - """ - IQD - - """ - Iranian Rial - """ - IRR - - """ - Icelandic Króna - """ - ISK - - """ - Jersey Pound - """ - JEP - - """ - Jamaican Dollar - """ - JMD - - """ - Jordanian Dinar - """ - JOD - - """ - Japanese Yen - """ - JPY - - """ - Kenyan Shilling - """ - KES - - """ - Kyrgyzstani Som - """ - KGS - - """ - Cambodian Riel - """ - KHR - - """ - Kiribati Dollar - """ - KID - - """ - Comorian Franc - """ - KMF - - """ - North Korean Won - """ - KPW - - """ - South Korean Won - """ - KRW - - """ - Kuwaiti Dinar - """ - KWD - - """ - Cayman Islands Dollar - """ - KYD - - """ - Kazakhstani Tenge - """ - KZT - - """ - Lao Kip - """ - LAK - - """ - Lebanese Pound - """ - LBP - - """ - Sri Lankan Rupee - """ - LKR - - """ - Liberian Dollar - """ - LRD - - """ - Lesotho Loti - """ - LSL - - """ - Lithuanian Litas - """ - LTL - - """ - Latvian Lats - """ - LVL - - """ - Libyan Dinar - """ - LYD - - """ - Moroccan Dirham - """ - MAD - - """ - Moldovan Leu - """ - MDL - - """ - Malagasy Ariary - """ - MGA - - """ - Macedonian Denar - """ - MKD - - """ - Myanmar Kyat - """ - MMK - - """ - Mongolian Tögrög - """ - MNT - - """ - Macanese Pataca - """ - MOP - - """ - Mauritanian Ouguiya - """ - MRO - - """ - Mauritanian New Ouguiya - """ - MRU - - """ - Maltese Lira - """ - MTL - - """ - Mauritian Rupee - """ - MUR - - """ - Maldivian Rufiyaa - """ - MVR - - """ - Malawian Kwacha - """ - MWK - - """ - Mexican Peso - """ - MXN - - """ - Malaysian Ringgit - """ - MYR - - """ - Mozambican Metical - """ - MZN - - """ - Namibian Dollar - """ - NAD - - """ - Nigerian Naira - """ - NGN - - """ - Nicaraguan Córdoba - """ - NIO - - """ - Norwegian Krone - """ - NOK - - """ - Nepalese Rupee - """ - NPR - - """ - New Zealand Dollar - """ - NZD - - """ - Omani Rial - """ - OMR - - """ - Panamanian Balboa - """ - PAB - - """ - Peruvian Sol - """ - PEN - - """ - Papua New Guinean Kina - """ - PGK - - """ - Philippine Peso - """ - PHP - - """ - Pakistani Rupee - """ - PKR - - """ - Polish Złoty - """ - PLN - - """ - Paraguayan Guaraní - """ - PYG - - """ - Qatari Riyal - """ - QAR - - """ - Romanian Leu - """ - RON - - """ - Serbian Dinar - """ - RSD - - """ - Russian Ruble - """ - RUB - - """ - Rwandan Franc - """ - RWF - - """ - Saudi Riyal - """ - SAR - - """ - Solomon Islands Dollar - """ - SBD - - """ - Seychellois Rupee - """ - SCR - - """ - Sudanese Pound - """ - SDG - - """ - Swedish Krona - """ - SEK - - """ - Singapore Dollar - """ - SGD - - """ - Saint Helenian Pound - """ - SHP - - """ - Slovak Koruna - """ - SKK - - """ - New Leone - """ - SLE - - """ - Sierra Leonean Leone - """ - SLL - - """ - Somali Shilling - """ - SOS - - """ - Surinamese Dollar - """ - SRD - - """ - South Sudanese Pound - """ - SSP - - """ - São Tomé and Príncipe Dobra - """ - STD - - """ - São Tomé and Príncipe Dobra - """ - STN - - """ - Salvadoran Colón - """ - SVC - - """ - Syrian Pound - """ - SYP - - """ - Swazi Lilangeni - """ - SZL - - """ - Thai Baht - """ - THB - - """ - Tajikistani Somoni - """ - TJS - - """ - Turkmenistani Manat - """ - TMM - - """ - Turkmenistani Manat - """ - TMT - - """ - Tunisian Dinar - """ - TND - - """ - Tongan Paʻanga - """ - TOP - - """ - Turkish Lira - """ - TRY - - """ - Trinidad and Tobago Dollar - """ - TTD - - """ - New Taiwan Dollar - """ - TWD - - """ - Tanzanian Shilling - """ - TZS - - """ - Ukrainian Hryvnia - """ - UAH - - """ - Ugandan Shilling - """ - UGX - - """ - United States Dollar - """ - USD - - """ - Uruguayan Peso - """ - UYU - - """ - Uzbekistan Som - """ - UZS - - """ - Venezuelan Bolívar - """ - VEB - - """ - Venezuelan Bolívar soberano - """ - VED - - """ - Venezuelan Bolívar fuerte - """ - VEF - - """ - Venezuelan Bolívar Soberano - """ - VES - - """ - Vietnamese Đồng - """ - VND - - """ - Vanuatu Vatu - """ - VUV - - """ - Samoan Tala - """ - WST - - """ - Central African Cfa Franc - """ - XAF - - """ - Silver (Troy Ounce) - """ - XAG - - """ - Gold (Troy Ounce) - """ - XAU - - """ - European Composite Unit - """ - XBA - - """ - European Monetary Unit - """ - XBB - - """ - European Unit of Account 9 - """ - XBC - - """ - European Unit of Account 17 - """ - XBD - - """ - East Caribbean Dollar - """ - XCD - - """ - Special Drawing Rights - """ - XDR - - """ - UIC Franc - """ - XFU - - """ - West African Cfa Franc - """ - XOF - - """ - Palladium - """ - XPD - - """ - Cfp Franc - """ - XPF - - """ - Platinum - """ - XPT - - """ - Codes specifically reserved for testing purposes - """ - XTS - - """ - Yemeni Rial - """ - YER - - """ - South African Rand - """ - ZAR - - """ - Zambian Kwacha - """ - ZMK - - """ - Zambian Kwacha - """ - ZMW - - """ - Zimbabwean Dollar - """ - ZWD - - """ - Zimbabwean Dollar - """ - ZWL - - """ - Zimbabwean Dollar - """ - ZWN - - """ - Zimbabwean Dollar - """ - ZWR -} - -""" -A signed decimal number, which supports arbitrary precision and is serialized as a string. -""" -scalar Decimal - -input DeleteCliTokenOrganizationUserInput { - """ - The identity UUID of the CLI token service account to delete. - """ - organizationUserIdentityUuid: String! -} - -type DeleteCliTokenOrganizationUserResult { - """ - The ID of the deleted organization user. - """ - deletedOrganizationUserId: OrganizationUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Inputs for deleting government identifiers. -""" -input DeleteGovernmentIdentifiersInput { - """ - The IDs of the GovernmentIdentifiers to delete. - """ - ids: [GovernmentIdentifierID!]! -} - -""" -The result of deleting government identifiers. -""" -type DeleteGovernmentIdentifiersResult { - """ - The IDs of the deleted_government_identifiers. - """ - deletedIds: [GovernmentIdentifierID!] - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input DeleteOrganizationDomainInput { - """ - The given domain. - """ - domainName: String! -} - -type DeleteOrganizationDomainResult { - """ - The organization object. - """ - organization: Organization - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type DeleteOrganizationUsersResult { - """ - Organization User IDs that were deleted. - """ - organizationUserIds: [OrganizationUserID!] - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input DeletePartnerOrganizationUserInput { - """ - The ID of the Partner organization user to be deleted. - """ - organizationUserId: OrganizationUserID! - - """ - The ID of the organization user requesting the user to be deleted. - """ - requesterOrganizationUserId: OrganizationUserID -} - -type DeletePartnerOrganizationUserResult { - """ - Organization User ID that was deleted. - """ - deletedOrganizationUserId: OrganizationUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -The result of deleting people. -""" -type DeletePeopleResult { - """ - The IDs of the deleted people. - """ - deletedIds: [PersonID!] - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input DeletePersonAliasInput { - """ - The ID of the person alias to delete. - """ - id: PersonAliasID! -} - -""" -The result of deleting principals. -""" -type DeletePrincipalsResult { - """ - The IDs of the deleted principals. - """ - deletedIds: [PrincipalID!] - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input DeleteRoleInput { - """ - The ID of the Role to delete. - """ - id: RoleID! -} - -type DeleteRoleResult { - """ - The deleted role id. - """ - deletedId: RoleID - - """ - List of user errors of role delete operation. - """ - userErrors: [UserError!] -} - -type DeleteSamlIntegrationResult { - """ - The organization object. - """ - organization: Organization - - """ - List of user errors of SAML integration delete operation. - """ - userErrors: [UserError!] -} - -type DeleteScimTokenResult { - """ - The organization object. - """ - organization: Organization - - """ - List of user errors of remove scim token operation. - """ - userErrors: [UserError!] -} - -""" -The result of deleting supporting documents. -""" -type DeleteSupportingDocumentsResult { - """ - The IDs of the deleted supporting documents. - """ - deletedIds: [EntitySupportingDocumentID!] - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type DirectUploadParams { - """ - Attachment linked to the blob. - """ - attachment: DocumentAttachment! - - """ - Token used to refer to file with these parameters. - """ - directUploadToken: String! - - """ - Headers of a signed file upload request. - """ - headers: [UploadHeader!]! - - """ - Endpoint to upload file directly to storage service. - """ - url: String! -} - -enum Document { - """ - Bank Statement - """ - AE_BANK_STATEMENT - - """ - Digital Visa - """ - AE_DIGITAL_VISA - - """ - Drivers License - """ - AE_DRIVERS_LICENSE - - """ - Freelancer Permit - """ - AE_FREELANCER_PERMIT - - """ - Digital/Physical Emirates ID card - """ - AE_IDENTITY_CARD - - """ - Memorandum of Association - """ - AE_MEMORANDUM_OF_ASSOCIATION - - """ - Passport - """ - AE_PASSPORT - - """ - Digital/Physical Emirates ID card - issued after April 11, 2022 - """ - AE_PHYSICAL_VISA - - """ - Power of Attorney - """ - AE_POWER_OF_ATTORNEY - - """ - Proof of Bank Account - """ - AE_PROOF_OF_BANK_ACCOUNT - - """ - Residence Visa - """ - AE_RESIDENCE_VISA - - """ - Trade License - """ - AE_TRADE_LICENSE - - """ - Alien Passport - """ - AT_ALIEN_PASSPORT - - """ - Asylum Seeker Passport - """ - AT_ASYLUM_SEEKER_PASSPORT - - """ - Bank Statement - """ - AT_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - AT_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Residence - """ - AT_CERTIFICATE_OF_RESIDENCE - - """ - Commercial Register Extract - """ - AT_COMMERCIAL_REGISTER_EXTRACT - - """ - Director Attestation - """ - AT_DIRECTOR_ATTESTATION - - """ - Donation Deduction Certificate - """ - AT_DONATION_DEDUCTION_CERTIFICATE - - """ - Drivers License - """ - AT_DRIVERS_LICENSE - - """ - Financial Statement - """ - AT_FINANCIAL_STATEMENT - - """ - Foreigner Identity Card - """ - AT_FOREIGNER_IDENTITY_CARD - - """ - Government Issued Letter - """ - AT_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - AT_IDENTITY_CARD - - """ - Other Supporting Document - """ - AT_OTHER - - """ - Passport - """ - AT_PASSPORT - - """ - Phone Bill - """ - AT_PHONE_BILL - - """ - Photo Card - """ - AT_PHOTO_CARD - - """ - Proof Of Address - """ - AT_PROOF_OF_ADDRESS - - """ - Resident Permit ID - """ - AT_RESIDENT_PERMIT_ID - - """ - Signed Annual Report - """ - AT_SIGNED_ANNUAL_REPORT - - """ - Tax Registration Certificate - """ - AT_TAX_REGISTRATION_CERTIFICATE - - """ - Temporary Resident Permit - """ - AT_TEMPORARY_RESIDENT_PERMIT - - """ - UBO Attestation - """ - AT_UBO_ATTESTATION - - """ - Utility Bill - """ - AT_UTILITY_BILL - - """ - Articles Of Association - """ - AU_ARTICLES_OF_ASSOCIATION - - """ - Bank Statement - """ - AU_BANK_STATEMENT - - """ - Certificate Of Incorporation - """ - AU_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Registration - """ - AU_CERTIFICATE_OF_REGISTRATION - - """ - Commercial Register Extract - """ - AU_COMMERCIAL_REGISTER_EXTRACT - - """ - Drivers License - """ - AU_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - AU_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - AU_IDENTITY_CARD - - """ - National Health ID - """ - AU_NATIONAL_HEALTH_ID - - """ - Other Supporting Document - """ - AU_OTHER - - """ - Passport - """ - AU_PASSPORT - - """ - Phone Bill - """ - AU_PHONE_BILL - - """ - Photo Card - """ - AU_PHOTO_CARD - - """ - Proof Of Address - """ - AU_PROOF_OF_ADDRESS - - """ - Proof Of Business Registration - """ - AU_PROOF_OF_BUSINESS_REGISTRATION - - """ - Tax Registration Certificate - """ - AU_TAX_REGISTRATION_CERTIFICATE - - """ - Utility Bill - """ - AU_UTILITY_BILL - - """ - Articles of Incorporation - """ - BE_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - BE_BANK_STATEMENT - - """ - Certificate of Residence - """ - BE_CERTIFICATE_OF_RESIDENCE - - """ - Commercial Register Extract - """ - BE_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - BE_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - BE_DIRECTOR_ATTESTATION - - """ - Driver's License - """ - BE_DRIVERS_LICENSE - - """ - Financial Statement - """ - BE_FINANCIAL_STATEMENT - - """ - Foreigner Identity Card - """ - BE_FOREIGNER_IDENTITY_CARD - - """ - Government Issued Letter - """ - BE_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - BE_IDENTITY_CARD - - """ - Mortgage Statement - """ - BE_MORTGAGE_STATEMENT - - """ - Official Belgian Register Appendices - """ - BE_OFFICIAL_BELGIAN_REGISTER_APPENDICES - - """ - Passport - """ - BE_PASSPORT - - """ - Pension Book - """ - BE_PENSION_BOOK - - """ - Recent Annual Return - """ - BE_RECENT_ANNUAL_RETURN - - """ - Resident Permit - """ - BE_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - BE_SIGNED_ANNUAL_REPORT - - """ - UBO Attestation - """ - BE_UBO_ATTESTATION - - """ - Utility Bill - """ - BE_UTILITY_BILL - - """ - VAT Registration - """ - BE_VAT_REGISTRATION - - """ - Articles of Incorporation - """ - BG_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - BG_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - BG_BENEFICIAL_OWNER_REPORT - - """ - Commercial Register Extract - """ - BG_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - BG_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - BG_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - BG_DRIVERS_LICENSE - - """ - Identity Card - """ - BG_IDENTITY_CARD - - """ - Mortgage Statement - """ - BG_MORTGAGE_STATEMENT - - """ - Partnership Agreement - """ - BG_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - BG_PASSPORT - - """ - Registration Document - """ - BG_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - BG_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - BG_SIGNED_ANNUAL_REPORT - - """ - UBO Attestation - """ - BG_UBO_ATTESTATION - - """ - Utility Bill - """ - BG_UTILITY_BILL - - """ - VAT Registration - """ - BG_VAT_REGISTRATION - - """ - Bank Statement - """ - CA_BANK_STATEMENT - - """ - Birth Certificate - """ - CA_BIRTH_CERTIFICATE - - """ - Board Meeting Minutes or Resolutions - """ - CA_BOARD_MEETING_MINUTES_OR_RESOLUTIONS - - """ - Board Resolutions Account Opening - """ - CA_BOARD_RESOLUTIONS_ACCOUNT_OPENING - - """ - British Columbia Company Summary - """ - CA_BRITISH_COLUMBIA_COMPANY_SUMMARY - - """ - Charity Information Return - """ - CA_CHARITY_INFORMATION_RETURN - - """ - Corporate Profile Report - """ - CA_CORPORATE_PROFILE_REPORT - - """ - Corporate Status Certificate - """ - CA_CORPORATE_STATUS_CERTIFICATE - - """ - CRA Registration Status - """ - CA_CRA_REGISTRATION_STATUS - - """ - Drivers License - """ - CA_DRIVERS_LICENSE - - """ - Federally issued Corporate Profile Report - """ - CA_FEDERALLY_ISSUED_CORPORATE_PROFILE_REPORT - - """ - Financial Statement - """ - CA_FINANCIAL_STATEMENT - - """ - Government Issued Letter - """ - CA_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - CA_IDENTITY_CARD - - """ - Insurance Policy Document - """ - CA_INSURANCE_POLICY_DOCUMENT - - """ - Marriage Certificate - """ - CA_MARRIAGE_CERTIFICATE - - """ - Notice of Charity Registration - """ - CA_NOTICE_OF_CHARITY_REGISTRATION - - """ - Official Donation Receipts - """ - CA_OFFICIAL_DONATION_RECEIPTS - - """ - Ontario Corporate Profile Report - """ - CA_ONTARIO_CORPORATE_PROFILE_REPORT - - """ - Other Supporting Document - """ - CA_OTHER - - """ - Partnership registration or agreements - """ - CA_PARTNERSHIP_REGISTRATION_OR_AGREEMENTS - - """ - Passport - """ - CA_PASSPORT - - """ - Phone Bill - """ - CA_PHONE_BILL - - """ - Photo Card - """ - CA_PHOTO_CARD - - """ - Property Tax Statement - """ - CA_PROPERTY_TAX_STATEMENT - - """ - Quebec Enterprise Register Company Summary - """ - CA_QUEBEC_ENTERPRISE_REGISTER_COMPANY_SUMMARY - - """ - Registered Charity Information Report - """ - CA_REGISTERED_CHARITY_INFORMATION_REPORT - - """ - Signed Annual Report - """ - CA_SIGNED_ANNUAL_REPORT - - """ - Utility Bill - """ - CA_UTILITY_BILL - - """ - Articles of Incorporation - """ - CH_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - CH_BANK_STATEMENT - - """ - Certificate of Incorporation - """ - CH_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Incumbency - """ - CH_CERTIFICATE_OF_INCUMBENCY - - """ - Commercial Register Entry - """ - CH_COMMERCIAL_REGISTER_ENTRY - - """ - Commercial Register Extract - """ - CH_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - CH_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - CH_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - CH_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - CH_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - CH_IDENTITY_CARD - - """ - Passport - """ - CH_PASSPORT - - """ - Recent Annual Return - """ - CH_RECENT_ANNUAL_RETURN - - """ - Registration Document - """ - CH_REGISTRATION_DOCUMENT - - """ - Residence Certificate - """ - CH_RESIDENCE_CERTIFICATE - - """ - Resident Permit - """ - CH_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - CH_SIGNED_ANNUAL_REPORT - - """ - UBO Attestation - """ - CH_UBO_ATTESTATION - - """ - Utility Bill - """ - CH_UTILITY_BILL - - """ - VAT Registration - """ - CH_VAT_REGISTRATION - - """ - Articles of Association - """ - CY_ARTICLES_OF_ASSOCIATION - - """ - Articles of Incorporation - """ - CY_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - CY_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - CY_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Incorporation - """ - CY_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Registration - """ - CY_CERTIFICATE_OF_REGISTRATION - - """ - Commercial Register Extract - """ - CY_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - CY_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - CY_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - CY_DRIVERS_LICENSE - - """ - Financial Statement - """ - CY_FINANCIAL_STATEMENT - - """ - Identity Card - """ - CY_IDENTITY_CARD - - """ - Mortgage Statement - """ - CY_MORTGAGE_STATEMENT - - """ - Partnership Agreement - """ - CY_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - CY_PASSPORT - - """ - Registration Document - """ - CY_REGISTRATION_DOCUMENT - - """ - Signed Annual Report - """ - CY_SIGNED_ANNUAL_REPORT - - """ - Tax Bill - """ - CY_TAX_BILL - - """ - UBO Attestation - """ - CY_UBO_ATTESTATION - - """ - Utility Bill - """ - CY_UTILITY_BILL - - """ - VAT Registration - """ - CY_VAT_REGISTRATION - - """ - Articles of Association - """ - CZ_ARTICLES_OF_ASSOCIATION - - """ - Articles of Incorporation - """ - CZ_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - CZ_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - CZ_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Registration - """ - CZ_CERTIFICATE_OF_REGISTRATION - - """ - Commercial Register Extract - """ - CZ_COMMERCIAL_REGISTER_EXTRACT - - """ - Contract for Sale of Property - """ - CZ_CONTRACT_FOR_SALE_OF_PROPERTY - - """ - Director Attestation - """ - CZ_DIRECTOR_ATTESTATION - - """ - Driver's License - """ - CZ_DRIVERS_LICENSE - - """ - Financial Statement - """ - CZ_FINANCIAL_STATEMENT - - """ - Government Issued Letter - """ - CZ_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - CZ_IDENTITY_CARD - - """ - Mortgage Statement - """ - CZ_MORTGAGE_STATEMENT - - """ - Partnership Agreement - """ - CZ_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - CZ_PASSPORT - - """ - Property Register Extract - """ - CZ_PROPERTY_REGISTER_EXTRACT - - """ - Registration Document - """ - CZ_REGISTRATION_DOCUMENT - - """ - Residence Permit - """ - CZ_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - CZ_SIGNED_ANNUAL_REPORT - - """ - Tenancy Agreement - """ - CZ_TENANCY_AGREEMENT - - """ - Trade Registration - """ - CZ_TRADE_REGISTRATION - - """ - UBO Attestation - """ - CZ_UBO_ATTESTATION - - """ - Utility Bill - """ - CZ_UTILITY_BILL - - """ - VAT Registration - """ - CZ_VAT_REGISTRATION - - """ - Drivers License - """ - DEFAULT_DRIVERS_LICENSE - - """ - Other Supporting Document - """ - DEFAULT_OTHER - - """ - Passport - """ - DEFAULT_PASSPORT - - """ - Phone Bill - """ - DEFAULT_PHONE_BILL - - """ - Photo Card - """ - DEFAULT_PHOTO_CARD - - """ - Utility Bill - """ - DEFAULT_UTILITY_BILL - - """ - Bank Statement - """ - DE_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - DE_BENEFICIAL_OWNER_REPORT - - """ - Board Meeting Minutes or Resolutions - """ - DE_BOARD_MEETING_MINUTES_OR_RESOLUTIONS - - """ - Certificate of Incumbency - """ - DE_CERTIFICATE_OF_INCUMBENCY - - """ - Certificate of Residence - """ - DE_CERTIFICATE_OF_RESIDENCE - - """ - Commercial Register Extract - """ - DE_COMMERCIAL_REGISTER_EXTRACT - - """ - Director Attestation - """ - DE_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - DE_DRIVERS_LICENSE - - """ - Exemption Notice - """ - DE_EXEMPTION_NOTICE - - """ - Government Issued Letter - """ - DE_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - DE_IDENTITY_CARD - - """ - Landlord Letter - """ - DE_LANDLORD_LETTER - - """ - Mortgage Statement - """ - DE_MORTGAGE_STATEMENT - - """ - Other Supporting Document - """ - DE_OTHER - - """ - Passport - """ - DE_PASSPORT - - """ - Phone Bill - """ - DE_PHONE_BILL - - """ - Photo Card - """ - DE_PHOTO_CARD - - """ - Proof Of Address - """ - DE_PROOF_OF_ADDRESS - - """ - Register of Associations Extract - """ - DE_REGISTER_OF_ASSOCIATIONS_EXTRACT - - """ - Registration Document - """ - DE_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - DE_RESIDENT_PERMIT - - """ - Shareholder Register - """ - DE_SHAREHOLDER_REGISTER - - """ - Signed Annual Report - """ - DE_SIGNED_ANNUAL_REPORT - - """ - Signed Rental Tenancy Agreement - """ - DE_SIGNED_RENTAL_TENANCY_AGREEMENT - - """ - Tax Registration Certificate - """ - DE_TAX_REGISTRATION_CERTIFICATE - - """ - Trade License - """ - DE_TRADE_LICENSE - - """ - Trade Registration - """ - DE_TRADE_REGISTRATION - - """ - UBO Attestation - """ - DE_UBO_ATTESTATION - - """ - Utility Bill - """ - DE_UTILITY_BILL - - """ - Bank Statement - """ - DK_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - DK_BENEFICIAL_OWNER_REPORT - - """ - Bylaws Memorandum - """ - DK_BY_LAWS_MEMORANDUM - - """ - Certificate of Registration - """ - DK_CERTIFICATE_OF_REGISTRATION - - """ - City of Copenhagen Identity Card - """ - DK_CITY_OF_COPENHAGEN_IDENTITY_CARD - - """ - Commercial Register Extract - """ - DK_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - DK_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - DK_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - DK_DRIVERS_LICENSE - - """ - Financial Statements - """ - DK_FINANCIAL_STATEMENT - - """ - Identity Card - """ - DK_IDENTITY_CARD - - """ - Insurance Policy Document - """ - DK_INSURANCE_POLICY_DOCUMENT - - """ - Landlord Letter - """ - DK_LANDLORD_LETTER - - """ - Military Identity Card - """ - DK_MILITARY_IDENTITY_CARD - - """ - Mortgage Statement - """ - DK_MORTGAGE_STATEMENT - - """ - Other Supporting Document - """ - DK_OTHER - - """ - Partnership Agreement - """ - DK_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - DK_PASSPORT - - """ - Police Identity Card - """ - DK_POLICE_IDENTITY_CARD - - """ - Registration Document - """ - DK_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - DK_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - DK_SIGNED_ANNUAL_REPORT - - """ - Tax Registration Certificate - """ - DK_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - DK_UBO_ATTESTATION - - """ - Utility Bill - """ - DK_UTILITY_BILL - - """ - Articles of Incorporation - """ - EE_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - EE_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - EE_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Residence - """ - EE_CERTIFICATE_OF_RESIDENCE - - """ - Commercial Register Extract - """ - EE_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - EE_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - EE_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - EE_DRIVERS_LICENSE - - """ - Identity Card - """ - EE_IDENTITY_CARD - - """ - Partnership Agreement - """ - EE_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - EE_PASSPORT - - """ - Registration Document - """ - EE_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - EE_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - EE_SIGNED_ANNUAL_REPORT - - """ - Tax Certificate - """ - EE_TAX_CERTIFICATE - - """ - Trash Disposal Bill - """ - EE_TRASH_BILL - - """ - UBO Attestation - """ - EE_UBO_ATTESTATION - - """ - Utility Bill - """ - EE_UTILITY_BILL - - """ - VAT Registration - """ - EE_VAT_REGISTRATION - - """ - Articles of Incorporation - """ - ES_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - ES_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - ES_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Registration - """ - ES_CERTIFICATE_OF_REGISTRATION - - """ - Certificate of Residence - """ - ES_CERTIFICATE_OF_RESIDENCE - - """ - Director Attestation - """ - ES_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - ES_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - ES_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - ES_IDENTITY_CARD - - """ - NIF Document - """ - ES_NIF_DOCUMENT - - """ - Other Supporting Document - """ - ES_OTHER - - """ - Passport - """ - ES_PASSPORT - - """ - Phone Bill - """ - ES_PHONE_BILL - - """ - Photo Card - """ - ES_PHOTO_CARD - - """ - Proof Of Address - """ - ES_PROOF_OF_ADDRESS - - """ - Proof Of Business Registration - """ - ES_PROOF_OF_BUSINESS_REGISTRATION - - """ - Recent Annual Return - """ - ES_RECENT_ANNUAL_RETURN - - """ - Resident Permit ID - """ - ES_RESIDENT_PERMIT_ID - - """ - Shareholder Register - """ - ES_SHAREHOLDER_REGISTER - - """ - Signed Annual Report - """ - ES_SIGNED_ANNUAL_REPORT - - """ - Tax Registration Certificate - """ - ES_TAX_REGISTRATION_CERTIFICATE - - """ - Trade License - """ - ES_TRADE_LICENSE - - """ - UBO Attestation - """ - ES_UBO_ATTESTATION - - """ - Utility Bill - """ - ES_UTILITY_BILL - - """ - Articles of Association - """ - FI_ARTICLES_OF_ASSOCIATION - - """ - Articles of Incorporation - """ - FI_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - FI_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - FI_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Incumbency - """ - FI_CERTIFICATE_OF_INCUMBENCY - - """ - Commercial Register Extract - """ - FI_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - FI_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - FI_DIRECTOR_ATTESTATION - - """ - Driver's License - """ - FI_DRIVERS_LICENSE - - """ - Financial Statement - """ - FI_FINANCIAL_STATEMENT - - """ - Government Issued Letter - """ - FI_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - FI_IDENTITY_CARD - - """ - Mortgage Statement - """ - FI_MORTGAGE_STATEMENT - - """ - Passport - """ - FI_PASSPORT - - """ - Resident Permit - """ - FI_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - FI_SIGNED_ANNUAL_REPORT - - """ - Trade Registration - """ - FI_TRADE_REGISTRATION - - """ - UBO Attestation - """ - FI_UBO_ATTESTATION - - """ - Utility Bill - """ - FI_UTILITY_BILL - - """ - VAT Registration - """ - FI_VAT_REGISTRATION - - """ - Articles of Association - """ - FR_ARTICLES_OF_ASSOCIATION - - """ - Articles of Incorporation - """ - FR_ARTICLES_OF_INCORPORATION - - """ - Assignment Agreements - """ - FR_ASSIGNMENT_AGREEMENTS - - """ - Bank Statement - """ - FR_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - FR_BENEFICIAL_OWNER_REPORT - - """ - Board Meeting Minutes or Resolutions - """ - FR_BOARD_MEETING_MINUTES_OR_RESOLUTIONS - - """ - Certificate of Incorporation - """ - FR_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Incumbency - """ - FR_CERTIFICATE_OF_INCUMBENCY - - """ - Commercial Register Extract - """ - FR_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - FR_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - FR_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - FR_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - FR_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - FR_IDENTITY_CARD - - """ - Other Supporting Document - """ - FR_OTHER - - """ - Partnership Agreement - """ - FR_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - FR_PASSPORT - - """ - Phone Bill - """ - FR_PHONE_BILL - - """ - Photo Card - """ - FR_PHOTO_CARD - - """ - Proof of Address - """ - FR_PROOF_OF_ADDRESS - - """ - Proof of Business Registration - """ - FR_PROOF_OF_BUSINESS_REGISTRATION - - """ - Proof of VAT ID - """ - FR_PROOF_OF_VAT_ID - - """ - Recent Annual Return - """ - FR_RECENT_ANNUAL_RETURN - - """ - Registration Document - """ - FR_REGISTRATION_DOCUMENT - - """ - Securities Register - """ - FR_SECURITIES_REGISTER - - """ - Shareholder Agreements - """ - FR_SHAREHOLDER_AGREEMENTS - - """ - Shareholder Register - """ - FR_SHAREHOLDER_REGISTER - - """ - UBO Attestation - """ - FR_UBO_ATTESTATION - - """ - Utility Bill - """ - FR_UTILITY_BILL - - """ - Bank Statement - """ - GB_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - GB_BENEFICIAL_OWNER_REPORT - - """ - Benefits Agency Document - """ - GB_BENEFITS_AGENCY_DOCUMENT - - """ - Certificate of Incorporation - """ - GB_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Incumbency - """ - GB_CERTIFICATE_OF_INCUMBENCY - - """ - Charity Commission Document - """ - GB_CHARITY_COMMISSION_DOCUMENT - - """ - Companies House Document - """ - GB_COMPANIES_HOUSE_DOCUMENT - - """ - Confirmation Statement - """ - GB_CONFIRMATION_STATEMENT - - """ - Corporate Status Certificate - """ - GB_CORPORATE_STATUS_CERTIFICATE - - """ - Council Document - """ - GB_COUNCIL_DOCUMENT - - """ - Director Attestation - """ - GB_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - GB_DRIVERS_LICENSE - - """ - Electoral Register Entry Document - """ - GB_ELECTORAL_REGISTER_ENTRY_DOCUMENT - - """ - General Practitioner Letter of Registration - """ - GB_GENERAL_PRACTICIONER_LETTER_OF_REGISTRATION - - """ - Government Issued Letter - """ - GB_GOVERNMENT_ISSUED_LETTER - - """ - HM Revenue and Customs Account Statement - """ - GB_HM_REVENUE_AND_CUSTOMS_ACCOUNT_STATEMENT - - """ - HM Revenue and Customs VAT Certificate - """ - GB_HM_REVENUE_AND_CUSTOMS_VAT_CERTIFICATE - - """ - Housing Association Document - """ - GB_HOUSING_ASSOCIATION_DOCUMENT - - """ - Identity Card - """ - GB_IDENTITY_CARD - - """ - NHS Medical Card - """ - GB_NHS_MEDICAL_CARD - - """ - OSCR Scottish Charity Regulator Document - """ - GB_OSCR_SCOTTISH_CHARITY_REGULATOR_DOCUMENT - - """ - Other Supporting Document - """ - GB_OTHER - - """ - Passport - """ - GB_PASSPORT - - """ - Phone Bill - """ - GB_PHONE_BILL - - """ - Photo Card - """ - GB_PHOTO_CARD - - """ - Proof Of Address - """ - GB_PROOF_OF_ADDRESS - - """ - Recent Annual Return - """ - GB_RECENT_ANNUAL_RETURN - - """ - Registration Document - """ - GB_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - GB_RESIDENT_PERMIT - - """ - Shareholder Register - """ - GB_SHAREHOLDER_REGISTER - - """ - Solicitors Letter - """ - GB_SOLICITORS_LETTER - - """ - Tax Registration Certificate - """ - GB_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - GB_UBO_ATTESTATION - - """ - Utility Bill - """ - GB_UTILITY_BILL - - """ - Bank Statement - """ - GI_BANK_STATEMENT - - """ - Certificate of Incorporation - """ - GI_CERTIFICATE_OF_INCORPORATION - - """ - Companies House Document - """ - GI_COMPANIES_HOUSE_DOCUMENT - - """ - Director Attestation - """ - GI_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - GI_DRIVERS_LICENSE - - """ - Identity Card - """ - GI_IDENTITY_CARD - - """ - Passport - """ - GI_PASSPORT - - """ - UBO Attestation - """ - GI_UBO_ATTESTATION - - """ - Utility Bill - """ - GI_UTILITY_BILL - - """ - Articles of Incorporation - """ - GR_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - GR_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - GR_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Incumbency - """ - GR_CERTIFICATE_OF_INCUMBENCY - - """ - Certificate of Registration - """ - GR_CERTIFICATE_OF_REGISTRATION - - """ - Commercial Register Extract - """ - GR_COMMERCIAL_REGISTER_EXTRACT - - """ - Commercial Registration - """ - GR_COMMERCIAL_REGISTRATION - - """ - Corporate Status Certificate - """ - GR_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - GR_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - GR_DRIVERS_LICENSE - - """ - Government Issued Address Document - """ - GR_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - GR_IDENTITY_CARD - - """ - Mortgage Statement - """ - GR_MORTGAGE_STATEMENT - - """ - Partnership Agreement - """ - GR_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - GR_PASSPORT - - """ - Registration Document - """ - GR_REGISTRATION_DOCUMENT - - """ - Residence Certificate - """ - GR_RESIDENCE_CERTIFICATE - - """ - Resident Certificate - """ - GR_RESIDENT_CERTIFICATE - - """ - Signed Annual Report - """ - GR_SIGNED_ANNUAL_REPORT - - """ - UBO Attestation - """ - GR_UBO_ATTESTATION - - """ - Utility Bill - """ - GR_UTILITY_BILL - - """ - VAT Registration - """ - GR_VAT_REGISTRATION - - """ - Bank Statement - """ - HK_BANK_STATEMENT - - """ - Business Registration Certificate - """ - HK_BUSINESS_REGISTRATION_CERTIFICATE - - """ - Certificate of Exemption - """ - HK_CERTIFICATE_OF_EXEMPTION - - """ - Certificate of Incorporation - """ - HK_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Registered Particulars - """ - HK_CERTIFICATE_OF_REGISTERED_PARTICULARS - - """ - Commercial Register Entry - """ - HK_COMMERCIAL_REGISTER_ENTRY - - """ - Commercial Register Extract - """ - HK_COMMERCIAL_REGISTER_EXTRACT - - """ - Contract for Sale of Property - """ - HK_CONTRACT_FOR_SALE_OF_PROPERTY - - """ - Drivers License - """ - HK_DRIVERS_LICENSE - - """ - Government or Judiciary Issued Document - """ - HK_GOVERNMENT_OR_JUDICIARY_ISSUED_DOCUMENT - - """ - Identity Card - """ - HK_IDENTITY_CARD - - """ - Insurance Company Statement - """ - HK_INSURANCE_COMPANY_STATEMENT - - """ - Passport - """ - HK_PASSPORT - - """ - Phone Bill - """ - HK_PHONE_BILL - - """ - Tenancy Agreement - """ - HK_TENANCY_AGREEMENT - - """ - University Bill or Letter - """ - HK_UNIVERSITY_BILL_OR_LETTER - - """ - Utility Bill - """ - HK_UTILITY_BILL - - """ - Vietnamese Refugee Card - """ - HK_VIETNAMESE_REFUGEE_CARD - - """ - Articles of Association - """ - HR_ARTICLES_OF_ASSOCIATION - - """ - Articles of Incorporation - """ - HR_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - HR_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - HR_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Incorporation - """ - HR_CERTIFICATE_OF_INCORPORATION - - """ - Corporate Status Certificate - """ - HR_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - HR_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - HR_DRIVERS_LICENSE - - """ - Identity Card - """ - HR_IDENTITY_CARD - - """ - Partnership Agreement - """ - HR_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - HR_PASSPORT - - """ - Registration Document - """ - HR_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - HR_RESIDENT_PERMIT - - """ - UBO Attestation - """ - HR_UBO_ATTESTATION - - """ - Utility Bill - """ - HR_UTILITY_BILL - - """ - VAT Registration - """ - HR_VAT_REGISTRATION - - """ - Address Card - """ - HU_ADDRESS_CARD - - """ - Articles of Incorporation - """ - HU_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - HU_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - HU_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Incorporation - """ - HU_CERTIFICATE_OF_INCORPORATION - - """ - Commercial Register Extract - """ - HU_COMMERCIAL_REGISTER_EXTRACT - - """ - Director Attestation - """ - HU_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - HU_DRIVERS_LICENSE - - """ - Identity Card - """ - HU_IDENTITY_CARD - - """ - Mortgage Statement - """ - HU_MORTGAGE_STATEMENT - - """ - Partnership Agreement - """ - HU_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - HU_PASSPORT - - """ - Registration Document - """ - HU_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - HU_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - HU_SIGNED_ANNUAL_REPORT - - """ - UBO Attestation - """ - HU_UBO_ATTESTATION - - """ - Utility Bill - """ - HU_UTILITY_BILL - - """ - VAT Registration - """ - HU_VAT_REGISTRATION - - """ - Articles of Association - """ - IE_ARTICLES_OF_ASSOCIATION - - """ - Articles of Incorporation - """ - IE_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - IE_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - IE_BENEFICIAL_OWNER_REPORT - - """ - Car Insurance Policy - """ - IE_CAR_INSURANCE_POLICY - - """ - Certificate of Incorporation - """ - IE_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Registration - """ - IE_CERTIFICATE_OF_REGISTRATION - - """ - Companies Registration Office Document - """ - IE_COMPANIES_REGISTRATION_OFFICE_DOCUMENT - - """ - Corporate Filings - """ - IE_CORPORATE_FILINGS - - """ - Director Attestation - """ - IE_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - IE_DRIVERS_LICENSE - - """ - Financial Statement - """ - IE_FINANCIAL_STATEMENT - - """ - Government Issued Letter - """ - IE_GOVERNMENT_ISSUED_LETTER - - """ - National Age Card - """ - IE_NATIONAL_AGE_CARD - - """ - Other Supporting Document - """ - IE_OTHER - - """ - Partnership Agreement - """ - IE_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - IE_PASSPORT - - """ - Phone Bill - """ - IE_PHONE_BILL - - """ - Photo Card - """ - IE_PHOTO_CARD - - """ - Proof of Home Insurance - """ - IE_PROOF_OF_HOME_INSURANCE - - """ - RBO Screenshot - """ - IE_RBO_SCREENSHOT - - """ - Recent Annual Return - """ - IE_RECENT_ANNUAL_RETURN - - """ - Registration Document - """ - IE_REGISTRATION_DOCUMENT - - """ - Social Insurance Document - """ - IE_SOCIAL_INSURANCE_DOCUMENT - - """ - Statement of Liability from Revenue - """ - IE_STATEMENT_OF_LIABILITY_FROM_REVENUE - - """ - Tax Credit Certificate - """ - IE_TAX_CREDIT_CERTIFICATE - - """ - Tax Registration Certificate - """ - IE_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - IE_UBO_ATTESTATION - - """ - Utility Bill - """ - IE_UTILITY_BILL - - """ - Bank Statement - """ - IT_BANK_STATEMENT - - """ - Boat License - """ - IT_BOAT_LICENSE - - """ - By-laws Memorandum - """ - IT_BY_LAWS_MEMORANDUM - - """ - Certificate of Incorporation - """ - IT_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Registration - """ - IT_CERTIFICATE_OF_REGISTRATION - - """ - Certificate of Residence - """ - IT_CERTIFICATE_OF_RESIDENCE - - """ - Corporate Status Certificate - """ - IT_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - IT_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - IT_DRIVERS_LICENSE - - """ - Financial Statement - """ - IT_FINANCIAL_STATEMENT - - """ - Government Issued Letter - """ - IT_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - IT_IDENTITY_CARD - - """ - Other Supporting Document - """ - IT_OTHER - - """ - Passport - """ - IT_PASSPORT - - """ - Pension Book - """ - IT_PENSION_BOOK - - """ - Phone Bill - """ - IT_PHONE_BILL - - """ - Photo Card - """ - IT_PHOTO_CARD - - """ - Proof Of Address - """ - IT_PROOF_OF_ADDRESS - - """ - Recent Annual Return - """ - IT_RECENT_ANNUAL_RETURN - - """ - Registers and Lists of Authorized Entities - """ - IT_REGISTERS_AND_LISTS_OF_AUTHORIZED_ENTITIES - - """ - Signed Annual Report - """ - IT_SIGNED_ANNUAL_REPORT - - """ - Tax Registration Certificate - """ - IT_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - IT_UBO_ATTESTATION - - """ - Utility Bill - """ - IT_UTILITY_BILL - - """ - Weapons License - """ - IT_WEAPONS_LICENSE - - """ - Drivers License - """ - JP_DRIVERS_LICENSE - - """ - My Number Card, with photo - """ - JP_MY_NUMBER_CARD - - """ - Other Supporting Document - """ - JP_OTHER - - """ - Passport - """ - JP_PASSPORT - - """ - Phone Bill - """ - JP_PHONE_BILL - - """ - Photo Card - """ - JP_PHOTO_CARD - - """ - Residence Card - """ - JP_RESIDENCE_CARD - - """ - Residence Certificate - """ - JP_RESIDENCE_CERTIFICATE - - """ - Seal Registration Certificate - """ - JP_SEAL_REGISTRATION_CERTIFICATE - - """ - Touki Copy of Company Registrar - """ - JP_TOUKI_COPY_OF_COMPANY_REGISTRAR - - """ - Bank Statement - """ - LI_BANK_STATEMENT - - """ - Commercial Register Extract - """ - LI_COMMERCIAL_REGISTER_EXTRACT - - """ - Director Attestation - """ - LI_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - LI_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - LI_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - LI_IDENTITY_CARD - - """ - Passport - """ - LI_PASSPORT - - """ - Residence Certificate - """ - LI_RESIDENCE_CERTIFICATE - - """ - UBO Attestation - """ - LI_UBO_ATTESTATION - - """ - Utility Bill - """ - LI_UTILITY_BILL - - """ - Bank Statement - """ - LT_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - LT_BENEFICIAL_OWNER_REPORT - - """ - Extract from the register of entities - """ - LT_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - LT_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - LT_DIRECTOR_ATTESTATION - - """ - Driver's License - """ - LT_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - LT_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - LT_IDENTITY_CARD - - """ - Passport - """ - LT_PASSPORT - - """ - Registration Document - """ - LT_REGISTRATION_DOCUMENT - - """ - Signed Annual Report - """ - LT_SIGNED_ANNUAL_REPORT - - """ - Tax registration certifiate - """ - LT_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - LT_UBO_ATTESTATION - - """ - Utility Bill - """ - LT_UTILITY_BILL - - """ - VAT Registration - """ - LT_VAT_REGISTRATION - - """ - Address ID Document - """ - LU_ADDRESS_ID_DOCUMENT - - """ - Articles of Association - """ - LU_ARTICLES_OF_ASSOCIATION - - """ - Articles of Incorporation - """ - LU_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - LU_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - LU_BENEFICIAL_OWNER_REPORT - - """ - Corporate Status Certificate - """ - LU_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - LU_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - LU_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - LU_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - LU_IDENTITY_CARD - - """ - Passport - """ - LU_PASSPORT - - """ - Recent Annual Return - """ - LU_RECENT_ANNUAL_RETURN - - """ - Resident Permit - """ - LU_RESIDENT_PERMIT - - """ - Trade License - """ - LU_TRADE_LICENSE - - """ - UBO Attestation - """ - LU_UBO_ATTESTATION - - """ - Utility Bill - """ - LU_UTILITY_BILL - - """ - VAT Registration - """ - LU_VAT_REGISTRATION - - """ - Assignment Agreements - """ - LV_ASSIGNMENT_AGREEMENTS - - """ - Bank Statement - """ - LV_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - LV_BENEFICIAL_OWNER_REPORT - - """ - Board Meeting Minutes or Resolutions - """ - LV_BOARD_MEETING_MINUTES_OR_RESOLUTIONS - - """ - Director Attestation - """ - LV_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - LV_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - LV_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - LV_IDENTITY_CARD - - """ - lursoft document - """ - LV_LURSOFT_DOCUMENT - - """ - merchant registration certificate - """ - LV_MERCHANT_REGISTRATION_CERTIFICATE - - """ - Partnership Agreement - """ - LV_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - LV_PASSPORT - - """ - proof of business registration - """ - LV_PROOF_OF_BUSINESS_REGISTRATION - - """ - Registration Document - """ - LV_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - LV_RESIDENT_PERMIT - - """ - tax registration certificate - """ - LV_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - LV_UBO_ATTESTATION - - """ - Utility Bill - """ - LV_UTILITY_BILL - - """ - vat number from register - """ - LV_VAT_NUMBER_FROM_REGISTER - - """ - Articles of Incorporation - """ - MT_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - MT_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - MT_BENEFICIAL_OWNER_REPORT - - """ - Commercial Register Extract - """ - MT_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - MT_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - MT_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - MT_DRIVERS_LICENSE - - """ - Identity Card - """ - MT_IDENTITY_CARD - - """ - Mortgage Statement - """ - MT_MORTGAGE_STATEMENT - - """ - Partnership Agreement - """ - MT_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - MT_PASSPORT - - """ - Registration Document - """ - MT_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - MT_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - MT_SIGNED_ANNUAL_REPORT - - """ - UBO Attestation - """ - MT_UBO_ATTESTATION - - """ - Utility Bill - """ - MT_UTILITY_BILL - - """ - Bank Statement - """ - MX_BANK_STATEMENT - - """ - Birth Certificate - """ - MX_BIRTH_CERTIFICATE - - """ - By Laws Memorandum - """ - MX_BY_LAWS_MEMORANDUM - - """ - Certificate of Incorporation - """ - MX_CERTIFICATE_OF_INCORPORATION - - """ - Consular ID Card - """ - MX_CONSULAR_ID_CARD - - """ - CURP (Clave Única de Registro de Población) - """ - MX_CURP - - """ - Drivers License - """ - MX_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - MX_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - MX_IDENTITY_CARD - - """ - Other Supporting Document - """ - MX_OTHER - - """ - Passport - """ - MX_PASSPORT - - """ - Power of Attorney - """ - MX_POWER_OF_ATTORNEY - - """ - Tax Registration Certificate - """ - MX_TAX_REGISTRATION_CERTIFICATE - - """ - Tax Status Certificate - """ - MX_TAX_STATUS_CERTIFICATE - - """ - Utility Bill - """ - MX_UTILITY_BILL - - """ - Voter ID Card - """ - MX_VOTER_ID_CARD - - """ - Bank Statement - """ - NL_BANK_STATEMENT - - """ - By Laws Memorandum - """ - NL_BY_LAWS_MEMORANDUM - - """ - Corporate Status Certificate - """ - NL_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - NL_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - NL_DRIVERS_LICENSE - - """ - Dutch Aliens Document - """ - NL_DUTCH_ALIENS_DOCUMENT - - """ - Government Issued Letter - """ - NL_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - NL_IDENTITY_CARD - - """ - KVK Document - """ - NL_KVK_DOCUMENT - - """ - Other Supporting Document - """ - NL_OTHER - - """ - Passport - """ - NL_PASSPORT - - """ - Phone Bill - """ - NL_PHONE_BILL - - """ - Photo Card - """ - NL_PHOTO_CARD - - """ - Proof Of Address - """ - NL_PROOF_OF_ADDRESS - - """ - Proof of Home Insurance - """ - NL_PROOF_OF_HOME_INSURANCE - - """ - Recent Annual Return - """ - NL_RECENT_ANNUAL_RETURN - - """ - Registration Document - """ - NL_REGISTRATION_DOCUMENT - - """ - Resident Permit ID - """ - NL_RESIDENT_PERMIT_ID - - """ - Signed Annual Report - """ - NL_SIGNED_ANNUAL_REPORT - - """ - Tax Registration Certificate - """ - NL_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - NL_UBO_ATTESTATION - - """ - Utility Bill - """ - NL_UTILITY_BILL - - """ - Bank Statement - """ - NO_BANK_STATEMENT - - """ - Certificate of Incorporation - """ - NO_CERTIFICATE_OF_INCORPORATION - - """ - Director Attestation - """ - NO_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - NO_DRIVERS_LICENSE - - """ - Financial Statement - """ - NO_FINANCIAL_STATEMENT - - """ - Government Issued Letter - """ - NO_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - NO_IDENTITY_CARD - - """ - Passport - """ - NO_PASSPORT - - """ - Residence Certificate - """ - NO_RESIDENCE_CERTIFICATE - - """ - Resident Permit - """ - NO_RESIDENT_PERMIT - - """ - UBO Attestation - """ - NO_UBO_ATTESTATION - - """ - Utility Bill - """ - NO_UTILITY_BILL - - """ - Bank Statement - """ - NZ_BANK_STATEMENT - - """ - Boat License - """ - NZ_BOAT_LICENSE - - """ - Business Number Registration Extract - """ - NZ_BUSINESS_NUMBER_REGISTRATION_EXTRACT - - """ - Car Registration Notification Demand - """ - NZ_CAR_REGISTRATION_NOTIFICATION_DEMAND - - """ - Central Government Agency Document - """ - NZ_CENTRAL_GOVERNMENT_AGENCY_DOCUMENT - - """ - Certificate of Good Standing - """ - NZ_CERTIFICATE_OF_GOOD_STANDING - - """ - Certificate of Identity - """ - NZ_CERTIFICATE_OF_IDENTITY - - """ - Certificate of Incorporation - """ - NZ_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Residence - """ - NZ_CERTIFICATE_OF_RESIDENCE - - """ - Companies Office Company Extract - """ - NZ_COMPANIES_OFFICE_COMPANY_EXTRACT - - """ - Drivers License - """ - NZ_DRIVERS_LICENSE - - """ - Electoral Roll Papers - """ - NZ_ELECTORAL_ROLL_PAPERS - - """ - Emergency Travel Document - """ - NZ_EMERGENCY_TRAVEL_DOCUMENT - - """ - Financial Statement - """ - NZ_FINANCIAL_STATEMENT - - """ - Government Issued Letter - """ - NZ_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - NZ_IDENTITY_CARD - - """ - Insurance Policy Document - """ - NZ_INSURANCE_POLICY_DOCUMENT - - """ - Local Council Government Letter - """ - NZ_LOCAL_COUNCIL_GOVERNMENT_LETTER - - """ - Memorandum of Association - """ - NZ_MEMORANDUM_OF_ASSOCIATION - - """ - Other Supporting Document - """ - NZ_OTHER - - """ - Passport - """ - NZ_PASSPORT - - """ - Pension Book - """ - NZ_PENSION_BOOK - - """ - Phone Bill - """ - NZ_PHONE_BILL - - """ - Proof Of Address - """ - NZ_PROOF_OF_ADDRESS - - """ - Refugee Travel Document - """ - NZ_REFUGEE_TRAVEL_DOCUMENT - - """ - Register of Associations Extract - """ - NZ_REGISTER_OF_ASSOCIATIONS_EXTRACT - - """ - Signed Rental Tenancy Agreement - """ - NZ_SIGNED_RENTAL_TENANCY_AGREEMENT - - """ - Tax Registration Certificate - """ - NZ_TAX_REGISTRATION_CERTIFICATE - - """ - Utility Bill - """ - NZ_UTILITY_BILL - - """ - VAT Registration - """ - NZ_VAT_REGISTRATION - - """ - Weapons License - """ - NZ_WEAPONS_LICENSE - - """ - Articles of Incorporation - """ - PL_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - PL_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - PL_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Incumbency - """ - PL_CERTIFICATE_OF_INCUMBENCY - - """ - Certificate of Residence - """ - PL_CERTIFICATE_OF_RESIDENCE - - """ - Corporate Status Certificate - """ - PL_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - PL_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - PL_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - PL_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - PL_IDENTITY_CARD - - """ - Insurance Policy Document - """ - PL_INSURANCE_POLICY_DOCUMENT - - """ - National Court Register - """ - PL_NATIONAL_COURT_REGISTER - - """ - Passport - """ - PL_PASSPORT - - """ - Recent Annual Return - """ - PL_RECENT_ANNUAL_RETURN - - """ - Registration Document - """ - PL_REGISTRATION_DOCUMENT - - """ - REGON Certificate - """ - PL_REGON_CERTIFICATE - - """ - Resident Permit - """ - PL_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - PL_SIGNED_ANNUAL_REPORT - - """ - Social Insurance Document - """ - PL_SOCIAL_INSURANCE_DOCUMENT - - """ - Tax Return - """ - PL_TAX_RETURN - - """ - Temporary Residence Registration Certificate - """ - PL_TEMPORARY_RESIDENCE_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - PL_UBO_ATTESTATION - - """ - Utility Bill - """ - PL_UTILITY_BILL - - """ - Articles of Incorporation - """ - PT_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - PT_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - PT_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Good Standing - """ - PT_CERTIFICATE_OF_GOOD_STANDING - - """ - Certificate of Incorporation - """ - PT_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Incumbency - """ - PT_CERTIFICATE_OF_INCUMBENCY - - """ - Certificate of Residence - """ - PT_CERTIFICATE_OF_RESIDENCE - - """ - Citizen Card - """ - PT_CITIZEN_CARD - - """ - Corporate Status Certificate - """ - PT_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - PT_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - PT_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - PT_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - PT_IDENTITY_CARD - - """ - Other Supporting Document - """ - PT_OTHER - - """ - Passport - """ - PT_PASSPORT - - """ - Recent Annual Return - """ - PT_RECENT_ANNUAL_RETURN - - """ - Registration Document - """ - PT_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - PT_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - PT_SIGNED_ANNUAL_REPORT - - """ - Tax Registration Certificate - """ - PT_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - PT_UBO_ATTESTATION - - """ - Utility Bill - """ - PT_UTILITY_BILL - - """ - Articles of Incorporation - """ - RO_ARTICLES_OF_INCORPORATION - - """ - Assessment Certificate - """ - RO_ASSESSMENT_CERTIFICATE - - """ - Bank Statement - """ - RO_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - RO_BENEFICIAL_OWNER_REPORT - - """ - Board Meeting Minutes or Resolutions - """ - RO_BOARD_MEETING_MINUTES_OR_RESOLUTIONS - - """ - Corporate Status Certificate - """ - RO_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - RO_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - RO_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - RO_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - RO_IDENTITY_CARD - - """ - Other Supporting Document - """ - RO_OTHER - - """ - Partnership Agreement - """ - RO_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - RO_PASSPORT - - """ - Phone Bill - """ - RO_PHONE_BILL - - """ - Photo Card - """ - RO_PHOTO_CARD - - """ - Proof of Address - """ - RO_PROOF_OF_ADDRESS - - """ - Registration Document - """ - RO_REGISTRATION_DOCUMENT - - """ - Signed Annual Report - """ - RO_SIGNED_ANNUAL_REPORT - - """ - Tax Registration Certificate - """ - RO_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - RO_UBO_ATTESTATION - - """ - Utility Bill - """ - RO_UTILITY_BILL - - """ - Articles of Association - """ - SE_ARTICLES_OF_ASSOCIATION - - """ - Bank Statement - """ - SE_BANK_STATEMENT - - """ - Birth Certificate - """ - SE_BIRTH_CERTIFICATE - - """ - Certificate of Incorporation - """ - SE_CERTIFICATE_OF_INCORPORATION - - """ - Certificate of Registration - """ - SE_CERTIFICATE_OF_REGISTRATION - - """ - Director Attestation - """ - SE_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - SE_DRIVERS_LICENSE - - """ - Financial Statement - """ - SE_FINANCIAL_STATEMENT - - """ - Government Issued Letter - """ - SE_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - SE_IDENTITY_CARD - - """ - Official Gazette Notice - """ - SE_OFFICIAL_GAZETTE_NOTICE - - """ - Other Supporting Document - """ - SE_OTHER - - """ - Passport - """ - SE_PASSPORT - - """ - Phone Bill - """ - SE_PHONE_BILL - - """ - Photo Card - """ - SE_PHOTO_CARD - - """ - Recent Annual Return - """ - SE_RECENT_ANNUAL_RETURN - - """ - Registration Document - """ - SE_REGISTRATION_DOCUMENT - - """ - Resident Permit ID - """ - SE_RESIDENT_PERMIT_ID - - """ - Signed Annual Report - """ - SE_SIGNED_ANNUAL_REPORT - - """ - Swedish Standards Institute approved ID cards - """ - SE_SIS_ID_CARD - - """ - Tax Registration Certificate - """ - SE_TAX_REGISTRATION_CERTIFICATE - - """ - UBO Attestation - """ - SE_UBO_ATTESTATION - - """ - Utility Bill - """ - SE_UTILITY_BILL - - """ - ACRA Bizfile - """ - SG_ACRA_BIZFILE - - """ - ACRA Bizfile - """ - SG_ACRA_BIZFILE_RELATIONSHIP - - """ - Bank Statement - """ - SG_BANK_STATEMENT - - """ - Board Meeting Minutes or Resolutions - """ - SG_BOARD_MEETING_MINUTES_OR_RESOLUTIONS - - """ - Director Attestation - """ - SG_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - SG_DRIVERS_LICENSE - - """ - Government Agency Correspondence - """ - SG_GOVERNMENT_AGENCY_CORRESPONDENCE - - """ - Government Issued Identity Document - """ - SG_GOVERNMENT_ISSUED_IDENTITY_DOCUMENT - - """ - Identity Card - """ - SG_IDENTITY_CARD - - """ - Letter of Authorization - """ - SG_LETTER_OF_AUTHORIZATION - - """ - Other Supporting Document - """ - SG_OTHER - - """ - Passport - """ - SG_PASSPORT - - """ - Phone Bill - """ - SG_PHONE_BILL - - """ - Photo Card - """ - SG_PHOTO_CARD - - """ - Recent Annual Return - """ - SG_RECENT_ANNUAL_RETURN - - """ - Recent Constitution Document - """ - SG_RECENT_CONSTITUTION_DOCUMENT - - """ - Registry of Societies Certificate - """ - SG_REGISTRY_OF_SOCIETIES_CERTIFICATE - - """ - UBO Attestation - """ - SG_UBO_ATTESTATION - - """ - Utility Bill - """ - SG_UTILITY_BILL - - """ - Articles of Incorporation - """ - SI_ARTICLES_OF_INCORPORATION - - """ - Beneficial Owner Report - """ - SI_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Incorporation - """ - SI_CERTIFICATE_OF_INCORPORATION - - """ - Corporate Status Certificate - """ - SI_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - SI_DIRECTOR_ATTESTATION - - """ - Drivers License - """ - SI_DRIVERS_LICENSE - - """ - Electronic Business Extract - """ - SI_ELECTRONIC_BUSINESS_EXTRACT - - """ - Financial Statement - """ - SI_FINANCIAL_STATEMENT - - """ - Government Issued Letter - """ - SI_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - SI_IDENTITY_CARD - - """ - Notice of Identification and Classification of Activities - """ - SI_NOTICE_OF_IDENTIFICATION_AND_CLASSIFICATION_OF_ACTIVITIES - - """ - Partnership Agreement - """ - SI_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - SI_PASSPORT - - """ - Registration Document - """ - SI_REGISTRATION_DOCUMENT - - """ - Resident Permit - """ - SI_RESIDENT_PERMIT - - """ - Signed Annual Report - """ - SI_SIGNED_ANNUAL_REPORT - - """ - UBO Attestation - """ - SI_UBO_ATTESTATION - - """ - Utility Bill - """ - SI_UTILITY_BILL - - """ - VAT Registration - """ - SI_VAT_REGISTRATION - - """ - Articles of Incorporation - """ - SK_ARTICLES_OF_INCORPORATION - - """ - Bank Statement - """ - SK_BANK_STATEMENT - - """ - Beneficial Owner Report - """ - SK_BENEFICIAL_OWNER_REPORT - - """ - Certificate of Residence - """ - SK_CERTIFICATE_OF_RESIDENCE - - """ - Commercial Register Extract - """ - SK_COMMERCIAL_REGISTER_EXTRACT - - """ - Corporate Status Certificate - """ - SK_CORPORATE_STATUS_CERTIFICATE - - """ - Director Attestation - """ - SK_DIRECTOR_ATTESTATION - - """ - Driver's License - """ - SK_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - SK_GOVERNMENT_ISSUED_LETTER - - """ - Identity Card - """ - SK_IDENTITY_CARD - - """ - Mortgage Statement - """ - SK_MORTGAGE_STATEMENT - - """ - Partnership Agreement - """ - SK_PARTNERSHIP_AGREEMENT - - """ - Passport - """ - SK_PASSPORT - - """ - Pension Book - """ - SK_PENSION_BOOK - - """ - Registration Document - """ - SK_REGISTRATION_DOCUMENT - - """ - Signed Annual Report - """ - SK_SIGNED_ANNUAL_REPORT - - """ - UBO Attestation - """ - SK_UBO_ATTESTATION - - """ - Utility Bill - """ - SK_UTILITY_BILL - - """ - Bank Statement - """ - US_BANK_STATEMENT - - """ - Credit Card Statement - """ - US_CREDIT_CARD_STATEMENT - - """ - Drivers License - """ - US_DRIVERS_LICENSE - - """ - Government Issued Letter - """ - US_GOVERNMENT_ISSUED_LETTER - - """ - Insurance Statement - """ - US_INSURANCE_STATEMENT - - """ - IRS Letter 147c - """ - US_IRS_LETTER_147C - - """ - IRS SS-4 Confirmation Letter - """ - US_IRS_SS_4_CONFIRMATION_LETTER - - """ - Other Supporting Document - """ - US_OTHER - - """ - Passport - """ - US_PASSPORT - - """ - Phone Bill - """ - US_PHONE_BILL - - """ - Photo Card - """ - US_PHOTO_CARD - - """ - Proof Of Address - """ - US_PROOF_OF_ADDRESS - - """ - Proof of Business Registration - """ - US_PROOF_OF_BUSINESS_REGISTRATION - - """ - State ID - """ - US_STATE_ID - - """ - Tax Assessment Notice - """ - US_TAX_ASSESSMENT_NOTICE - - """ - Utility Bill - """ - US_UTILITY_BILL -} - -type DocumentAttachment implements Node { - attachmentType: Attachment! - contentType: FileContent - filename: String - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! -} - -""" -The connection type for DocumentAttachment. -""" -type DocumentAttachmentConnection { - """ - A list of edges. - """ - edges: [DocumentAttachmentEdge!]! - - """ - A list of nodes. - """ - nodes: [DocumentAttachment!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type DocumentAttachmentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: DocumentAttachment! -} - -""" -The ID for a DocumentAttachment. -""" -scalar DocumentAttachmentID - -type DocumentField implements Node { - confidenceScore: Float - fieldName: String! - - """ - The ID for an object. - """ - id: GlobalID! - - """ - The field value. Returns a redacted string for sensitive fields (e.g. license - numbers). Non-sensitive fields return the full value. - """ - maskedValue: String - queryComplexity: Int! - queryDepth: Int! - - """ - The unmasked field value. Always returns the full value regardless of sensitivity. - """ - value: String -} - -""" -The connection type for DocumentField. -""" -type DocumentFieldConnection { - """ - A list of edges. - """ - edges: [DocumentFieldEdge!]! - - """ - A list of nodes. - """ - nodes: [DocumentField!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type DocumentFieldEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: DocumentField! -} - -enum DocumentPurpose { - PROOF_OF_ADDRESS - PROOF_OF_AUTHORITY - PROOF_OF_BANK_ACCOUNT_OWNERSHIP - PROOF_OF_BUSINESS_ADDRESS - PROOF_OF_BUSINESS_REGISTRATION - PROOF_OF_GOVERNMENT_REGISTRATION - PROOF_OF_IDENTITY - PROOF_OF_LICENSE - PROOF_OF_MEMORANDUM_OF_ASSOCIATION - PROOF_OF_PASSPORT - PROOF_OF_RELATIONSHIP - PROOF_OF_TAX_ID - PROOF_OF_VAT_ID - PROOF_OF_VISA -} - -""" -Metadata about a document purpose, including required fields that must be visible on supporting documents -""" -type DocumentPurposeMetadata { - """ - Description of what this document type proves - """ - description: String - - """ - Fields that must be visible on documents of this type - """ - mustInclude: [RequiredField!]! - - """ - Display name for this purpose - """ - name: String! - - """ - The document purpose handle - """ - purpose: DocumentPurpose! -} - -type EasyToGuessPinResponse { - """ - Whether the PIN is easy to guess. - """ - isEasyToGuess: Boolean! - - """ - An array of reasons why the PIN is easy to guess. Empty if the PIN isn't easy to guess. - """ - ruleViolations: [String!]! -} - -input EndCollaborationInput { - """ - The ID of the shop to end collaborator access for. - """ - shopifyShopId: PropertyPublicID! -} - -type EndCollaborationResult { - """ - The collaborator relationship that was ended. - """ - collaboratorRelationship: CollaboratorRelationship - - """ - Errors that occurred while ending collaborator access. - """ - userErrors: [UserError!] -} - -input EnforceSamlOrganizationDomainsInput { - """ - The IDs of the domain to be enforced. - """ - domainIds: [OrganizationDomainID!]! -} - -type EnforceSamlOrganizationDomainsResult { - """ - The organization with the enforced organization domains. - """ - organization: Organization - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -A government identifier supplied to a person or legal entity match check. -""" -input EntityMatchGovIdInput { - """ - The country code for this identifier. - """ - countryCode: CountryCode! - - """ - The type of government identifier. - """ - identifierType: GovernmentIdentifierTypeInput! - - """ - The raw value of the government identifier. - """ - value: String! -} - -""" -Verdict from a person or legal entity match check. -""" -enum EntityMatchVerdict { - """ - Exactly one existing record is identified by the input with no contradicting identifiers. - """ - CONFIRMED_MATCH - - """ - One or more existing records match on non-unique identifiers but unique identifiers do not single one out. - """ - DISAMBIGUATION_CANDIDATES - - """ - The input contradicts an existing record on a unique identifier. - """ - MATCH_CONFLICT - - """ - No existing record matches. - """ - NO_MATCH -} - -""" -The ID for a EntitySupportingDocument. -""" -scalar EntitySupportingDocumentID - -type ExpireCollaboratorRelationshipResult { - """ - The collaborator relationship that was expired. - """ - collaboratorRelationship: CollaboratorRelationship - - """ - Errors that occurred while expiring the collaborator relationship. - """ - userErrors: [UserError!] -} - -input ExportResourceInput { - """ - The resource type to export. - """ - exportModel: ExportableResource! -} - -type ExportResourceResult { - """ - Indicates whether the export was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -enum ExportableResource { - """ - Export action audits - """ - ACTION_AUDIT - - """ - Export organization users - """ - ORGANIZATION_USER - - """ - Export roles - """ - ROLE - - """ - Export user groups - """ - USER_GROUP -} - -type ExternalShopTransferRequest implements Node { - """ - The email of the transfer recipient - """ - externalRecipientEmail: String! - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! -} - -input FileAttachmentInput { - """ - Whether this attachment is the Front, Back or Page of the document. - """ - attachmentType: Attachment! - - """ - Metadata for the file to be uploaded. - """ - fileMetadata: FileMetadataInput! -} - -""" -The content_types for file uploads supported by this app -""" -enum FileContent { - APPLICATION_PDF - IMAGE_JPEG - IMAGE_PNG -} - -""" -The metadata of the file that the client will upload directly to the storage service. -""" -input FileMetadataInput { - """ - The size of the file in bytes - """ - byteSize: Int! - - """ - A base64 MD5 digest of the file - """ - checksum: String! - - """ - the content type of the file - """ - contentType: FileContent! - - """ - The name of the file - """ - filename: String! -} - -input FinalizeOrganizationUserImportCsvUploadInput { - """ - Token returned from stageOrganizationUserImportCsvUpload. - """ - directUploadToken: String! -} - -type FinalizeOrganizationUserImportCsvUploadResult { - """ - The import record created for this upload. Use its ID to poll for progress. - """ - businessUsersImport: BusinessUsersImportRun - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type FinalizeSupportingDocumentResult { - supportingDocument: SupportingDocument - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input FinalizeSupportingDocumentUploadInput { - supportingDocumentAttachments: [SupportingDocumentAttachmentInput!]! - supportingDocumentId: SupportingDocumentID! -} - -input GenerateDomainVerificationCodeInput { - """ - The given domain. - """ - domainName: String -} - -type GenerateDomainVerificationCodeResult { - """ - The collection of errors. - """ - userErrors: [UserError!] - - """ - The generated domain verification code. - """ - verificationCode: String -} - -type GeneratePosPinResult { - """ - The generated POS pin. - """ - posPin: String! -} - -type GenerateScimTokenResult { - """ - The organization object. - """ - organization: Organization - - """ - The generated scim token. - """ - scimToken: String - - """ - List of user errors of generate scim token operation. - """ - userErrors: [UserError!] -} - -scalar GlobalID - -type GovernmentIdentifier implements Node { - countryCode: CountryCode! - - """ - The ID for an object. - """ - id: GlobalID! - identifierType: GovernmentIdentifierType! - maskedValue: String! - queryComplexity: Int! - queryDepth: Int! - - """ - The unmasked value of the government identifier. Warning: querying this field - in a mutation response can return a trust challenge error on mutation success. - """ - value: String! -} - -enum GovernmentIdentifierCategoryEnum { - IDENTIFYING_ID - OTHER - TAX_ID -} - -""" -The connection type for GovernmentIdentifier. -""" -type GovernmentIdentifierConnection { - """ - A list of edges. - """ - edges: [GovernmentIdentifierEdge!]! - - """ - A list of nodes. - """ - nodes: [GovernmentIdentifier!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -type GovernmentIdentifierDuplicationCheck { - """ - The GID of the entity that owns the duplicate. - """ - identifiableId: ID! - - """ - Display name of the entity that owns the duplicate. - """ - identifiableName: String - - """ - The masked value of the duplicate government identifier. - """ - maskedValue: String! -} - -""" -An edge in a connection. -""" -type GovernmentIdentifierEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: GovernmentIdentifier! -} - -""" -The ID for a GovernmentIdentifier. -""" -scalar GovernmentIdentifierID - -type GovernmentIdentifierResult { - governmentIdentifier: GovernmentIdentifier - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type GovernmentIdentifierType { - category: GovernmentIdentifierCategoryEnum! - countryCode: CountryCodeWithDefault! - deprecated: Boolean! - description: String - fields: [GovernmentIdentifierTypeField!]! - handle: String! - multipleAllowed: Boolean! - name: String! - shortName: String - type: GovernmentIdentifierTypeEnum! -} - -enum GovernmentIdentifierTypeEnum { - BUSINESS_IDENTIFICATION_NUMBER - DRIVERS_LICENSE - PASSPORT - PERSONAL_IDENTIFICATION_NUMBER - TAX_ID -} - -type GovernmentIdentifierTypeField { - format: String - mask: String - name: String! - placeholder: String -} - -enum GovernmentIdentifierTypeInput { - AE_EMIRATES_ID - AE_TIN_COMPANY - AE_VAT_ID - AO_NIF - AR_CUIL - AR_DNI - AT_DRIVERS_LICENSE - AT_FBN - AT_PASSPORT - AT_STEUER_NR - AT_VAT_ID - AU_ABN - AU_ACN - AU_DRIVERS_LICENSE - AU_PASSPORT - AU_TFN - AZ_PIN - BE_BTW - BE_DRIVERS_LICENSE - BE_KBO - BE_KVK - BE_NATIONAL_NUMBER - BE_PASSPORT - BE_TVA - BE_VAT_ID - BG_EGN - BG_TIN_COMPANY - BG_VAT_ID - BN_NRIC - BO_CI - BR_CPF - BS_TIN - BT_CID - BW_TIN - CA_BUSINESS_NUMBER - CA_CORPORATION_NUMBER - CA_CRA - CA_DRIVERS_LICENSE - CA_NEQ - CA_PASSPORT - CA_SIN - CH_AHV - CH_DRIVERS_LICENSE - CH_PASSPORT - CH_TIN_COMPANY - CH_UID - CH_VAT_ID - CL_RUT - CN_PASSPORT - CO_CC - CR_CI - CR_CPF - CR_DIMEX - CR_NITE - CY_TIC - CY_TIN_COMPANY - CY_VAT_ID - CZ_DIC - CZ_DRIVERS_LICENSE - CZ_ICO - CZ_PASSPORT - CZ_RODNE_CISLO - CZ_VAT_ID - DEFAULT_BUSINESS_ID - DEFAULT_DRIVERS_LICENSE - DEFAULT_NATIONAL_ID - DEFAULT_PASSPORT - DEFAULT_PERSONAL_ID_NUMBER - DEFAULT_TAX_ID - DE_DRIVERS_LICENSE - DE_HRN - DE_HR_COURT - DE_PASSPORT - DE_STEUER_ID_NR - DE_VAT_ID - DK_CPR - DK_CVR - DK_DRIVERS_LICENSE - DK_PASSPORT - DK_VAT_ID - DO_CIE - EC_CI - EE_BUSINESS_REGISTRY_CODE - EE_ISIKUKOOD - EE_VAT_ID - ES_DNI - ES_DRIVERS_LICENSE - ES_NIF - ES_PASSPORT - ES_VAT_ID - ET_TIN - FI_HENKILOTUNNUS - FI_VAT_ID - FI_Y_TUNNUS - FR_BUSINESS_REGISTRATION_NUMBER - FR_DRIVERS_LICENSE - FR_NIR - FR_PASSPORT - FR_SPI - FR_VAT_ID - GA_NIF - GB_CRN - GB_DRIVERS_LICENSE - GB_NINO - GB_PASSPORT - GB_VAT_ID - GI_TIN_COMPANY - GR_AFM - GR_IDENTITY_CARD - GR_PASSPORT - GR_TIN_COMPANY - GR_VAT_ID - GT_NIT - HK_BRN - HK_CRN - HK_DRIVERS_LICENSE - HK_HKID - HK_PASSPORT - HK_TIN_COMPANY - HR_OIB - HR_TIN_COMPANY - HR_VAT_ID - HU_ADOAZONOSITO - HU_HUNGARY_TAX_ID - HU_IDENTITY_CARD - HU_PASSPORT - HU_VAT_ID - ID_KTP - IE_CRN - IE_DRIVERS_LICENSE - IE_PASSPORT - IE_PPS - IE_VAT_ID - IN_PAN - IS_KENNITALA - IT_CODICE_FISCALE - IT_DRIVERS_LICENSE - IT_PASSPORT - IT_REA - IT_VAT_ID - JP_CORPORATE_REGISTRATION_NUMBER - JP_DRIVERS_LICENSE - JP_MY_NUMBER - JP_PASSPORT - KE_KRA_PIN - KZ_IIN - LA_TIN - LI_PEID - LI_TIN_COMPANY - LI_VAT_ID - LT_ASMENS_KODAS - LT_TIN_COMPANY - LT_VAT_ID - LU_NIF - LU_RCS - LU_VAT_ID - LV_PASSPORT - LV_PERSONAS_KODS - LV_TIN_COMPANY - LV_VAT_ID - MD_NI - MG_NIF - MK_PIN - MN_TIN - MO_TIN - MT_TIN - MT_TIN_COMPANY - MT_VAT_ID - MX_CURP - MX_RFC_BUSINESS - MX_RFC_PERSON - MY_MYKAD - MZ_NUIT - NG_NIN - NL_BSN - NL_DRIVERS_LICENSE - NL_KVK - NL_PASSPORT - NL_VAT_ID - NO_FODSELSNUMMER - NO_ORGNR - NO_VAT_ID - NZ_DRIVERS_LICENSE - NZ_GST - NZ_IRD - NZ_NZBN - NZ_PASSPORT - PE_CUI - PK_CNIC - PK_SNIC - PL_PESEL - PL_REGON - PL_VAT_ID - PT_DRIVERS_LICENSE - PT_NIF - PT_NIPC - PT_PASSPORT - PT_VAT_ID - PY_CI - RO_CNP - RO_DRIVERS_LICENSE - RO_PASSPORT - RO_ROMANIA_TAX_ID - RO_VAT_ID - RW_TIN - SA_TIN - SE_DRIVERS_LICENSE - SE_ORGANISATIONSNUMMER - SE_PASSPORT - SE_PERSONNUMMER - SE_VAT_ID - SG_DRIVERS_LICENSE - SG_FIN - SG_NRIC - SG_PASSPORT - SG_UEN - SG_UIN - SI_TIN - SI_TIN_COMPANY - SI_VAT_ID - SK_BUSINESS_REGISTRATION_NUMBER - SK_DIC - SK_VAT_ID - TH_PIN - TR_TIN - US_BUSINESS_LICENSE_NUMBER - US_DRIVERS_LICENSE - US_EIN - US_ITIN - US_PASSPORT - US_SSN - US_SSN_LAST4 - UY_CI - ZA_SAID -} - -""" -A group of users. -""" -type Group implements Node { - """ - Returns a summary of the group's access permissions. - """ - accessSummary: AccessSummary! - - """ - Returns all aggregated role assignments for the group. - """ - aggregatedRoleAssignments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AccessAggregatedRoleAssignmentConnection - description: String - - """ - The ID for an object. - """ - id: GlobalID! - name: String! - - """ - Returns the plus role for the group if the group is un-migrated. - """ - plusRole: Role - queryComplexity: Int! - queryDepth: Int! - - """ - Returns a list of Roles in alphabetical order. - """ - shopsAssignedFromRole( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - roleId: AccessRoleID! - ): ShopConnection! - storesList: StoresList! - type: GroupType! - useRbacAccess: Boolean! - usersCount: Int! -} - -""" -The connection type for Group. -""" -type GroupConnection { - """ - A list of edges. - """ - edges: [GroupEdge!]! - - """ - A list of nodes. - """ - nodes: [Group!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -Inputs for creating a group. -""" -input GroupCreateInput { - """ - The description of the group. - """ - description: String - - """ - The name of the group. - """ - name: String! - - """ - The array of role assignments to create for the group. - """ - roleAssignments: [RoleAssignmentInput!] -} - -""" -The result of creating a group. -""" -type GroupCreateResult { - """ - The group that was created. - """ - group: Group - - """ - Indicates whether the creation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -An edge in a connection. -""" -type GroupEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Group! -} - -""" -The ID for a Group. -""" -scalar GroupID - -enum GroupType { - STORE_GROUP - USER_GROUP -} - -""" -Inputs for updating a group. -""" -input GroupUpdateInput { - """ - The description of the group. - """ - description: String - - """ - The ID of the group. - """ - id: GroupID! - - """ - The name of the group. - """ - name: String - - """ - The array of role assignments to create or update for the group. - """ - roleAssignmentsToUpdate: [RoleAssignmentInput!] - - """ - The array of IDs of the roles to fully unassign from the group. - """ - rolesToUnassign: [AccessRoleID!] -} - -""" -The result of updating a group. -""" -type GroupUpdateResult { - """ - The group that was updated. - """ - group: Group - - """ - Indicates whether the creation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Inputs for deleting groups. -""" -input GroupsDeleteInput { - """ - The IDs of the Groups to delete. - """ - ids: [GroupID!]! -} - -""" -The result of deleting groups. -""" -type GroupsDeleteResult { - """ - The IDs of the deleted_groups. - """ - deletedIds: [GroupID!] - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -An ISO 8601-encoded date -""" -scalar ISO8601Date @specifiedBy(url: "https://tools.ietf.org/html/rfc3339") - -""" -An ISO 8601-encoded datetime -""" -scalar ISO8601DateTime @specifiedBy(url: "https://tools.ietf.org/html/rfc3339") - -""" -A single row result from a staff CSV import. -""" -type ImportRowResult { - """ - Error code for CSV validation errors. - """ - code: String - - """ - The email address from the CSV row. - """ - email: String - - """ - Error message if the row failed. - """ - error: String - - """ - Validation error message for CSV-level errors. - """ - message: String - - """ - The operation attempted: create, suspend, or reactivate. - """ - operation: String - - """ - The CSV row number this result corresponds to. - """ - rowNumber: Int - - """ - The result status: imported, failed, or skipped. - """ - status: String -} - -input IndividualInput { - """ - The existing person to associate with the entity. - """ - existingPerson: UpdatePersonInput - - """ - The first name of the individual. - """ - firstName: String @deprecated(reason: "Use person argument instead") - - """ - The last name of the individual. - """ - lastName: String @deprecated(reason: "Use person argument instead") - - """ - The new individual associated to the entity. - """ - person: CreatePersonInput - - """ - The person in the organization to associate with the entity. - """ - personId: PersonID @deprecated(reason: "Use existing_person argument instead") -} - -""" -Represents untyped JSON -""" -scalar JSON - -type LegacyOrganizationUser implements Node & OrganizationUserInterface { - """ - Returns a summary of the user's access permissions. - """ - accessSummary: AccessSummary - admin: Boolean! - administrativePermissions: [String!] - - """ - Returns all aggregated role assignments for the user. - """ - aggregatedRoleAssignments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AccessAggregatedRoleAssignmentConnection - - """ - Returns all groups that can be assigned to the user. - """ - assignableGroups( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GroupConnection - - """ - Returns whether the requester can resend the invitation for the target. - """ - canResendInvite( - """ - The target invited organization user. - """ - targetOrganizationUserId: OrganizationUserID! - ): Boolean! - collaboratorAccess: CollaboratorAccessStatus - - """ - A summary of collaborator relationship access for the user. - """ - collaboratorRelationshipAccessSummary: CollaboratorRelationshipAccessSummary - createdAt: ISO8601DateTime! - createdBy: OrganizationUser - email: String! - generatePinForShop(length: Int, shopifyShopId: PropertyPublicID!): String - - """ - Returns a list of groups assigned to the user. - """ - groups( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GroupConnection! - hasManageCollaboratorShopPermission: Boolean! - id: GlobalID! - isPinEasyToGuessForShop(pin: String!, shopifyShopId: PropertyPublicID!): EasyToGuessPinResponse - isShopifyEmployee: Boolean! - legacyUserType: LegacyUser! - migratableToRbacByRequester: Boolean! - - """ - Organization-wide access conditions applied to the user. - """ - organizationAccessConditions: [String!]! - organizationPermissions: [String!]! - partnerPermissions: [String!] - privateData: PrivateData! - queryComplexity: Int! - queryDepth: Int! - rbacBannerCode: String - - """ - Returns a list of retail accesses for the user. - """ - retailAccesses( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): RetailAccessConnection! - role: Role - - """ - Returns a list of roles assigned to the user. - """ - roles( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AccessRoleConnection! - samlEnforcementState: UserSamlEnforcementState! - shopAccess: ShopAccess - shopAccessDetailsByShopifyShopId(shopifyShopId: PropertyPublicID!): UserShopAccessDetails - shopifyUserId: String - - """ - Returns a list of Roles in alphabetical order. - """ - shopsAssignedFromRole( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - roleId: AccessRoleID! - ): ShopConnection! - status: OrganizationUserStatus! - - """ - A summary of current store access for the user (legacy or RBAC). - """ - storeAccessSummary: StoreAccessSummary - tfaEnforced: Boolean! - useRbacAccess: Boolean! - verifiedOrganizationDomain: Boolean! - wasSubAdmin: Boolean! -} - -enum LegacyUser { - """ - The user is a collaborator account. - """ - COLLABORATOR - - """ - The user is a Legacy Shopify account. - """ - LEGACY_STAFF - - """ - The user has POS access. - """ - POS_ACCESS -} - -type LegalEntity implements Node { - accountRepresentative: Principal - addresses: [Address!] - - """ - Whether the legal entity can be archived. - """ - archivable: Boolean! - - """ - Archival status of the legal entity. - """ - archived: Boolean! - - """ - People that can be associated with the legal entity as a principal - """ - assignablePeople( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - ): PersonConnection - - """ - Attestations recorded against this legal entity. - """ - attestations( - activeOnly: Boolean - - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - attestationTypeHandle: AttestationTypeHandle - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AttestationConnection - category: Category! - - """ - Connected shops for the legal entity - """ - connectedShops: [Shop!] @deprecated(reason: "Use connectedShopsConnection for paginated access.") - - """ - Paginated connected shops for this legal entity. Pagination is limited to 1000 results; Snapshot data may be stale. - """ - connectedShopsConnection( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ConnectedShopsConnection - countryCode: CountryCode! - - """ - The date and time when the legal entity was created. - """ - createdAt: ISO8601DateTime! - displayName: String - entityPrincipals( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - sort: PrincipalSortField - ): PrincipalConnection - - """ - Returns a GovernmentIdentifier by the specified ID. - """ - governmentIdentifier(id: GovernmentIdentifierID!): GovernmentIdentifier - governmentIdentifiers: [GovernmentIdentifier!] - - """ - The ID for an object. - """ - id: GlobalID! - isRegistered: Boolean! - legalEntityType: LegalEntityType - - """ - The legal name of the entity. For individuals, returns the person's full name. - For businesses, returns the registered business name. - """ - legalName: String - - """ - The legal name variants (e.g., kanji, kana) - """ - legalNameVariants: [NameVariant!] - nickname: String - - """ - The total equity owned by all principals - """ - ownedEquity: Float - phoneNumber: String - - """ - Returns a Principal by the specified ID. - """ - principal(id: PrincipalID!): Principal - principals: [Principal!] @deprecated(reason: "Use the 'entity_principals' connection instead") - principalsCount: Int! - queryComplexity: Int! - queryDepth: Int! - - """ - The registered business name. Only applicable for business entities. Returns nil for individuals. - """ - registeredBusinessName: String - - """ - Returns a SupportingDocument by the specified ID. - """ - supportingDocument(id: SupportingDocumentID!): SupportingDocument - supportingDocuments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): SupportingDocumentConnection - taxPreferenceGovernmentIdentifier: GovernmentIdentifier - tradeName: String @deprecated(reason: "Trade name is deprecated from Legal Entity scope and will be replaced with a shop scope field.") - - """ - The trade name variants (e.g., kanji, kana) - """ - tradeNameVariants: [NameVariant!] @deprecated(reason: "Trade name is deprecated from Legal Entity scope and will be replaced with a shop scope field.") - - """ - The date and time when the legal entity was last updated. - """ - updatedAt: ISO8601DateTime! -} - -""" -The connection type for LegalEntity. -""" -type LegalEntityConnection { - """ - A list of edges. - """ - edges: [LegalEntityEdge!]! - - """ - A list of nodes. - """ - nodes: [LegalEntity!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type LegalEntityEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: LegalEntity! -} - -""" -Filter fields for legal entities. -""" -enum LegalEntityFilterField { - """ - Filter by archived status. - """ - ARCHIVED - - """ - Filter by category. - """ - CATEGORY - - """ - Filter by country code. - """ - COUNTRY_CODE - - """ - Filter by legal entity type. - """ - LEGAL_ENTITY_TYPE -} - -""" -Filter for legal entities. -""" -input LegalEntityFilterInput { - field: LegalEntityFilterField! - operator: LegalEntityFilterOperator! - value: String! -} - -""" -Operators for filtering legal entities. -""" -enum LegalEntityFilterOperator { - """ - Equals operator. - """ - EQUALS - - """ - Not equals operator. - """ - NOT_EQUALS -} - -""" -The ID for a LegalEntity. -""" -scalar LegalEntityID - -""" -Input describing a legal entity being added to an organization, to check for existing conflicts. -""" -input LegalEntityMatchInput { - """ - Government identifiers for the entity. - """ - governmentIdentifiers: [EntityMatchGovIdInput!] - - """ - Legal entity type handle. Individual handles resolve to NO_MATCH; use resolvePersonMatch instead. - """ - legalEntityType: LegalEntityTypeInput! - - """ - Registered business name. Compared after sanitization. If neither - registeredBusinessName nor governmentIdentifiers is provided, the matcher - returns NO_MATCH. - """ - registeredBusinessName: String -} - -type LegalEntityResult { - legalEntity: LegalEntity - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Sort options for legal entities queries. -""" -enum LegalEntitySortField { - """ - Sort by country code ascending. - """ - COUNTRY_CODE_ASC - - """ - Sort by country code descending. - """ - COUNTRY_CODE_DESC - - """ - Sort by display name ascending. - """ - DISPLAY_NAME_ASC - - """ - Sort by display name descending. - """ - DISPLAY_NAME_DESC - - """ - Sort by legal entity type ascending. - """ - LEGAL_ENTITY_TYPE_ASC - - """ - Sort by legal entity type descending. - """ - LEGAL_ENTITY_TYPE_DESC - - """ - Sort by legal name ascending. - """ - LEGAL_NAME_ASC - - """ - Sort by legal name descending. - """ - LEGAL_NAME_DESC - - """ - Sort by nickname ascending. - """ - NICKNAME_ASC - - """ - Sort by nickname descending. - """ - NICKNAME_DESC -} - -type LegalEntityTaxFilingPreference implements Node { - governmentIdentifier: GovernmentIdentifier! - - """ - The ID for an object. - """ - id: GlobalID! - preferredEntity: LegalEntity! - preferredEntityType: String! - queryComplexity: Int! - queryDepth: Int! -} - -type LegalEntityType { - category: String! - country: String! - countryCode: CountryCodeWithDefault! - description: String - handle: String! - jurisdiction: String! - name: String! - nativeName: String! @deprecated(reason: "This field is deprecated. Please use native_names instead.") - nativeNames: [String!]! - subcategory: String -} - -enum LegalEntityTypeInput { - AE_COMPANY_FREE_ZONE_ESTABLISHMENT - AE_COMPANY_FREE_ZONE_LLC - AE_COMPANY_LLC - AE_COMPANY_SOLE_ESTABLISHMENT - AT_COMPANY_INCORPORATED_PARTNERSHIP - AT_COMPANY_PRIVATE_CORPORATION - AT_COMPANY_UNINCORPORATED_PARTNERSHIP - AT_INDIVIDUAL_INDIVIDUAL - AT_NON_PROFIT_INCORPORATED_NON_PROFIT - AT_NON_PROFIT_UNINCORPORATED_NON_PROFIT - AU_COMPANY_PRIVATE_CORPORATION - AU_COMPANY_PRIVATE_PARTNERSHIP - AU_COMPANY_PUBLIC_COMPANY - AU_COMPANY_PUBLIC_CORPORATION - AU_COMPANY_PUBLIC_PARTNERSHIP - AU_COMPANY_SOLE_PROPRIETORSHIP - AU_INDIVIDUAL_INDIVIDUAL - AU_NON_PROFIT_NON_PROFIT - AU_NON_PROFIT_UNINCORPORATED_ASSOCIATION - BE_COMPANY_INCORPORATED_PARTNERSHIP - BE_COMPANY_PRIVATE_CORPORATION - BE_COMPANY_PUBLIC_CORPORATION - BE_COMPANY_UNINCORPORATED_PARTNERSHIP - BE_INDIVIDUAL_INDIVIDUAL - BE_NON_PROFIT_INCORPORATED_NON_PROFIT - BE_NON_PROFIT_UNINCORPORATED_NON_PROFIT - BG_COMPANY_INCORPORATED_PARTNERSHIP - BG_COMPANY_PRIVATE_CORPORATION - BG_COMPANY_PUBLIC_CORPORATION - BG_COMPANY_UNINCORPORATED_PARTNERSHIP - BG_INDIVIDUAL_INDIVIDUAL - BG_NON_PROFIT_INCORPORATED_NON_PROFIT - BG_NON_PROFIT_UNINCORPORATED_NON_PROFIT - CA_COMPANY_PRIVATE_CORPORATION - CA_COMPANY_PRIVATE_PARTNERSHIP - CA_COMPANY_SOLE_PROPRIETORSHIP - CA_INDIVIDUAL_INDIVIDUAL - CA_NON_PROFIT_NON_PROFIT - CA_NON_PROFIT_REGISTERED_CHARITY - CH_COMPANY_INCORPORATED_PARTNERSHIP - CH_COMPANY_PRIVATE_CORPORATION - CH_COMPANY_PUBLIC_CORPORATION - CH_COMPANY_UNINCORPORATED_PARTNERSHIP - CH_INDIVIDUAL_INDIVIDUAL - CH_NON_PROFIT_INCORPORATED_NON_PROFIT - CH_NON_PROFIT_UNINCORPORATED_NON_PROFIT - CY_COMPANY_INCORPORATED_PARTNERSHIP - CY_COMPANY_PRIVATE_CORPORATION - CY_COMPANY_PUBLIC_CORPORATION - CY_COMPANY_UNINCORPORATED_PARTNERSHIP - CY_INDIVIDUAL_INDIVIDUAL - CY_NON_PROFIT_INCORPORATED_NON_PROFIT - CY_NON_PROFIT_UNINCORPORATED_NON_PROFIT - CZ_COMPANY_INCORPORATED_PARTNERSHIP - CZ_COMPANY_PRIVATE_CORPORATION - CZ_COMPANY_PUBLIC_CORPORATION - CZ_COMPANY_UNINCORPORATED_PARTNERSHIP - CZ_INDIVIDUAL_INDIVIDUAL - CZ_NON_PROFIT_INCORPORATED_NON_PROFIT - CZ_NON_PROFIT_UNINCORPORATED_NON_PROFIT - DEFAULT_COMPANY - DEFAULT_INDIVIDUAL - DEFAULT_NON_PROFIT - DE_COMPANY_INCORPORATED_PARTNERSHIP - DE_COMPANY_PRIVATE_CORPORATION - DE_COMPANY_PUBLIC_CORPORATION - DE_COMPANY_UNINCORPORATED_PARTNERSHIP - DE_NON_PROFIT_INCORPORATED_NON_PROFIT - DE_NON_PROFIT_UNINCORPORATED_NON_PROFIT - DK_COMPANY_INCORPORATED_PARTNERSHIP - DK_COMPANY_PRIVATE_CORPORATION - DK_COMPANY_UNINCORPORATED_PARTNERSHIP - DK_INDIVIDUAL_INDIVIDUAL - DK_NON_PROFIT_INCORPORATED_NON_PROFIT - DK_NON_PROFIT_UNINCORPORATED_NON_PROFIT - EE_COMPANY_INCORPORATED_PARTNERSHIP - EE_COMPANY_PRIVATE_CORPORATION - EE_COMPANY_UNINCORPORATED_PARTNERSHIP - EE_INDIVIDUAL_INDIVIDUAL - EE_NON_PROFIT_INCORPORATED_NON_PROFIT - EE_NON_PROFIT_UNINCORPORATED_NON_PROFIT - ES_COMPANY_INCORPORATED_PARTNERSHIP - ES_COMPANY_PRIVATE_CORPORATION - ES_COMPANY_UNINCORPORATED_PARTNERSHIP - ES_INDIVIDUAL_INDIVIDUAL - ES_NON_PROFIT_INCORPORATED_NON_PROFIT - ES_NON_PROFIT_UNINCORPORATED_NON_PROFIT - FI_COMPANY_INCORPORATED_PARTNERSHIP - FI_COMPANY_PRIVATE_CORPORATION - FI_COMPANY_PUBLIC_CORPORATION - FI_COMPANY_UNINCORPORATED_PARTNERSHIP - FI_INDIVIDUAL_INDIVIDUAL - FI_NON_PROFIT_INCORPORATED_NON_PROFIT - FI_NON_PROFIT_UNINCORPORATED_NON_PROFIT - FR_COMPANY_INCORPORATED_PARTNERSHIP - FR_COMPANY_PRIVATE_CORPORATION - FR_COMPANY_PUBLIC_COMPANY - FR_COMPANY_SOLE_PROPRIETORSHIP - FR_GOVERNMENT_GOVERNMENT_AGENCY - FR_NON_PROFIT_INCORPORATED_NON_PROFIT - GB_COMPANY_INCORPORATED_PARTNERSHIP - GB_COMPANY_PRIVATE_CORPORATION - GB_COMPANY_UNINCORPORATED_PARTNERSHIP - GB_INDIVIDUAL_INDIVIDUAL - GB_NON_PROFIT_INCORPORATED_NON_PROFIT - GB_NON_PROFIT_UNINCORPORATED_NON_PROFIT - GI_COMPANY_INCORPORATED_PARTNERSHIP - GI_COMPANY_PRIVATE_CORPORATION - GI_COMPANY_PUBLIC_CORPORATION - GI_COMPANY_UNINCORPORATED_PARTNERSHIP - GI_INDIVIDUAL_INDIVIDUAL - GI_NON_PROFIT_INCORPORATED_NON_PROFIT - GI_NON_PROFIT_UNINCORPORATED_NON_PROFIT - GR_COMPANY_INCORPORATED_PARTNERSHIP - GR_COMPANY_PRIVATE_CORPORATION - GR_COMPANY_PUBLIC_CORPORATION - GR_COMPANY_UNINCORPORATED_PARTNERSHIP - GR_INDIVIDUAL_INDIVIDUAL - GR_NON_PROFIT_INCORPORATED_NON_PROFIT - GR_NON_PROFIT_UNINCORPORATED_NON_PROFIT - HK_COMPANY_PRIVATE_CORPORATION - HK_COMPANY_PRIVATE_PARTNERSHIP - HK_COMPANY_SOLE_PROPRIETORSHIP - HK_INDIVIDUAL_INDIVIDUAL - HK_NON_PROFIT_INCORPORATED_NON_PROFIT - HK_NON_PROFIT_UNINCORPORATED_NON_PROFIT - HR_COMPANY_INCORPORATED_PARTNERSHIP - HR_COMPANY_PRIVATE_CORPORATION - HR_COMPANY_PUBLIC_CORPORATION - HR_COMPANY_UNINCORPORATED_PARTNERSHIP - HR_INDIVIDUAL_INDIVIDUAL - HR_NON_PROFIT_INCORPORATED_NON_PROFIT - HR_NON_PROFIT_UNINCORPORATED_NON_PROFIT - HU_COMPANY_INCORPORATED_PARTNERSHIP - HU_COMPANY_PRIVATE_CORPORATION - HU_COMPANY_PUBLIC_CORPORATION - HU_COMPANY_UNINCORPORATED_PARTNERSHIP - HU_INDIVIDUAL_INDIVIDUAL - HU_NON_PROFIT_INCORPORATED_NON_PROFIT - HU_NON_PROFIT_UNINCORPORATED_NON_PROFIT - IE_COMPANY_INCORPORATED_PARTNERSHIP - IE_COMPANY_PRIVATE_CORPORATION - IE_COMPANY_PUBLIC_CORPORATION - IE_COMPANY_UNINCORPORATED_PARTNERSHIP - IE_INDIVIDUAL_INDIVIDUAL - IE_NON_PROFIT_INCORPORATED_NON_PROFIT - IE_NON_PROFIT_UNINCORPORATED_NON_PROFIT - IN_COMPANY_LIMITED_LIABILITY_PARTNERSHIP - IN_COMPANY_PRIVATE_COMPANY - IN_COMPANY_PUBLIC_COMPANY - IN_COMPANY_SOLE_PROPRIETORSHIP - IS_COMPANY_INCORPORATED_PARTNERSHIP - IS_COMPANY_PRIVATE_CORPORATION - IS_COMPANY_PUBLIC_CORPORATION - IS_COMPANY_UNINCORPORATED_PARTNERSHIP - IS_NON_PROFIT_INCORPORATED_NON_PROFIT - IS_NON_PROFIT_UNINCORPORATED_NON_PROFIT - IT_COMPANY_INCORPORATED_PARTNERSHIP - IT_COMPANY_PRIVATE_CORPORATION - IT_COMPANY_UNINCORPORATED_PARTNERSHIP - IT_INDIVIDUAL_INDIVIDUAL - IT_NON_PROFIT_INCORPORATED_NON_PROFIT - IT_NON_PROFIT_UNINCORPORATED_NON_PROFIT - JP_COMPANY_PRIVATE_CORPORATION - JP_COMPANY_SOLE_PROPRIETORSHIP - JP_NON_PROFIT_NON_PROFIT - LI_COMPANY_INCORPORATED_PARTNERSHIP - LI_COMPANY_PRIVATE_CORPORATION - LI_COMPANY_PUBLIC_CORPORATION - LI_COMPANY_UNINCORPORATED_PARTNERSHIP - LI_INDIVIDUAL_INDIVIDUAL - LI_NON_PROFIT_INCORPORATED_NON_PROFIT - LI_NON_PROFIT_UNINCORPORATED_NON_PROFIT - LT_COMPANY_INCORPORATED_PARTNERSHIP - LT_COMPANY_PRIVATE_CORPORATION - LT_COMPANY_PUBLIC_CORPORATION - LT_COMPANY_UNINCORPORATED_PARTNERSHIP - LT_INDIVIDUAL_INDIVIDUAL - LT_NON_PROFIT_INCORPORATED_NON_PROFIT - LT_NON_PROFIT_UNINCORPORATED_NON_PROFIT - LU_COMPANY_INCORPORATED_PARTNERSHIP - LU_COMPANY_PRIVATE_CORPORATION - LU_COMPANY_PUBLIC_CORPORATION - LU_COMPANY_UNINCORPORATED_PARTNERSHIP - LU_INDIVIDUAL_INDIVIDUAL - LU_NON_PROFIT_INCORPORATED_NON_PROFIT - LU_NON_PROFIT_UNINCORPORATED_NON_PROFIT - LV_COMPANY_INCORPORATED_PARTNERSHIP - LV_COMPANY_PRIVATE_CORPORATION - LV_COMPANY_PUBLIC_CORPORATION - LV_COMPANY_UNINCORPORATED_PARTNERSHIP - LV_INDIVIDUAL_INDIVIDUAL - LV_NON_PROFIT_INCORPORATED_NON_PROFIT - LV_NON_PROFIT_UNINCORPORATED_NON_PROFIT - MC_COMPANY_INCORPORATED_PARTNERSHIP - MC_COMPANY_PRIVATE_CORPORATION - MC_COMPANY_PUBLIC_CORPORATION - MC_COMPANY_UNINCORPORATED_PARTNERSHIP - MC_NON_PROFIT_INCORPORATED_NON_PROFIT - MC_NON_PROFIT_UNINCORPORATED_NON_PROFIT - MT_COMPANY_INCORPORATED_PARTNERSHIP - MT_COMPANY_PRIVATE_CORPORATION - MT_COMPANY_PUBLIC_CORPORATION - MT_COMPANY_UNINCORPORATED_PARTNERSHIP - MT_INDIVIDUAL_INDIVIDUAL - MT_NON_PROFIT_INCORPORATED_NON_PROFIT - MT_NON_PROFIT_UNINCORPORATED_NON_PROFIT - MX_COMPANY_PRIVATE_CORPORATION - MX_INDIVIDUAL_INDIVIDUAL - MX_NON_PROFIT_NON_PROFIT - NL_COMPANY_INCORPORATED_PARTNERSHIP - NL_COMPANY_PRIVATE_CORPORATION - NL_COMPANY_SOLE_PROPRIETORSHIP - NL_COMPANY_UNINCORPORATED_PARTNERSHIP - NL_INDIVIDUAL_INDIVIDUAL - NL_NON_PROFIT_INCORPORATED_NON_PROFIT - NL_NON_PROFIT_UNINCORPORATED_NON_PROFIT - NO_COMPANY_INCORPORATED_PARTNERSHIP - NO_COMPANY_PRIVATE_CORPORATION - NO_COMPANY_UNINCORPORATED_PARTNERSHIP - NO_INDIVIDUAL_INDIVIDUAL - NO_NON_PROFIT_INCORPORATED_NON_PROFIT - NO_NON_PROFIT_UNINCORPORATED_NON_PROFIT - NZ_COMPANY_PRIVATE_CORPORATION - NZ_COMPANY_PRIVATE_PARTNERSHIP - NZ_COMPANY_SOLE_PROPRIETORSHIP - NZ_INDIVIDUAL_INDIVIDUAL - NZ_NON_PROFIT_INCORPORATED_NON_PROFIT - NZ_NON_PROFIT_NON_PROFIT - NZ_NON_PROFIT_UNINCORPORATED_NON_PROFIT - PL_COMPANY_INCORPORATED_PARTNERSHIP - PL_COMPANY_PRIVATE_CORPORATION - PL_COMPANY_PUBLIC_CORPORATION - PL_COMPANY_UNINCORPORATED_PARTNERSHIP - PL_INDIVIDUAL_INDIVIDUAL - PL_NON_PROFIT_INCORPORATED_NON_PROFIT - PL_NON_PROFIT_UNINCORPORATED_NON_PROFIT - PT_COMPANY_INCORPORATED_PARTNERSHIP - PT_COMPANY_PRIVATE_CORPORATION - PT_COMPANY_UNINCORPORATED_PARTNERSHIP - PT_INDIVIDUAL_INDIVIDUAL - PT_NON_PROFIT_INCORPORATED_NON_PROFIT - PT_NON_PROFIT_UNINCORPORATED_NON_PROFIT - RO_COMPANY_INCORPORATED_PARTNERSHIP - RO_COMPANY_PRIVATE_CORPORATION - RO_COMPANY_PUBLIC_CORPORATION - RO_COMPANY_UNINCORPORATED_PARTNERSHIP - RO_INDIVIDUAL_INDIVIDUAL - SE_COMPANY_INCORPORATED_PARTNERSHIP - SE_COMPANY_PRIVATE_CORPORATION - SE_COMPANY_PUBLIC_CORPORATION - SE_COMPANY_UNINCORPORATED_PARTNERSHIP - SE_INDIVIDUAL_INDIVIDUAL - SE_NON_PROFIT_INCORPORATED_NON_PROFIT - SE_NON_PROFIT_UNINCORPORATED_NON_PROFIT - SG_COMPANY_PRIVATE_CORPORATION - SG_COMPANY_PRIVATE_PARTNERSHIP - SG_COMPANY_SOLE_PROPRIETORSHIP - SG_NON_PROFIT_NON_PROFIT - SI_COMPANY_INCORPORATED_PARTNERSHIP - SI_COMPANY_PRIVATE_CORPORATION - SI_COMPANY_PUBLIC_CORPORATION - SI_COMPANY_UNINCORPORATED_PARTNERSHIP - SI_INDIVIDUAL_INDIVIDUAL - SI_NON_PROFIT_INCORPORATED_NON_PROFIT - SI_NON_PROFIT_UNINCORPORATED_NON_PROFIT - SK_COMPANY_INCORPORATED_PARTNERSHIP - SK_COMPANY_PRIVATE_CORPORATION - SK_COMPANY_PUBLIC_CORPORATION - SK_COMPANY_SOLE_PROPRIETORSHIP - SK_COMPANY_UNINCORPORATED_PARTNERSHIP - SK_NON_PROFIT_INCORPORATED_NON_PROFIT - SK_NON_PROFIT_UNINCORPORATED_NON_PROFIT - SM_COMPANY_INCORPORATED_PARTNERSHIP - SM_COMPANY_PRIVATE_CORPORATION - SM_COMPANY_PUBLIC_CORPORATION - SM_COMPANY_UNINCORPORATED_PARTNERSHIP - SM_NON_PROFIT_INCORPORATED_NON_PROFIT - SM_NON_PROFIT_UNINCORPORATED_NON_PROFIT - TH_COMPANY_INCORPORATED_PARTNERSHIP - TH_COMPANY_PRIVATE_CORPORATION - TH_COMPANY_SOLE_PROPRIETORSHIP - TH_COMPANY_UNINCORPORATED_PARTNERSHIP - US_COMPANY_LLC - US_COMPANY_MULTI_MEMBER_LLC - US_COMPANY_PRIVATE_CORPORATION - US_COMPANY_PRIVATE_PARTNERSHIP - US_COMPANY_PUBLIC_CORPORATION - US_COMPANY_PUBLIC_PARTNERSHIP - US_COMPANY_SINGLE_MEMBER_LLC - US_COMPANY_SOLE_PROPRIETORSHIP - US_COMPANY_UNINCORPORATED_ASSOCIATION - US_INDIVIDUAL_INDIVIDUAL - US_NON_PROFIT_INCORPORATED_NON_PROFIT - US_NON_PROFIT_NON_PROFIT - US_NON_PROFIT_UNINCORPORATED_NON_PROFIT -} - -input LegalNameVariantInput { - """ - The legal entity name in this variant - """ - name: String - - """ - The type of name variant - """ - variantType: AlphabetType! -} - -""" -The input fields used to determine which locations a retail user has access to. -""" -input LocationAssignmentsInput { - """ - Whether the retail user should have access to all locations. - """ - allLocationsAccess: Boolean = false - - """ - The locations to add to the retail user, i.e. ['gid://shopify/Location/11']. - """ - shopifyLocationIdsToAdd: [ID!] - - """ - The locations to remove from the retail user, i.e. ['gid://shopify/Location/12']. - """ - shopifyLocationIdsToRemove: [ID!] - - """ - The shopify shop id to assign locations to, i.e. 'gid://organization/ShopifyShop/10'. - """ - shopifyShopId: PropertyPublicID! -} - -type MarketsHomeRollbackCompatibleResult { - """ - The reasons why the shop cannot rollback from Markets Home - """ - incompatibleReasons: [String!]! - - """ - Whether the shop can rollback from Markets Home - """ - isCompatible: Boolean! -} - -type MarketsHomeRolloutCompatibleResult { - """ - The apps that are incompatible with Markets Home - """ - incompatibleApps: [String!]! - - """ - Whether the shop can rollout Markets Home - """ - isCompatible: Boolean! -} - -""" -A monetary value with currency -""" -type Money { - """ - Amount of the money - """ - amount: Decimal! - - """ - Currency of the money - """ - currencyCode: CurrencyCode! -} - -type Mutation { - """ - Change organization owner. - """ - accessOrganizationOwnerChange(input: AccessOrganizationOwnerChangeInput!): AccessOrganizationOwnerChangeResult! - - """ - Add access role (RBAC based) for an organization. - """ - accessRoleCreate(roleCreateInput: AccessRoleCreateInput!): AccessRoleCreateResult - - """ - Delete role for an organization. - """ - accessRoleDelete(accessRoleDeleteInput: AccessRoleDeleteInput!): AccessRoleDeleteResult! - - """ - Duplicate a role for an organization. - """ - accessRoleDuplicate(accessRoleDuplicateInput: AccessRoleDuplicateInput!): AccessRoleDuplicateResult! - - """ - Update role for an organization. - """ - accessRoleUpdate(accessRoleUpdateInput: AccessRoleUpdateInput!): AccessRoleUpdateResult! - - """ - Delete roles for an organization. - """ - accessRolesDelete(accessRolesDeleteInput: AccessRolesDeleteInput!): RolesDeleteResult! - - """ - Change store owner. - """ - accessStoreOwnerChange(input: AccessStoreOwnerChangeInput!): AccessStoreOwnerChangeResult! - - """ - Add role for an organization. - """ - addRole(addRoleInput: AddRoleInput!): AddRoleResult! - - """ - Grant an organization user access to one or more shop properties. - """ - addShopAccess(newShopAccesses: [ShopAccessInput!]!, organizationUserId: OrganizationUserID!): UpdateOrganizationUserResult! - - """ - Archive a legal entity. - """ - archiveLegalEntity(id: LegalEntityID!): LegalEntityResult! - - """ - Returns generated HMAC token used for authentication with Async notifications. - """ - argusToken: String - - """ - Assign organization owner (admin) for a Partner Organization User. - """ - assignPartnerOrganizationOwner(assignPartnerOrganizationOwnerInput: AssignPartnerOrganizationOwnerInput!): AssignPartnerOrganizationOwnerResult! - - """ - Adds a property to an Organization - """ - assignProperty(externalId: PropertyPublicID!, idempotencyKey: String!, offeringHandle: String!, organizationId: OrganizationID): PropertyResult! - - """ - Backfill partner organizations to shops relationships. - """ - backfillPartnerOrganizationsShopProperties(input: BackfillPartnerOrganizationsShopPropertiesInput!): BackfillPartnerOrganizationsShopPropertiesResult - - """ - Backfills Partner Organization User - """ - backfillPartnerUser(backfillPartnerUserInput: BackfillPartnerUserInput!): BackfillPartnerUserResult! - - """ - Bulk update role of organization users. - """ - bulkAssignOrganizationUserRole(bulkAssignRoleInput: BulkAssignRoleInput!): BulkAssignRoleResult! - - """ - Start a store copy operation. - """ - bulkDataStoreCopyStart(input: BulkDataStoreCopyStartInput!): BulkDataStoreCopyStartResult! - - """ - Start a store export operation. - """ - bulkDataStoreExportStart(input: BulkDataStoreExportStartInput!): BulkDataStoreExportStartResult! - - """ - Start a store import operation. - """ - bulkDataStoreImportStart(input: BulkDataStoreImportStartInput!): BulkDataStoreImportStartResult! - - """ - Bulk update test drive for shops. - """ - bulkUpdateTestDrive(input: TestDriveBulkUpdateInput!): TestDriveBulkUpdateResult - - """ - Cancel a pending shop transfer - """ - cancelShopTransfer(cancelShopTransferInput: CancelShopTransferInput!): CancelShopTransferResult! - - """ - Change Organization Domain enforcement states. - """ - changeDomainEnforcementState(changeDomainEnforcementStateInput: ChangeDomainEnforcementStateInput!): ChangeDomainEnforcementStateResult! - - """ - Accept collaborator request. - """ - collaboratorAccept(input: CollaboratorAcceptInput!): CollaboratorAcceptResult! - - """ - Convert users from SAML to standard login. - """ - convertUsersFromSaml(convertUsersFromSamlInput: ConvertUsersFromSamlInput!): ConvertUsersFromSamlResult! - - """ - Convert users to SAML users. - """ - convertUsersToSaml(convertUsersToSamlInput: ConvertUsersToSamlInput!): ConvertUsersToSamlResult! - - """ - Create an App Development Store. - """ - createAppDevelopmentStore( - """ - The developer preview handle if one is being enabled on this store. - """ - developerPreviewHandle: String - - """ - Whether the development store should have prepopulated test data. - """ - prepopulateTestData: Boolean = false - - """ - The key to lookup the price. This determines the entitlements for the shop. - """ - priceLookupKey: String! - - """ - The name of the shop. - """ - shopName: String! - ): CreateAppDevelopmentStoreResult! - - """ - Create an attestation. - """ - createAttestation(input: CreateAttestationInput!): CreateAttestationResult! - - """ - Creates a CLI token service account as an organization user with apps developer role. - """ - createCliTokenOrganizationUser(createCliTokenOrganizationUserInput: CreateCliTokenOrganizationUserInput!): CreateCliTokenOrganizationUserResult! - - """ - Creates a client development shop. - """ - createClientDevelopmentShop( - """ - The shops intended country code. - """ - countryCode: String! - - """ - The name of the shop. - """ - shopName: String! - - """ - Whether to create a Shopify Plus shop. - """ - withPlus: Boolean - ): CreateClientDevelopmentShopResult! - - """ - Create a collaborator relationship. - """ - createCollaboratorRelationship(collaboratorRelationshipCreateInput: CreateCollaboratorRelationshipInput!): CreateCollaboratorRelationshipResult! - - """ - Create a government identifier for a legal entity or for a person. - """ - createGovernmentIdentifier(createGovernmentIdentifierInput: CreateGovernmentIdentifierInput!): GovernmentIdentifierResult! - - """ - Create a government identifier for a legal entity. - """ - createGovernmentIdentifierForLegalEntity(createGovernmentIdentifierForLegalEntityInput: CreateGovernmentIdentifierForLegalEntityInput!): GovernmentIdentifierResult! @deprecated(reason: "Deprecated by createGovernmentIdentifier") - - """ - Create new legal entity and assign it to an organization. - """ - createLegalEntity(createLegalEntityInput: CreateLegalEntityInput!): LegalEntityResult! - - """ - Create new individual legal entity for a shop as part of the signup flow. - """ - createLegalEntityOnSignup(createLegalEntityOnSignupInput: CreateLegalEntityOnSignupInput!): LegalEntityResult! - - """ - Create a tax filing preference for a legal entity - """ - createLegalEntityTaxFilingPreference(governmentIdentifierId: GovernmentIdentifierID!, legalEntityId: LegalEntityID!): CreateLegalEntityTaxFilingPreferenceResult! - - """ - Create an Organization. - """ - createOrganization(organizationCreateInput: OrganizationCreateInput!): OrganizationResult! - - """ - Create an organization domain. - """ - createOrganizationDomain(createOrganizationDomainInput: CreateOrganizationDomainInput!): CreateOrganizationDomainResult! - - """ - Create one or more organization users. - """ - createOrganizationUsers(createOrganizationUsersInput: CreateOrganizationUsersInput!): CreateOrganizationUsersResult! - - """ - Create a Partner Organization. - """ - createPartnerOrganization(input: PartnerOrganizationCreateInput!): OrganizationResult! - - """ - Creates Partner Organization User - """ - createPartnerOrganizationUser(createPartnerOrganizationUserInput: CreatePartnerOrganizationUserInput!): CreatePartnerOrganizationUserResult! - - """ - Create a transfer record for a partner shop. - """ - createPartnerShopTransfer(input: CreatePartnerShopTransferInput!): CreatePartnerShopTransferResult - - """ - Create a person. - """ - createPerson(createPersonInput: CreatePersonInput!): PersonResult! - - """ - Create a person alias. - """ - createPersonAlias(createPersonAliasInput: CreatePersonAliasInput!): PersonAliasResult! - - """ - Create a principal. - """ - createPrincipal(createPrincipalInput: CreatePrincipalInput!): CreatePrincipalResult! - - """ - Create a property transfer request. - """ - createPropertyTransferRequest(input: CreatePropertyTransferRequestInput!): CreatePropertyTransferRequestResult - - """ - Creates a client development shop and the associated reseller relationship. - """ - createResellerDevelopmentShop( - """ - The email of the client to create the shop for. - """ - clientEmail: String! - - """ - The client's purchase order number. - """ - clientPurchaseOrderNumber: String - - """ - The shop's intended country code. - """ - countryCode: String! - - """ - The plan to use for the shop once transferred to the client. - """ - planName: String! - - """ - The number of POS Pro locations to create for the shop. - """ - posProLocationCount: Int! - - """ - The reseller's purchase order number. - """ - resellerPurchaseOrderNumber: String - - """ - The name of the shop. - """ - shopName: String! - - """ - The plan to use for the shop once transferred to the client. - """ - supportedPlanName: ResellerRelationshipSupportedPlans - - """ - Whether to transfer the shop to the client immediately after creation. - """ - transferToClientImmediately: Boolean! - ): CreateClientDevelopmentShopResult! - - """ - Create a Sandbox Organization. - """ - createSandboxOrganization(sandboxOrganizationCreateInput: OrganizationCreateInput!): OrganizationResult! - - """ - Create a store. - """ - createStore( - """ - The full store creation payload (shop signup input). - """ - storeCreatePayload: StoreCreatePayloadInput - ): CreateStoreResult! - - """ - Create a store addition request. - """ - createStoreAdditionRequest(input: CreateStoreAdditionRequestInput!): CreateStoreAdditionRequestResult - - """ - Create a vibe transfer request. - """ - createVibeTransferRequest(input: CreateVibeTransferRequestInput!): CreateVibeTransferRequestResult - - """ - Deletes a CLI token service account organization user. - """ - deleteCliTokenOrganizationUser(deleteCliTokenOrganizationUserInput: DeleteCliTokenOrganizationUserInput!): DeleteCliTokenOrganizationUserResult! - - """ - Delete a government identifier. - """ - deleteGovernmentIdentifiers(deleteGovernmentIdentifiersInput: DeleteGovernmentIdentifiersInput!): DeleteGovernmentIdentifiersResult! - - """ - Delete an organization domain. - """ - deleteOrganizationDomain(deleteOrganizationDomainInput: DeleteOrganizationDomainInput!): DeleteOrganizationDomainResult! - - """ - Bulk deletes Organization Users - """ - deleteOrganizationUsers(organizationUserIds: [OrganizationUserID!]!): DeleteOrganizationUsersResult! - - """ - Deletes Partner Organization User - """ - deletePartnerOrganizationUser(deletePartnerOrganizationUserInput: DeletePartnerOrganizationUserInput!): DeletePartnerOrganizationUserResult! - - """ - Delete people. - """ - deletePeople( - """ - The IDs of the people to delete. - """ - ids: [PersonID!]! - ): DeletePeopleResult! - - """ - Delete a person alias. - """ - deletePersonAlias(deletePersonAliasInput: DeletePersonAliasInput!): PersonAliasResult! - - """ - Delete principals. - """ - deletePrincipals( - """ - The IDs of the principals to delete. - """ - ids: [PrincipalID!]! - ): DeletePrincipalsResult! - - """ - Delete role for an organization. - """ - deleteRole(deleteRoleInput: DeleteRoleInput!): DeleteRoleResult! - - """ - Delete SAML integration. - """ - deleteSamlIntegration: DeleteSamlIntegrationResult! - - """ - Delete SCIM token for an organization. - """ - deleteScimToken: DeleteScimTokenResult! - - """ - Delete supporting documents. - """ - deleteSupportingDocuments( - """ - The IDs of the supporting documents to delete. - """ - ids: [SupportingDocumentID!]! - ): DeleteSupportingDocumentsResult! - - """ - End collaborator access for a shop. - """ - endCollaboration(endCollaborationInput: EndCollaborationInput!): EndCollaborationResult! - - """ - Enforce SAML organization domains onto organization. - """ - enforceSamlOrganizationDomains(enforceSamlOrganizationDomainsInput: EnforceSamlOrganizationDomainsInput!): EnforceSamlOrganizationDomainsResult! - - """ - Expire a collaborator relationship. - """ - expireCollaboratorRelationship(organizationId: OrganizationID!, shopifyShopId: PropertyPublicID!): ExpireCollaboratorRelationshipResult! - - """ - Export a resource. - """ - exportResource(exportResourceInput: ExportResourceInput!): ExportResourceResult - - """ - Finalize a CSV file upload for importing organization users. - """ - finalizeOrganizationUserImportCsvUpload(finalizeOrganizationUserImportCsvUploadInput: FinalizeOrganizationUserImportCsvUploadInput!): FinalizeOrganizationUserImportCsvUploadResult! - - """ - Finalize an upload for a supporting document. - """ - finalizeSupportingDocumentUpload(finalizeSupportingDocumentUploadInput: FinalizeSupportingDocumentUploadInput!): FinalizeSupportingDocumentResult! - - """ - Generate domain verification code for an organization. - """ - generateDomainVerificationCode(generateDomainVerificationCodeInput: GenerateDomainVerificationCodeInput!): GenerateDomainVerificationCodeResult! - - """ - Generate SCIM token for an organization. - """ - generateScimToken: GenerateScimTokenResult! - - """ - Create group on an organization. - """ - groupCreate(groupCreateInput: GroupCreateInput!): GroupCreateResult - - """ - Updates a group on an organization. - """ - groupUpdate(groupUpdateInput: GroupUpdateInput!): GroupUpdateResult - - """ - Delete groups on an organization. - """ - groupsDelete(groupsDeleteInput: GroupsDeleteInput!): GroupsDeleteResult! - - """ - Rollback an organization from using organization billing - """ - migrateFromOrganizationBilling(organizationId: OrganizationID): OrganizationResult! - - """ - Migrate an organization to use organization billing - """ - migrateToOrganizationBilling(organizationId: OrganizationID): OrganizationResult! - - """ - Update the status of a Partner Organization. - """ - organizationUpdateStatus(organizationUpdateStatusInput: OrganizationUpdateStatusInput!): OrganizationResult! - - """ - Deletes organization user. - """ - organizationUserDelete(input: OrganizationUserDeleteInput!): OrganizationUserDeleteResult! - - """ - Provision access to a shop for the requester - """ - organizationUserProvisionShopAccess(organizationUserProvisionShopAccessInput: OrganizationUserProvisionShopAccessInput!): OrganizationUserProvisionShopAccessResult! - - """ - Updates an organization user. - """ - organizationUserUpdate(organizationUserUpdateInput: OrganizationUserUpdateInput!): OrganizationUserUpdateResult! - - """ - Bulk assign a group to organization users. - """ - organizationUsersBulkGroupAssign(organizationUsersBulkGroupAssignInput: OrganizationUsersBulkGroupAssignInput!): OrganizationUserIdsResult! - - """ - Bulk assign roles to organization users. - """ - organizationUsersBulkRoleAssign(organizationUsersBulkRoleAssignInput: OrganizationUsersBulkRoleAssignInput!): OrganizationUserIdsResult! - - """ - Create organization users. - """ - organizationUsersCreate(organizationUsersCreateInput: OrganizationUsersCreateInput!): OrganizationUsersCreateResult! - - """ - Deletes an array of organization users. - """ - organizationUsersDelete(organizationUserIdsInput: OrganizationUserIdsInput!): OrganizationUsersDeleteResult! - - """ - Suspends or reactivates an array of organization users. - """ - organizationUsersUpdateStatus(organizationUsersUpdateStatusInput: OrganizationUsersUpdateStatusInput!): OrganizationUserIdsResult! - - """ - Enable RBAC for a Partner organization. Call this after inspecting migrated role data from partnersMigrationMigrateUsers. - """ - partnersMigrationEnableRbac(input: PartnersMigrationEnableRbacInput!): AccessPartnersMigrationEnableRbacResult - - """ - Migrate Partners users to Business Platform RBAC. - """ - partnersMigrationMigrateUsers(input: PartnersMigrationMigrateUsersInput!): AccessPartnersMigrationMigrateUsersResult - - """ - Removes store access from a legacy plus role. - """ - plusRoleRemoveStoreAccess(plusRoleRemoveStoreAccessInput: PlusRoleRemoveStoreAccessInput!): UpdateRoleResult! - - """ - Provision collaborator access for a shop. - """ - provisionCollaboratorAccess(provisionCollaboratorAccessInput: ProvisionCollaboratorAccessInput!): ProvisionCollaboratorAccessResult! - - """ - Updates an organization user, this mutation is only designed to be used by shopify proxy for POS App requests. - """ - proxyOrganizationUserUpdate(input: ProxyOrganizationUserUpdateInput!): ProxyOrganizationUserUpdateResult! - - """ - Creates a retail only organization user, this mutation is only designed to be used by shopify proxy for POS App requests. - """ - proxyRetailOnlyOrganizationUserCreate(input: ProxyRetailOnlyOrganizationUserCreateInput!): ProxyRetailOnlyOrganizationUserCreateResult! - - """ - Updates a retail only organization user, this mutation is only designed to be used by shopify proxy for POS App requests. - """ - proxyRetailOnlyOrganizationUserUpdate(input: ProxyRetailOnlyOrganizationUserUpdateInput!): ProxyRetailOnlyOrganizationUserUpdateResult! - - """ - Deletes a retail only user from the organization's shop, this mutation is only - designed to be used by shopify proxy for POS App requests. - """ - proxyRetailOnlyShopUserDelete(input: ProxyRetailOnlyShopUserDeleteInput!): ProxyRetailOnlyShopUserDeleteResult! - - """ - Reactivate suspended shop property access state. - """ - reactivateShopAccess(organizationUserId: OrganizationUserID!, shopifyShopId: PropertyPublicID!): UpdateOrganizationUserResult! - - """ - Remove role of an organization user. - """ - removeOrganizationUserRole(removeOrganizationUserRoleInput: RemoveOrganizationUserRoleInput!): RemoveOrganizationUserRoleResult! - - """ - Remove shop property access. - """ - removeShopAccess(organizationUserId: OrganizationUserID!, shopifyShopId: PropertyPublicID!): RemoveShopAccessResult! - - """ - Remove shop from an explicit non-plus organization. - """ - removeShopFromNonPlusOrganization(input: RemoveShopFromNonPlusOrganizationInput!): RemoveShopFromNonPlusOrganizationResult! - - """ - Request collaborator access for a shop. - """ - requestCollaboration(requestCollaborationInput: RequestCollaborationInput!): RequestCollaborationResult! - - """ - Re-request access for an expired collaborator relationship. - """ - rerequestCollaboratorRelationship(shopifyShopId: PropertyPublicID!): RerequestCollaboratorRelationshipResult! - - """ - Resends the invite email for an invited organization user. - """ - resendInviteEmail(organizationUserId: OrganizationUserID!): OrganizationUserIdResult! - - """ - Reset the TFA enforcement setting for an organization user. - """ - resetOrganizationUserTfa(resetOrganizationUserTfaInput: ResetOrganizationUserTfaInput!): ResetOrganizationUserTfaResult! - - """ - Re-syncs user data after a Partner hand-off ownership transfer - """ - resyncUserDataAfterPartnerHandoff(shopifyShopId: PropertyPublicID!, sourceOrganizationId: OrganizationID): ResyncUserDataAfterPartnerHandoffResult! - - """ - Update a retail only organization user. - """ - retailOnlyOrganizationUserUpdate(input: RetailOnlyOrganizationUserUpdateInput!): RetailOnlyOrganizationUserUpdateResult! - - """ - Create a retail only organization users. - """ - retailOnlyOrganizationUsersCreate(input: RetailOnlyOrganizationUsersCreateInput!): RetailOnlyOrganizationUsersCreateResult! - - """ - Set the billing_account_id and initial_billing_account_id for a shop in an organization. - """ - setOrganizationShopBillingAccountId(setOrganizationShopBillingAccountIdInput: SetOrganizationShopBillingAccountIdInput!): SetOrganizationShopBillingAccountIdResult! - - """ - Set the test drive status for a shop - """ - setShopTestDriveStatus(handle: String!, shopId: PropertyPublicID!, status: TestDriveShopStatus!): SetShopTestDriveStatusResult - - """ - Setting up SAML integration. - """ - setupSamlIntegration(setupSamlIntegrationInput: SetupSamlIntegrationInput!): SetupSamlIntegrationResult! - - """ - Update shop identification settings. - """ - shopIdentificationSettingsUpdate(code: String, icon: String, internalName: String, shopifyShopId: PropertyPublicID!): ShopIdentificationSettingsUpdateResult - - """ - Stage a CSV file upload for importing organization users. - """ - stageOrganizationUserImportCsvUpload(stageOrganizationUserImportCsvUploadInput: StageOrganizationUserImportCsvUploadInput!): StageOrganizationUserImportCsvUploadResult! - - """ - Stage an upload for a supporting document. - """ - stageSupportingDocumentUpload(stageSupportingDocumentUploadInput: StageSupportingDocumentUploadInput!): StageSupportingDocumentUploadResult! - - """ - Suspend shop property access state. - """ - suspendShopAccess(organizationUserId: OrganizationUserID!, shopifyShopId: PropertyPublicID!): UpdateOrganizationUserResult! - - """ - Sync the test drive status for a shop - """ - syncShopTestDriveStatus(handle: String!, shopId: PropertyPublicID!): SyncShopTestDriveStatusResult - - """ - Activate or deactivate a test drive feature for all shops in an organization - """ - toggleTestDriveForAllShops(input: ToggleTestDriveForAllShopsInput!): ToggleTestDriveForAllShopsResult - - """ - Transfer ownership of an Organization to another user - """ - transferOrganizationOwnership(input: OrganizationTransferOwnershipInput!): OrganizationTransferOwnershipResult! - - """ - Unarchive a legal entity. - """ - unarchiveLegalEntity(id: LegalEntityID!): LegalEntityResult! - - """ - Update a government identifier. - """ - updateGovernmentIdentifier(updateGovernmentIdentifierInput: UpdateGovernmentIdentifierInput!): GovernmentIdentifierResult! - - """ - Updates legacy partner user permissions - """ - updateLegacyPartnerUserPermissions(updateLegacyPartnerUserPermissionsInput: UpdateLegacyPartnerUserPermissionsInput!): UpdateLegacyPartnerUserPermissionsResult! - - """ - Update attributes of a legal entity. - """ - updateLegalEntity(updateLegalEntityInput: UpdateLegalEntityInput!): LegalEntityResult! - - """ - Update the organization name. - """ - updateOrganizationName(name: String!): OrganizationResult! - - """ - Update the TFA enforcement setting for an organization. - """ - updateOrganizationTfaEnforcement(updateOrganizationTfaEnforcementInput: UpdateOrganizationTfaEnforcementInput!): UpdateOrganizationTfaEnforcementResult! - - """ - Update an Organization User. - """ - updateOrganizationUser(updateOrganizationUserInput: UpdateOrganizationUserInput!): UpdateOrganizationUserResult! - - """ - Bulk updates Organization Users access state. - """ - updateOrganizationUserAccessState(active: Boolean!, organizationUserIds: [OrganizationUserID!]!): UpdateOrganizationUserAccessResult! - - """ - Update role of an organization user. - """ - updateOrganizationUserRole(updateOrganizationUserRoleInput: UpdateOrganizationUserRoleInput!): UpdateOrganizationUserRoleResult! - - """ - Update a Partner Organization. - """ - updatePartnerOrganization(updatePartnerOrganizationInput: UpdatePartnerOrganizationInput!): OrganizationResult! - - """ - Update a person. - """ - updatePerson(updatePersonInput: UpdatePersonInput!): PersonResult! - - """ - Update a person alias. - """ - updatePersonAlias(updatePersonAliasInput: UpdatePersonAliasInput!): PersonAliasResult! - - """ - Update a principal. - """ - updatePrincipal(updatePrincipalInput: UpdatePrincipalInput!): UpdatePrincipalResult! - - """ - Updates a reseller relationship. - """ - updateResellerRelationship( - """ - The input for updating the reseller relationship. - """ - resellerRelationshipUpdateInput: UpdateResellerRelationshipInput! - ): UpdateResellerRelationshipResult! - - """ - Update role for an organization. - """ - updateRole(updateRoleInput: UpdateRoleInput!): UpdateRoleResult! - - """ - Update the SAML certificate for an organization. - """ - updateSamlCertificate: UpdateSamlCertificateResult! - - """ - Update an Organization User's single shop access profile. - """ - updateShopAccessProfile(updateShopAccessProfileInput: UpdateShopAccessProfileInput!): UpdateShopAccessProfileResult! - - """ - Create or update a legal entity with all related entities in a single atomic operation. - """ - upsertLegalEntity(input: UpsertLegalEntityInput!): LegalEntityResult! - - """ - Update or create a test drive business feature setting - """ - upsertTestDriveBusinessFeatureSetting(input: UpsertTestDriveBusinessFeatureSettingInput!): UpsertTestDriveBusinessFeatureSettingResult -} - -type NameVariant { - firstName: String - fullName: String - lastName: String - middleName: String - - """ - The name in this variant - """ - name: String - prefix: String - suffix: String - - """ - The type of name variant (e.g., 'kanji', 'kana') - """ - variantType: String! -} - -input NameVariantInput { - """ - The first name in this variant. - """ - firstName: String - - """ - The last name in this variant. - """ - lastName: String - - """ - The middle name in this variant. - """ - middleName: String - - """ - The prefix in this variant. - """ - prefix: String - - """ - The suffix in this variant. - """ - suffix: String - - """ - The type of name variant - """ - variantType: AlphabetType! -} - -type NavigationSettings { - navigationItems: [NavigationSettingsItem!]! -} - -type NavigationSettingsItem { - children: [NavigationSettingsItem!]! - id: String! - title: String! - url: String! -} - -interface Node { - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! -} - -type Offering { - """ - Name of the offering - """ - handle: String! - - """ - Handle of the offering - """ - name: String! -} - -""" -Operators for filter queries. -""" -enum Operator { - """ - Between operator. - """ - BETWEEN - - """ - Equals operator. - """ - EQUALS - - """ - In operator. Accepts a comma-separated string of values (e.g. - "value1,value2,value3"). Not supported for all filter fields. - """ - IN -} - -type Organization implements Node { - """ - Returns a role if it exists. - """ - accessRole(id: AccessRoleID!): AccessRole - - """ - Returns a list of roles in the organization. - """ - accessRoles( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - filters: [RoleFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - includeNonAssignableRoles: Boolean = false - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - sort: RoleSort - ): AccessRoleConnection! - - """ - Returns a single shop that the user has access to. - """ - accessibleShop( - """ - The ID of the shop. - """ - id: ShopifyShopID! - ): Shop - - """ - Distinct raw plan_name values across all shops accessible to the current user. - """ - accessibleShopPlans( - """ - Distinct raw plan_name values for the requested accessible store type.When - store_type is omitted, returns plan names from owned shops only. - """ - storeType: Store - ): [String!]! - - """ - Returns a list of shops that the user has access to. - """ - accessibleShops( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - filters: [ShopFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Search query for shops. - """ - search: String - - """ - Sort order for shops. - """ - sort: ShopSort - ): ShopConnection - - """ - Returns an action audit if it exists. - """ - actionAudit(id: ActionAuditID!): AccessActionAudit - - """ - Action audits for the organization. - """ - actionAudits( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - filters: [ActionAuditFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AccessActionAuditConnection! - - """ - Returns a list of roles in the organization that could be assigned by requesting user. - """ - assignableAccessRoles( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - assigneeType: AccessRoleAssignmentAssignee - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - filters: [RoleFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - ): AccessRoleConnection! - - """ - Returns all shops with active collaborator relationships that can be assigned to roles. - """ - assignableCollaboratorShops( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - ): ShopConnection! - - """ - Returns the list of assignable organization permissions for the organization. - """ - assignableOrganizationPermissions: [String!] - - """ - Returns the list of assignable partner permissions for the organization. - """ - assignablePartnerPermissions: [String!] - - """ - Returns the list of assignable point of sale permissions for the organization. - """ - assignablePointOfSalePermissions: AssignablePointOfSalePermissions - - """ - Returns the list of assignable shop permissions for the organization. - """ - assignableShopPermissions: [String!] - - """ - Returns a list of shops that can be managed by the requesting user. - """ - assignableShops( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - assigneeType: AccessRoleAssignmentAssignee! - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - roleType: AccessRoleAssignmentRole = STORE - search: String - shopifyShopIds: String - ): ShopConnection! - - """ - Returns a list of payment method options the organization can onboard - """ - availablePaymentMethods: [PaymentMethodOption!]! - - """ - Bulk data for the organization. - """ - bulkData: BulkData! - - """ - Organizations connected to this organization through client transfers - whether as the transferring or receiving party. - """ - clientTransferOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationReferenceConnection! - - """ - Organizations on the other side of collaborator relationships with this organization. - """ - collaboratorOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationReferenceConnection! - - """ - Returns the collaborator relationship for the organization and the given shop. - """ - collaboratorRelationship(shopifyShopId: ShopifyShopID!): CollaboratorRelationship - - """ - Organizations on the other side of client transfers and collaborator relationships with this organization. - """ - counterpartOrganizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationReferenceConnection! - - """ - Organization creation date. - """ - createdAt: ISO8601DateTime! - - """ - Returns a single CSV import run by ID. - """ - csvImport( - """ - The ID of the import run. - """ - id: BusinessUsersImportID! - ): BusinessUsersImportRun - - """ - Returns a list of CSV import runs for the organization. - """ - csvImports( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Filter import runs by status. - """ - status: BusinessUsersImportStatus - ): BusinessUsersImportRunConnection! - - """ - Returns the requester. - """ - currentUser: OrganizationUserInterface - - """ - Scopes for the requester's ability to manage role assignments across stores. - """ - currentUserScopesForManagingRoleAssignments: ScopesForManagingRoleAssignments! - - """ - Returns a list of domains in the organization. - """ - domains( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationDomainConnection - - """ - Returns true/false values indicating if each flag is enabled for the organization. - """ - enabledFlags( - """ - The hashed handles of the flags to check. - """ - flagHandles: [String!]! - ): [Boolean!]! - - """ - Returns a list of people that can be associated to legal entities in the organization. - """ - entityPeople( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - filters: [PersonFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - ): PersonConnection - - """ - Feature set for the organization. - """ - featureSet: [OrganizationFeature!]! - - """ - Checks if a government identifier already exists in the organization. - """ - governmentIdentifierDuplicationCheck( - """ - Optionally exclude a specific entity from the check. - """ - excludeIdentifiableId: SupportedEntityId - - """ - The government identifier type handle (e.g., us_ssn, ca_passport). - """ - identifierType: String! - - """ - The raw government identifier value to check. - """ - value: String! - ): [GovernmentIdentifierDuplicationCheck!] - - """ - Returns a group if it exists. - """ - group(id: GroupID!): Group - - """ - Returns a list of groups in the organization. - """ - groups( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - filters: [UserGroupFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - includeNonAssignableGroups: Boolean = true - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - sort: UserGroupSort - type: GroupType - ): GroupConnection! - - """ - Cached status of a feature flag for the organization. - """ - hasFeatureFlag( - """ - The handle for the feature flag. - """ - handle: String! - ): Boolean! - - """ - Returns true if the organization has users that are not TFA enforced. - """ - hasTfaUnenforcedUsers: Boolean - - """ - The ID for an object. - """ - id: GlobalID! - - """ - Returns a list of applications installed on organization shops. - """ - installedShopApps( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Search query for shop apps. - """ - search: String - ): ShopAppConnection - - """ - Returns true if the organization has been auto migrated to RBAC. - """ - isAutoMigratedToRbac: Boolean! - - """ - Whether the organization is a partner organization. - """ - isPartner: Boolean! - - """ - Whether the organization is a plus organization. - """ - isPlus: Boolean! - - """ - Whether the organization is a reseller partner organization. - """ - isResellerPartner: Boolean! - - """ - Returns a list of the organization's legal entities. - """ - legalEntities( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - excludeUnspecifiedEntities: Boolean = false - filters: [LegalEntityFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - sort: LegalEntitySortField - ): LegalEntityConnection - - """ - Returns a Legal Entity by the specified ID. - """ - legalEntity(id: LegalEntityID!): LegalEntity - - """ - Returns the reseller relationship for a shop owned by this organization. - """ - merchantResellerRelationship(shopifyShopId: ShopifyShopID!): ResellerRelationship - - """ - Organization name. - """ - name: String! - - """ - Returns the navigation settings for the organization user. - """ - navigationSettings( - """ - When true, returns navigation settings scoped to organization context only. - """ - organizationContextOnly: Boolean = false - shopifyUserId: String - ): NavigationSettings - - """ - The organization owner. - """ - owner: OrganizationUserInterface - - """ - Returns a single pending store addition request. - """ - pendingStoreAdditionRequest(id: StoreAdditionRequestID!): StoreAdditionRequest - - """ - Returns a list of pending store addition requests. - """ - pendingStoreAdditionRequests( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - filters: [ShopPropertyFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - sort: StoreAdditionRequestSort - ): StoreAdditionRequestConnection - - """ - Returns a Person by the specified ID. - """ - person(id: PersonID!): Person - - """ - Organization primary handle - """ - primaryHandle: String - - """ - Returns the primary payment method for the organization's billing account. - """ - primaryPaymentMethod: OrganizationPrimaryPaymentMethod - - """ - Returns all the organization's properties. - """ - properties( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - filters: [ShopPropertyFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Offering handles of the requested properties. Leave blank to get all properties. - """ - offeringHandles: [String!] - - """ - Search query for shop properties. - """ - search: String - sort: ShopPropertySort - ): PropertyInterfaceConnection - - """ - Returns a single property. - """ - property(externalId: PropertyPublicID!, offeringHandle: String!): PropertyInterface - queryComplexity: Int! - queryDepth: Int! - - """ - Returns the reseller for the organization. - """ - reseller: Reseller - - """ - Returns the reseller relationship between the organization and the specified shop. - """ - resellerRelationship(shopifyShopId: ShopifyShopID!): ResellerRelationship - - """ - Returns all reseller relationships for the organization. - """ - resellerRelationships( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ResellerRelationshipWithShopConnection! - - """ - Returns shops for the organization that have an associated reseller relationship. - """ - resellerShops( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ShopConnection! - - """ - Resolves whether a legal entity being added to the organization matches, - conflicts with, or is ambiguous against existing legal entities. - """ - resolveLegalEntityMatch(input: LegalEntityMatchInput!): ResolveLegalEntityMatchPayload! - - """ - Resolves whether a person being added to the organization matches, conflicts - with, or is ambiguous against existing people. - """ - resolvePersonMatch(input: PersonMatchInput!): ResolvePersonMatchPayload! - - """ - Returns the Retail specific data for the organization. - """ - retailData: OrganizationRetailData - - """ - Returns a role if it exists. - """ - role(id: RoleID!): Role - - """ - Returns a list of Roles in alphabetical order. - """ - roles( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - sort: OrganizationRoleSort - ): RoleConnection - - """ - SAML integration settings and metadata. - """ - samlConfiguration: SamlConfiguration - - """ - Returns SAML Single Sign-on url for the organization. - """ - samlSsoUrl: String - - """ - Returns SCIM token for the organization. - """ - scimToken: String - - """ - Returns number of active shops in the organization. - """ - shopCount: Int - - """ - Returns a shop for retail/POS user management purposes. - """ - shopForRetailManagement(shopifyShopId: ShopifyShopID!): RetailShop - shopIdentificationSettingsDuplicationCheck(internalStoreCode: String, internalStoreName: String): [ShopIdentificationSettingsDuplicationCheck!] - - """ - Whether the organization has reached its shop limit. - """ - shopLimitReached: Boolean! - - """ - Returns a single pending app dev store addition request. - """ - storeCreation(shopDomain: String!): StoreCreation - - """ - Organization tags - """ - tags: [Tag!] @deprecated(reason: "Use isPartner/isPlus or similar fields.") - - """ - Returns a test drive feature by its handle if it exists. - """ - testDriveFeature(handle: String!): TestDriveFeature - - """ - Returns a list of test drive features for the organization. - """ - testDriveFeatures: [TestDriveFeature!] - - """ - Returns the state of TFA enforcement for the organization. - """ - tfaEnforcement: TfaEnforcement! - timezone: String - - """ - Returns an organization user if they exist. - """ - userById(id: OrganizationUserID!): OrganizationUserInterface - - """ - Returns an organization user located by their identity uuid if they exist. - """ - userByIdentityUuid(identityUuid: String!): OrganizationUserInterface - - """ - Returns an organization user located by their shopify user id if they exist (example id: gid://shopify/StaffMember/54). - """ - userByShopifyUserId(shopifyUserId: String!): OrganizationUserInterface - - """ - User limits for the organization. - """ - userLimits: UserLimits! - - """ - List of all users that can be managed within the organization. - """ - users( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - filters: [OrganizationUserFilterInput!] - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - sort: OrganizationUserSort - ): OrganizationUserInterfaceConnection! - - """ - Returns the organization user(s) located by their email if they exist. - """ - usersByEmail(emails: [String!]!): [OrganizationUserInterface!] -} - -""" -The connection type for Organization. -""" -type OrganizationConnection { - """ - A list of edges. - """ - edges: [OrganizationEdge!]! - - """ - A list of nodes. - """ - nodes: [Organization!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -input OrganizationCreateInput { - """ - Unique key associated with the request. - """ - idempotencyKey: String! - - """ - Organization name - """ - name: String! - - """ - Identity UUID of the organization owner. - """ - ownerUuid: String! -} - -type OrganizationDomain implements Node { - domainName: String! - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! - status: OrganizationDomainStatus! - verificationCode: String - verified: Boolean! -} - -""" -The connection type for OrganizationDomain. -""" -type OrganizationDomainConnection { - """ - A list of edges. - """ - edges: [OrganizationDomainEdge!]! - - """ - A list of nodes. - """ - nodes: [OrganizationDomain!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type OrganizationDomainEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: OrganizationDomain! -} - -""" -The ID for a OrganizationDomain. -""" -scalar OrganizationDomainID - -enum OrganizationDomainStatus { - """ - The domain has been declined. - """ - DECLINED - - """ - The domain is currently being enforced. - """ - ENFORCED - - """ - The domain is in the process of being enforced. - """ - ENFORCING - - """ - The domain has been verified and is manually enforced. - """ - MANUALLY_ENFORCED - - """ - The domain is not being enforced. - """ - NOT_ENFORCED - - """ - The domain is in the process of having enforcement revoked. - """ - UNENFORCING - - """ - The domain has not been verified. - """ - UNVERIFIED - - """ - The domain has conflicts with other organization(s). - """ - UNVERIFIED_CONFLICTED -} - -""" -An edge in a connection. -""" -type OrganizationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Organization! -} - -enum OrganizationFeature { - """ - All collaborator stores role assignment is enabled for the organization. - """ - ALL_COLLABORATOR_STORES_ROLE_ASSIGNMENT - - """ - All owned stores role assignment is enabled for the organization. - """ - ALL_OWNED_STORES_ROLE_ASSIGNMENT - - """ - Analytics overview is enabled for the organization. - """ - ANALYTICS_OVERVIEW - - """ - App development is enabled for the organization. - """ - APP_DEVELOPMENT - - """ - Central legal entities experience is enabled for the organization. - """ - CENTRAL_LEGAL_ENTITIES - - """ - Client transfer store management is enabled for the organization. - """ - CLIENT_TRANSFER_STORE_MANAGEMENT - - """ - Collaboration with shops in other organizations is enabled for the organization. - """ - COLLABORATORS - - """ - Direct access to Organization Settings is enabled for the organization. - """ - DIRECT_ACCESS - - """ - Domain verification is enabled for the organization. - """ - DOMAIN_VERIFICATION - - """ - First-party employee provisioning via SCIM is enabled for the organization. - When present, allows specific 1P Okta configurations to provision shopify.com - users without requiring a verified domain. - """ - FIRST_PARTY_SCIM_PROVISIONING - - """ - Group management is enabled for the organization. - """ - GROUPS - - """ - MFA management is enabled for the organization. - """ - MFA_MANAGEMENT - - """ - Organization billing is enabled for the organization. - """ - ORGANIZATION_BILLING - - """ - Organization settings are enabled for the organization. - """ - ORGANIZATION_SETTINGS - - """ - Partner functionality is enabled for the organization. - """ - PARTNER - - """ - Role management is enabled for the organization. - """ - ROLES - - """ - SAML is enabled for the organization. - """ - SAML - - """ - SCIM is enabled for the organization. - """ - SCIM - - """ - Store builder affiliate store creation flow is enabled for the organization. - Suppresses claim store invitation emails for affiliate-created store transfers. - """ - STORE_BUILDER_AFFILIATE_STORE_CREATION - - """ - Store creation is enabled for the organization. - """ - STORE_CREATION - - """ - Store removal is enabled for the organization. - """ - STORE_REMOVAL - - """ - Stores can be transferred between organizations. - """ - STORE_TRANSFER - - """ - Strict organization data boundary is enforced. Store-only users cannot access organization-level data like legal entities. - """ - STRICT_ORG_DATA_BOUNDARY - - """ - Test Drive is enabled for the organization. - """ - TEST_DRIVE - - """ - Organization-level user seat limits are not enforced for this organization. - """ - UNLIMITED_ORG_USERS -} - -""" -The ID for a Organization. -""" -scalar OrganizationID - -""" -The primary payment method for the organization's billing account. -""" -type OrganizationPrimaryPaymentMethod { - """ - User-visible label for the payment method, varying by `paymentType`. Non-PII - for cards (card brand, e.g. 'visa') and bank accounts (bank name). **Contains - user-identifying PII for PayPal (account email) and UPI (UPI ID)** — gated by - the field's billing/store-management permissions. Null when no label is available. - """ - displayLabel: String - - """ - The card expiry month (1-12). Null when not a card. - """ - expiryMonth: Int - - """ - The card expiry year (four-digit). Null when not a card. - """ - expiryYear: Int - - """ - The last four digits of the card or account number. Null when not applicable. - """ - lastFourDigits: String - - """ - The type of payment method (e.g. credit_card, bank_account, paypal). - """ - paymentType: PaymentMethodOption -} - -""" -A lightweight reference to an organization. -""" -type OrganizationReference implements Node { - """ - The ID for an object. - """ - id: GlobalID! - - """ - The organization name. - """ - name: String! - queryComplexity: Int! - queryDepth: Int! -} - -""" -The connection type for OrganizationReference. -""" -type OrganizationReferenceConnection { - """ - A list of edges. - """ - edges: [OrganizationReferenceEdge!]! - - """ - A list of nodes. - """ - nodes: [OrganizationReference!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type OrganizationReferenceEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: OrganizationReference! -} - -type OrganizationResult { - """ - Created or mutated organization. - """ - organization: Organization - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type OrganizationRetailData { - hasPosProSubscription: Boolean! -} - -""" -Sort options for roles queries. -""" -enum OrganizationRoleSort { - """ - Sort by name ascending. - """ - NAME_ASC - - """ - Sort by name descending. - """ - NAME_DESC - - """ - Sort by number of users ascending. - """ - USER_COUNT_ASC - - """ - Sort by number of users descending. - """ - USER_COUNT_DESC -} - -""" -A summary of the permissions for an organization role. -""" -type OrganizationRoleSummary { - permissions: [AccessRolePermission!] -} - -enum OrganizationStatus { - """ - The organization is active. - """ - ACTIVE - - """ - The organization is locked. - """ - LOCKED -} - -type OrganizationTransferOwnershipError { - """ - The error code. - """ - code: OrganizationTransferOwnershipErrorCode! - - """ - Path to the input field which caused the error - """ - field: [String!]! - - """ - The error message - """ - message: String! -} - -enum OrganizationTransferOwnershipErrorCode { - """ - The organization has a Canadian contract. The ownership transfer is not allowed. - """ - CANADIAN_CONTRACT - - """ - The user is not active. - """ - INACTIVE - - """ - The user is invited. They need to accept their invite to transfer ownership. - """ - INVITED - - """ - Email doesn’t exist in this organization. - """ - NOT_FOUND - - """ - The user is pending deletion. Ownership can't be transferred to them. - """ - PENDING_DELETION - - """ - Email matches current organization owner. - """ - SAME_EMAIL - - """ - The user is suspended. They need to be reactived to transfer ownership. - """ - SUSPENDED -} - -input OrganizationTransferOwnershipInput { - """ - An email of new organization owner. - """ - newOwnerEmail: String! -} - -type OrganizationTransferOwnershipResult { - """ - New organization owner. - """ - newOrganizationOwner: OrganizationUser - - """ - Mutated organization. - """ - organization: Organization - - """ - The collection of errors. - """ - userErrors: [OrganizationTransferOwnershipError!] -} - -input OrganizationUpdateStatusInput { - organizationId: OrganizationID! - - """ - The new status for the organization. - """ - status: OrganizationStatus! -} - -type OrganizationUser implements Node & OrganizationUserInterface { - """ - Returns all the organization's properties the requesting user can grant access to. - """ - accessGrantableProperties( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - - """ - Offering handles of the requested properties. Leave blank to get all properties. - """ - offeringHandles: [String!] - - """ - Search shop's name or uri. Only returns shop properties. - """ - search: String - - """ - Sort shop's name or uri. - """ - sort: ShopPropertySort - - """ - Filter out properties the target organization user already has access to. - """ - targetOrganizationUserId: OrganizationUserID - - """ - Filter out properties the target role already has access to. - """ - targetRoleId: RoleID - ): PropertyInterfaceConnection - - """ - Returns a summary of the user's access permissions. - """ - accessSummary: AccessSummary - admin: Boolean! - administrativePermissions: [String!] - - """ - Returns all aggregated role assignments for the user. - """ - aggregatedRoleAssignments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AccessAggregatedRoleAssignmentConnection - - """ - Returns all groups that can be assigned to the user. - """ - assignableGroups( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GroupConnection - - """ - Returns whether the requester can resend the invitation for the target. - """ - canResendInvite( - """ - The target invited organization user. - """ - targetOrganizationUserId: OrganizationUserID! - ): Boolean! - - """ - TrustedToRequestCollaboration result for the current viewer. Self-only: raises - when queried on any OrganizationUser other than `currentUser`. Null when the - viewer has no identity account. - """ - collaborationEligibility( - """ - URL to redirect to after IDV completes. Embedded in `challengeUrl` only when - `status` is `REQUIRED` and the host is on the IDV redirect allowlist; - otherwise ignored. - """ - returnUrl: URL - ): CollaborationEligibility - collaboratorAccess: CollaboratorAccessStatus - - """ - A summary of collaborator relationship access for the user. - """ - collaboratorRelationshipAccessSummary: CollaboratorRelationshipAccessSummary - createdAt: ISO8601DateTime! - createdBy: OrganizationUser - email: String! - generatePinForShop(length: Int, shopifyShopId: PropertyPublicID!): String - - """ - Returns a list of groups assigned to the user. - """ - groups( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GroupConnection! - hasManageCollaboratorShopPermission: Boolean! - id: GlobalID! - isPinEasyToGuessForShop(pin: String!, shopifyShopId: PropertyPublicID!): EasyToGuessPinResponse - isShopifyEmployee: Boolean! - migratableToRbacByRequester: Boolean! - - """ - Organization-wide access conditions applied to the user. - """ - organizationAccessConditions: [String!]! - organizationPermissions: [String!]! - partnerPermissions: [String!] - privateData: PrivateData! - queryComplexity: Int! - queryDepth: Int! - rbacBannerCode: String - - """ - Returns a list of retail accesses for the user. - """ - retailAccesses( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): RetailAccessConnection! - role: Role - - """ - Returns a list of roles assigned to the user. - """ - roles( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AccessRoleConnection! - samlEnforcementState: UserSamlEnforcementState! - shopAccessDetailsByShopifyShopId(shopifyShopId: PropertyPublicID!): UserShopAccessDetails - shopAccesses( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - search: String - shopifyShopIds: [PropertyPublicID!] - sort: ShopPropertySort - ): ShopAccessConnection - - """ - Returns a list of Roles in alphabetical order. - """ - shopsAssignedFromRole( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - roleId: AccessRoleID! - ): ShopConnection! - status: OrganizationUserStatus! - - """ - A summary of current store access for the user (legacy or RBAC). - """ - storeAccessSummary: StoreAccessSummary - tfaEnforced: Boolean! - useRbacAccess: Boolean! - verifiedOrganizationDomain: Boolean! - wasSubAdmin: Boolean! -} - -input OrganizationUserDeleteInput { - """ - The ID of the user to delete. - """ - organizationUserId: OrganizationUserID -} - -type OrganizationUserDeleteResult { - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - Whether the user was deleted immediately. If false, the user will be deleted asynchronously. - """ - synchronouslyDeleted: Boolean! - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Field options for filtering users queries. -""" -enum OrganizationUserFilterField { - """ - What parts of shopify the user has access to. - """ - ACCESS_TYPE - - """ - The administrative permissions the user has. - """ - ADMINISTRATIVE_PERMISSION - - """ - The date when this user was created. - """ - CREATED_AT - - """ - The ID of the user who created this user. - """ - CREATED_BY - - """ - The ID for a group the user belongs to. - """ - GROUP_ID - - """ - The IDs for groups the user belongs to. - """ - GROUP_IDS - - """ - Whether or not MFA is enabled on a user. - """ - MFA_ENABLED - - """ - The permissions the user has. - """ - PERMISSION - - """ - The ID for a role the user belongs to. - """ - ROLE_ID - - """ - The security type for the user. - """ - SECURITY_TYPE - - """ - The ID for a Shopify shop the user has access to. - """ - SHOPIFY_SHOP_ID - - """ - The account type of a user on a shop. - """ - SHOP_ACCOUNT_TYPE - - """ - The status of a user. - """ - STATUS - - """ - The type of the user to be filtered by. - """ - USER_TYPE - - """ - Indicates if the user has been migrated to RBAC-based access. - """ - USE_RBAC_ACCESS -} - -""" -Represents a single filter option for users queries. -""" -input OrganizationUserFilterInput { - field: OrganizationUserFilterField! - operator: Operator! - value: String! -} - -""" -The ID for a OrganizationUser. -""" -scalar OrganizationUserID - -type OrganizationUserIdResult { - """ - The organization user id of the target organization user. - """ - organizationUserId: OrganizationUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input OrganizationUserIdsInput { - """ - The IDs of the users. - """ - organizationUserIds: [OrganizationUserID!]! -} - -type OrganizationUserIdsResult { - organizationUserIds: [OrganizationUserID!] - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type OrganizationUserImportDirectUploadParams { - """ - Token used to refer to the uploaded file. - """ - directUploadToken: String! - - """ - Required HTTP headers for the upload request. - """ - headers: [OrganizationUserImportUploadHeader!]! - - """ - Endpoint to upload file directly to storage service. - """ - url: String! -} - -""" -Metadata for the CSV file the client will upload directly to storage. -""" -input OrganizationUserImportFileMetadataInput { - """ - File size in bytes. - """ - byteSize: Int! - - """ - A base64 MD5 digest of the file. - """ - checksum: String! - - """ - Content type of the file. - """ - contentType: CsvFileContent! - - """ - The name of the file. - """ - filename: String! -} - -""" -HTTP header for a signed upload request. -""" -type OrganizationUserImportUploadHeader { - """ - Header name. - """ - name: String! - - """ - Header value. - """ - value: String! -} - -interface OrganizationUserInterface { - """ - Returns a summary of the user's access permissions. - """ - accessSummary: AccessSummary - admin: Boolean! - administrativePermissions: [String!] - - """ - Returns all aggregated role assignments for the user. - """ - aggregatedRoleAssignments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AccessAggregatedRoleAssignmentConnection - - """ - Returns all groups that can be assigned to the user. - """ - assignableGroups( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GroupConnection - collaboratorAccess: CollaboratorAccessStatus - - """ - A summary of collaborator relationship access for the user. - """ - collaboratorRelationshipAccessSummary: CollaboratorRelationshipAccessSummary - createdAt: ISO8601DateTime! - createdBy: OrganizationUser - email: String! - generatePinForShop(length: Int, shopifyShopId: PropertyPublicID!): String - - """ - Returns a list of groups assigned to the user. - """ - groups( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GroupConnection! - id: GlobalID! - isPinEasyToGuessForShop(pin: String!, shopifyShopId: PropertyPublicID!): EasyToGuessPinResponse - migratableToRbacByRequester: Boolean! - - """ - Organization-wide access conditions applied to the user. - """ - organizationAccessConditions: [String!]! - organizationPermissions: [String!]! - partnerPermissions: [String!] - privateData: PrivateData! - queryComplexity: Int! - queryDepth: Int! - rbacBannerCode: String - - """ - Returns a list of retail accesses for the user. - """ - retailAccesses( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): RetailAccessConnection! - role: Role - - """ - Returns a list of roles assigned to the user. - """ - roles( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AccessRoleConnection! - samlEnforcementState: UserSamlEnforcementState! - shopAccessDetailsByShopifyShopId(shopifyShopId: PropertyPublicID!): UserShopAccessDetails - - """ - Returns a list of Roles in alphabetical order. - """ - shopsAssignedFromRole( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - roleId: AccessRoleID! - ): ShopConnection! - status: OrganizationUserStatus! - - """ - A summary of current store access for the user (legacy or RBAC). - """ - storeAccessSummary: StoreAccessSummary - tfaEnforced: Boolean! - useRbacAccess: Boolean! - verifiedOrganizationDomain: Boolean! - wasSubAdmin: Boolean! -} - -""" -The connection type for OrganizationUserInterface. -""" -type OrganizationUserInterfaceConnection { - """ - A list of edges. - """ - edges: [OrganizationUserInterfaceEdge!]! - - """ - A list of nodes. - """ - nodes: [OrganizationUserInterface!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type OrganizationUserInterfaceEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: OrganizationUserInterface! -} - -input OrganizationUserProvisionShopAccessInput { - """ - The shop to provision the requester on. - """ - shopifyShopId: PropertyPublicID! -} - -type OrganizationUserProvisionShopAccessResult { - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Sort options for users queries. -""" -enum OrganizationUserSort { - """ - Sort by email ascending. - """ - EMAIL_ASC - - """ - Sort by email descending. - """ - EMAIL_DESC - - """ - Sort by first name ascending. - """ - FIRST_NAME_ASC - - """ - Sort by first name descending. - """ - FIRST_NAME_DESC - - """ - Sort by last name ascending. - """ - LAST_NAME_ASC - - """ - Sort by last name descending. - """ - LAST_NAME_DESC - - """ - Sort by status ascending. - """ - STATUS_ASC - - """ - Sort by status descending. - """ - STATUS_DESC -} - -enum OrganizationUserStatus { - """ - The user is active. - """ - ACTIVE - - """ - The user is inactive. - """ - INACTIVE - - """ - The user has a pending invitation. - """ - INVITED - - """ - The user is pending deletion. - """ - PENDING_DELETION - - """ - The user is suspended. - """ - SUSPENDED -} - -input OrganizationUserUpdateInput { - """ - The array of IDs of the groups to add the user to. - """ - groupIdsToAdd: [GroupID!] - - """ - The array of IDs of the groups to remove the user from. - """ - groupIdsToRemove: [GroupID!] - - """ - The location assignments to create for the retail user. - """ - locationAssignments: [LocationAssignmentsInput!] - - """ - The ID of the user to update. - """ - organizationUserId: OrganizationUserID - - """ - The pins of the user to be created. - """ - pins: [PinInput!] - - """ - The array of role assignments to create or update for the user. - """ - roleAssignmentsToUpdate: [RoleAssignmentInput!] - - """ - The array of IDs of the roles to fully unassign from the user. - """ - rolesToUnassign: [AccessRoleID!] - - """ - Whether or not SAML should be enforced for the OrganizationUser. - """ - samlEnforced: Boolean - - """ - Whether or not TFA should be enforced for the OrganizationUser. - """ - tfaEnforced: Boolean -} - -type OrganizationUserUpdateResult { - organizationUser: OrganizationUserInterface - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input OrganizationUsersBulkGroupAssignInput { - """ - The array of organization user IDs to assign the group to. - """ - organizationUserIds: [OrganizationUserID!]! - - """ - The group to assign to the users. - """ - userGroupId: GroupID! -} - -input OrganizationUsersBulkRoleAssignInput { - """ - The array of organization user IDs to assign the role to. - """ - organizationUserIds: [OrganizationUserID!]! - - """ - The role assignments to create the users. - """ - roleAssignmentToCreate: RoleAssignmentInput! -} - -""" -The user attributes to create a staff member. -""" -input OrganizationUsersCreateAttributesInput { - """ - The email of the user to be created. - """ - email: String! - - """ - The pins of the user to be created. - """ - pins: [PinInput!] -} - -input OrganizationUsersCreateInput { - """ - The emails of the users to be invited / created. - """ - emails: [String!]! - - """ - The array of IDs of the groups to add the user to. - """ - groupIds: [GroupID!] - - """ - The location assignments to create for the retail user. - """ - locationAssignments: [LocationAssignmentsInput!] - - """ - The array of role assignments to create or update for the user. - """ - roleAssignments: [RoleAssignmentInput!] - - """ - Whether or not TFA should be enforced for the OrganizationUser. - """ - tfaEnforced: Boolean - - """ - The staff member attributes to create for the user. - """ - userAttributes: [OrganizationUsersCreateAttributesInput!] -} - -type OrganizationUsersCreateResult { - """ - The emails of the invited users. - """ - emails: [String!] - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type OrganizationUsersDeleteResult { - organizationUserIds: [OrganizationUserID!] - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - Whether all users were deleted immediately. If false, one or more users will be deleted asynchronously. - """ - synchronouslyDeleted: Boolean! - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input OrganizationUsersUpdateStatusInput { - """ - True to reactivate users, false to suspend them. - """ - active: Boolean! - - """ - The IDs of the users. - """ - organizationUserIds: [OrganizationUserID!]! -} - -""" -Information about pagination in a connection. -""" -type PageInfo { - """ - When paginating forwards, the cursor to continue. - """ - endCursor: String - - """ - When paginating forwards, are there more items? - """ - hasNextPage: Boolean! - - """ - When paginating backwards, are there more items? - """ - hasPreviousPage: Boolean! - - """ - When paginating backwards, the cursor to continue. - """ - startCursor: String -} - -input PartnerOrganizationCreateInput { - """ - Organization name - """ - name: String! - - """ - Email of the organization owner. - """ - ownerEmail: String! - - """ - Identity UUID of the organization owner. - """ - ownerUuid: String! -} - -enum PartnerOrganizationsShopPropertiesBackfill { - CREATE_COMPLETED_PROPERTY_TRANSFER_REQUEST - CREATE_DELETED_PROPERTY_TRANSFER_REQUEST - REASSIGN_SHOP_PROPERTY -} - -""" -A summary of the permissions for a partner role. -""" -type PartnerRoleSummary { - permissions: [AccessRolePermission!] -} - -input PartnersMigrationEnableRbacInput { - organizationId: OrganizationID! -} - -input PartnersMigrationMigrateUsersInput { - deleteExistingAssignments: Boolean = false - organizationId: OrganizationID! - userAssignments: [PartnersMigrationUserAssignmentInput!]! -} - -input PartnersMigrationRoleAssignmentInput { - category: String! - permissions: JSON - roleHandle: String - shopifyShopIds: [ShopifyShopID!] - storeAccessType: String! -} - -input PartnersMigrationUserAssignmentInput { - roleAssignments: [PartnersMigrationRoleAssignmentInput!]! - userId: OrganizationUserID! -} - -""" -The types of payment methods -""" -enum PaymentMethodOption { - """ - Bank account payment method. - """ - bank_account - - """ - Credit card payment method. - """ - credit_card - - """ - Payment happens outside of the billing system. - """ - manual - - """ - PayPal payment method. - """ - paypal - - """ - SEPA direct debit payment method. - """ - sepa_direct_debit - - """ - Shopify Balance Account payment method. - """ - shopify_balance_account - - """ - Shopify Balance Card payment method. - """ - shopify_balance_card - - """ - UPI account payment method. - """ - upi -} - -""" -A summary of the permissions for a user or group. -""" -type PermissionsSummary { - customRolesPresence: Boolean - organizationRoles: OrganizationRoleSummary - partnerRoles: PartnerRoleSummary - storeRoles: StoreRoleSummary - systemRolesPresence: Boolean -} - -type Person implements Node { - addresses( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - countryCode: CountryCode - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): AddressConnection - aliases: [PersonAlias!] - dateOfBirth: ISO8601Date - firstName: String - fullName: String - - """ - Returns a GovernmentIdentifier by the specified ID. - """ - governmentIdentifier(id: GovernmentIdentifierID!): GovernmentIdentifier - governmentIdentifiers( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): GovernmentIdentifierConnection - - """ - The ID for an object. - """ - id: GlobalID! - lastName: String - middleName: String - nameVariants: [NameVariant!] - nationalities: [PersonNationality!] - prefix: String - principals: [Principal!] - queryComplexity: Int! - queryDepth: Int! - suffix: String - supportingDocuments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): SupportingDocumentConnection - user: PrivateData -} - -type PersonAlias implements Node { - aliasVariants: [NameVariant!] - firstName: String - fullName: String - - """ - The ID for an object. - """ - id: GlobalID! - lastName: String - middleName: String - person: Person! - prefix: String - queryComplexity: Int! - queryDepth: Int! - suffix: String -} - -""" -The ID for a PersonAlias. -""" -scalar PersonAliasID - -type PersonAliasResult { - personAlias: PersonAlias - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -The connection type for Person. -""" -type PersonConnection { - """ - A list of edges. - """ - edges: [PersonEdge!]! - - """ - A list of nodes. - """ - nodes: [Person!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type PersonEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Person! -} - -""" -Filter fields for people. -""" -enum PersonFilterField { - """ - Filter by address city. - """ - ADDRESS_CITY - - """ - Filter by address country code. - """ - ADDRESS_COUNTRY_CODE - - """ - Filter by address postal code. - """ - ADDRESS_POSTAL_CODE - - """ - Filter by address state or region. - """ - ADDRESS_STATE_OR_REGION - - """ - Filter by date of birth. - """ - DATE_OF_BIRTH - - """ - Filter by principal email. - """ - EMAIL - - """ - Filter by first name (includes aliases). - """ - FIRST_NAME - - """ - Filter by last name (includes aliases). - """ - LAST_NAME - - """ - Filter by nationality country code. - """ - NATIONALITY - - """ - Filter by principal phone number. - """ - PHONE -} - -""" -Filter for people. -""" -input PersonFilterInput { - field: PersonFilterField! - operator: PersonFilterOperator! - value: String! -} - -""" -Operators for filtering people. -""" -enum PersonFilterOperator { - """ - Contains operator. - """ - CONTAINS - - """ - Equals operator. - """ - EQUALS - - """ - Starts with operator. - """ - STARTS_WITH -} - -""" -The ID for a Person. -""" -scalar PersonID - -""" -Input describing a person being added to an organization, to check for existing conflicts. -""" -input PersonMatchInput { - """ - Date of birth of the person. Null is treated as a wildcard during matching. - """ - dateOfBirth: ISO8601Date - - """ - First name of the person. - """ - firstName: String! - - """ - Government identifiers supplied for the person. May be empty. - """ - governmentIdentifiers: [EntityMatchGovIdInput!] - - """ - Last name of the person. - """ - lastName: String! -} - -type PersonNationality implements Node { - countryCode: CountryCode! - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! -} - -type PersonResult { - person: Person - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input PinInput { - """ - The PIN to access the POS App of the retail only organization user. - """ - pin: String! - - """ - The Shopify shop ID to assign the PIN to, i.e. 'gid://organization/ShopifyShop/10'. - """ - shopifyShopId: PropertyPublicID! -} - -input PlusRoleRemoveStoreAccessInput { - """ - The ID of the Role to update. - """ - id: RoleID! - - """ - The array of Shopify shop IDs of shops to remove access to on the plus role. - """ - shopifyShopIds: [PropertyPublicID!]! -} - -input PosPinInput { - """ - The PIN to access the POS App of the retail only organization user. - """ - posPin: String! - - """ - The Shopify shop ID to assign the PIN to, i.e. 'gid://organization/ShopifyShop/10'. - """ - shopifyShopId: ID! -} - -type PosPinValidatorResult { - """ - Check if a POS pin is easy to guess - """ - easyToGuess: Boolean - - """ - Whether the POS PIN is valid. - """ - success: Boolean! - - """ - The collection of errors. - """ - userErrors: [UserError!] - - """ - Reasons why the PIN is easy to guess. - """ - violations: [String!] -} - -type PosPinViolations { - """ - Check if a POS pin is easy to guess - """ - easyToGuess: Boolean! - - """ - An array of reasons why the PIN is easy to guess. - """ - violations: [String!]! -} - -type Principal implements Node { - """ - Returns the address associated with this principal - """ - address: Address - email: String - equityOwnership: Float - - """ - The ID for an object. - """ - id: GlobalID! - jobTitle: String - legalEntity: LegalEntity! - person: Person! - phoneNumber: String - queryComplexity: Int! - queryDepth: Int! - roles: [PrincipalRoleTypeEnum!] -} - -""" -The connection type for Principal. -""" -type PrincipalConnection { - """ - A list of edges. - """ - edges: [PrincipalEdge!]! - - """ - A list of nodes. - """ - nodes: [Principal!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -input PrincipalContactInformationInput { - """ - The email associated with the principal. - """ - email: String - - """ - The phone number associated with the principal. - """ - phoneNumber: String -} - -""" -An edge in a connection. -""" -type PrincipalEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Principal! -} - -""" -The ID for a Principal. -""" -scalar PrincipalID - -enum PrincipalRoleTypeEnum { - ACCOUNT_REPRESENTATIVE - AUTHORIZER - DIRECTOR - EQUITY_OWNER - EXECUTIVE -} - -""" -Sort options for principals queries. -""" -enum PrincipalSortField { - """ - Sort by equity ownership ascending. - """ - EQUITY_ASC - - """ - Sort by equity ownership descending. - """ - EQUITY_DESC - - """ - Sort by job title ascending. - """ - JOB_TITLE_ASC - - """ - Sort by job title descending. - """ - JOB_TITLE_DESC - - """ - Sort by name ascending. - """ - NAME_ASC - - """ - Sort by name descending. - """ - NAME_DESC -} - -type PrivateData implements Node { - accountType: AccountTypeOfUser! - avatarUrl: URL - email: String - familyName: String - fullName: String - givenName: String - - """ - The ID for an object. - """ - id: GlobalID! - identityUuid: ID - locale: String - phoneNumber: String - queryComplexity: Int! - queryDepth: Int! -} - -type Property implements PropertyInterface { - """ - Property public identifier. - """ - externalId: PropertyPublicID - - """ - Property global identifier. - """ - id: PropertyId! - - """ - The offering for this property. - """ - offering: Offering - - """ - The organization this property belongs to. - """ - organization: Organization - queryComplexity: Int! - queryDepth: Int! -} - -""" -The ID for a Property. -""" -scalar PropertyID - -scalar PropertyId - -interface PropertyInterface { - """ - Property public identifier. - """ - externalId: PropertyPublicID - - """ - Property global identifier. - """ - id: PropertyId! - - """ - The offering for this property. - """ - offering: Offering - - """ - The organization this property belongs to. - """ - organization: Organization - queryComplexity: Int! - queryDepth: Int! -} - -""" -The connection type for PropertyInterface. -""" -type PropertyInterfaceConnection { - """ - A list of edges. - """ - edges: [PropertyInterfaceEdge!]! - - """ - A list of nodes. - """ - nodes: [PropertyInterface!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type PropertyInterfaceEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: PropertyInterface! -} - -scalar PropertyPublicID - -type PropertyResult { - """ - Mutated property. - """ - property: Property - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -enum PropertyTransfer { - AFFILIATE_TRANSFER - EXTERNAL - INTERNAL - PARTNER_HANDOFF - VIBE_TRANSFER -} - -""" -The ID for a PropertyTransferRequest. -""" -scalar PropertyTransferRequestID - -input ProvisionCollaboratorAccessInput { - """ - The ID of the shop to provision collaborator access for. - """ - shopifyShopId: PropertyPublicID! -} - -type ProvisionCollaboratorAccessResult { - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - Errors that occurred while provisioning collaborator access. - """ - userErrors: [UserError!] -} - -""" -The input fields for updating an organization user, this input comes from the shopify proxy. -""" -input ProxyOrganizationUserUpdateInput { - """ - Flag to enable the initialization of the POS (Point of Sale) authorization - check, replacing the default authorization method. - """ - enableInitializePosCheck: Boolean = false - - """ - The locations input to update a retail user locations. - """ - locationAssignments: ProxyRetailOnlyOrganizationLocationAssignmentsInput - - """ - The PIN to access the POS App of the retail only shop user. - """ - posPin: String - - """ - The Shopify User GID of the user who requested the action. - """ - requesterShopifyUserId: ID! - - """ - The role ids to update for the retail user. - """ - roleAssignments: [AccessRoleID!] - - """ - The Shopify User GID of the User to update. - """ - shopifyUserId: ID! -} - -""" -The result of updating an organization user, this result responds to a request from the shopify proxy. -""" -type ProxyOrganizationUserUpdateResult { - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -The input fields used to determine which locations a retail user has access to. -""" -input ProxyRetailOnlyOrganizationLocationAssignmentsInput { - """ - Whether the retail user should have access to all locations. - """ - allLocationsAccess: Boolean = false - - """ - The locations to add to the retail user i.e. ['gid://shopify/Location/11']. - """ - shopifyLocationIdsToAdd: [ID!] - - """ - The locations to remove from the retail user i.e. ['gid://shopify/Location/12']. - """ - shopifyLocationIdsToRemove: [ID!] -} - -""" -The user attributes to create a retail user. -""" -input ProxyRetailOnlyOrganizationUserCreateAttributesInput { - """ - The email of the user to be created. - """ - email: String - - """ - The first name of the user to be created. - """ - firstName: String! - - """ - The last name of the user to be created. - """ - lastName: String! - - """ - The phone number of the user to be created. - """ - phoneNumber: String - - """ - The PIN to access the POS App of the retail only shop user. - """ - posPin: String! -} - -""" -The input fields for creating a retail only organization user, this input comes from the shopify proxy. -""" -input ProxyRetailOnlyOrganizationUserCreateInput { - """ - Flag to enable the initialization of the POS (Point of Sale) authorization - check, replacing the default authorization method. - """ - enableInitializePosCheck: Boolean = false - - """ - The locations input to assign a retail user locations. - """ - locationsAssignments: ProxyRetailOnlyOrganizationLocationAssignmentsInput! - - """ - The Shopify User GID of the user who requested the action. - """ - requesterShopifyUserId: ID! - - """ - The role ids to create for the retail user. - """ - roleAssignments: [AccessRoleID!] - - """ - The Shopify shop GID. - """ - shopifyShopId: ID! - - """ - Specifies the input fields to create a retail user. - """ - userAttributes: ProxyRetailOnlyOrganizationUserCreateAttributesInput! -} - -""" -The result of creating a retail only organization user, this result responds to a request from the shopify proxy. -""" -type ProxyRetailOnlyOrganizationUserCreateResult { - """ - The Shopify User GID of the created ShopUser - """ - shopifyUserId: ID - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -The input fields for updating a retail only organization user, this input comes from the shopify proxy. -""" -input ProxyRetailOnlyOrganizationUserUpdateInput { - """ - The email of the retail only organization user. - """ - email: String - - """ - Flag to enable the initialization of the POS (Point of Sale) authorization - check, replacing the default authorization method. - """ - enableInitializePosCheck: Boolean = false - - """ - The first name of the retail only organization user. - """ - firstName: String - - """ - The last name of the retail only organization user. - """ - lastName: String - - """ - The locations input to update a retail user locations. - """ - locationAssignments: ProxyRetailOnlyOrganizationLocationAssignmentsInput - - """ - The phone number of the retail only organization user. - """ - phoneNumber: String - - """ - The PIN to access the POS App of the retail only shop user. - """ - posPin: String - - """ - The Shopify User GID of the user who requested the action. - """ - requesterShopifyUserId: ID! - - """ - The role ids to update for the retail user. - """ - roleAssignments: [AccessRoleID!] - - """ - The Shopify User GID of the User to update. - """ - shopifyUserId: ID! -} - -""" -The result of updating a retail only organization user, this result responds to a request from the shopify proxy. -""" -type ProxyRetailOnlyOrganizationUserUpdateResult { - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -The input object for deleting a retail only user from the organization's shop, this input comes from the shopify proxy. -""" -input ProxyRetailOnlyShopUserDeleteInput { - """ - Flag to enable the initialization of the POS (Point of Sale) authorization - check, replacing the default authorization method. - """ - enableInitializePosCheck: Boolean = false - - """ - The Shopify User GID of the user who requested the action. - """ - requesterShopifyUserId: ID! - - """ - The Shopify User GID of the User to delete. - """ - shopifyUserId: ID! -} - -""" -The result of deleting a retail only user from the organization's shop, this -result responds to a request from the shopify proxy. -""" -type ProxyRetailOnlyShopUserDeleteResult { - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type Query { - """ - Returns the apps for the given shopify app gids. - """ - apps(ids: [String!]!): [ShopApp!]! - - """ - Auto-generated POS pin for all of the shops in organization. - """ - autogeneratedPosPinForOrganization(posPinLength: Int): GeneratePosPinResult! - - """ - Auto-generated POS pin for a shop. - """ - autogeneratedPosPinForShop(posPinLength: Int, shopifyShopId: PropertyPublicID!): GeneratePosPinResult! - - """ - Returns collaborator access requirements for a partner on a shop. - """ - collaboratorAccessRequirements(organizationId: OrganizationID!, shopifyShopId: PropertyPublicID!): CollaboratorAccessRequirements! - - """ - Returns metadata for a specific document purpose, including required fields. - Returns null if no metadata exists for the purpose. Jurisdiction-specific - overrides take precedence over global defaults. - """ - documentPurposeMetadata(countryCode: CountryCodeWithDefault!, entityType: ApplicableEntityType!, purpose: DocumentPurpose!): DocumentPurposeMetadata - - """ - Returns metadata for all document purposes for a given jurisdiction and entity - type. Jurisdiction-specific overrides take precedence over global defaults. - """ - documentPurposeMetadataList(countryCode: CountryCodeWithDefault!, entityType: ApplicableEntityType!): [DocumentPurposeMetadata!]! - - """ - Returns entity supporting document types for the given country code and - category. Optionally filter by purpose. When purpose is not provided, all - document types for the given country and category are returned. - """ - entitySupportingDocumentTypes(category: Category!, countryCode: CountryCodeWithDefault!, purpose: DocumentPurpose): [SupportingDocumentType!]! - - """ - Returns the government identifier type with the given handle. - """ - governmentIdentifierType(handle: String!): GovernmentIdentifierType - - """ - Returns all government identifier types for the given country code and identifier category. - """ - governmentIdentifierTypesByCountryCode(countryCode: CountryCode!, identifierCategory: String): [GovernmentIdentifierType!]! - - """ - Checks whether a user (identified by identity UUID) has collaborator store - access on a shop, via a collaborator account (identified by shop user ID). - Returns null if the Business Platform cannot determine the result. - """ - hasCollaboratorPermission( - """ - The shop user ID of the collaborator account. - """ - collaboratorUserId: ID! - - """ - The identity UUID of the user requesting access. - """ - identityUuid: ID! - ): CollaboratorPermissionResult - - """ - Returns the legal entity type with the given handle. - """ - legalEntityType(handle: String!): LegalEntityType - - """ - Returns all legal entity types for the given country code and jurisdictions. - """ - legalEntityTypesByCountryCode(countryCode: CountryCode!, jurisdictions: [String!]): [LegalEntityType!]! - - """ - Returns the organization with the given identifier. - """ - organization(organizationId: OrganizationID): Organization - - """ - Returns all the organizations for the requesting property provider - """ - organizations( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): OrganizationConnection! - - """ - Returns Partner Orgs belonging to the IDs passed in - """ - partnerOrganizations(organizationIds: [OrganizationID!]!): [Organization!]! - - """ - Check the POS pin is valid - """ - posPinValidator(posPin: String!, shopifyShopId: PropertyPublicID!): PosPinValidatorResult! - - """ - Check the POS pin for violations - """ - posPinViolations(posPin: String!): PosPinViolations! - - """ - Returns true if the bearer token is privileged. - """ - privilegedActionCheck: Boolean! - - """ - Returns the property with the given identifier. - """ - property(externalId: PropertyPublicID!, offeringHandle: String!): PropertyInterface - - """ - Check the retail employee identifier is valid - """ - retailEmployeeIdentifierValidator(employeeIdentifier: String!): RetailEmployeeIdentifierValidatorResult! - - """ - Returns Partner Orgs that match the requesting search term. - """ - searchPartnerOrganizations(searchTerm: String!): [Organization!]! - - """ - Returns the shop details for the given shop ids, used for billing invoice details - """ - shopDetails(shopifyShopIds: [PropertyPublicID!]!): [ShopDetails!]! - - """ - Indicates whether a subdomain is available for a new shop. - """ - shopSubdomainAvailable(subdomain: String!): Boolean - - """ - Validate whether a shop is ready for a Vibe transfer. - """ - validateVibeTransferReadiness(shopId: PropertyPublicID!): ValidateVibeTransferReadinessResult! -} - -input RemoveOrganizationUserRoleInput { - """ - The ID of the Organization User who is removed a Role. - """ - organizationUserId: OrganizationUserID! -} - -type RemoveOrganizationUserRoleResult { - """ - The organization user with the removed role. - """ - organizationUser: OrganizationUser - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type RemoveShopAccessResult { - """ - ID of the mutated organization user. - """ - organizationUserId: OrganizationUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input RemoveShopFromNonPlusOrganizationInput { - """ - The ID of the shop to be removed from the non-plus organization. - """ - shopifyShopId: PropertyPublicID! -} - -type RemoveShopFromNonPlusOrganizationResult { - """ - The original organization that the store has now been removed from. - """ - organization: Organization - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input RequestCollaborationInput { - """ - Access code for requesting collaborator access. - """ - collaboratorAccessCode: String - - """ - Message included with collaborator access request. - """ - message: String - - """ - Collaborator permissions to request. - """ - permissions: [String!]! - - """ - The ID of the shop to request collaborator access for. - """ - shopifyShopId: PropertyPublicID! -} - -type RequestCollaborationResult { - """ - The collaborator relationship associated with the request. - """ - collaboratorRelationship: CollaboratorRelationship - - """ - Errors that occurred while requesting collaborator access. - """ - userErrors: [UserError!] -} - -""" -A field that must be visible on a supporting document -""" -type RequiredField { - """ - An example value for this field - """ - example: String - - """ - The field identifier (e.g., 'legal_name', 'date_of_birth', 'address') - """ - field: String! - - """ - The localized display label for this field - """ - label: String! -} - -type RerequestCollaboratorRelationshipResult { - """ - The collaborator relationship that was re-requested. - """ - collaboratorRelationship: CollaboratorRelationship - - """ - Errors that occurred while re-requesting the collaborator relationship. - """ - userErrors: [UserError!] -} - -type Reseller { - contactLink: String! - - """ - Discount rate percentage for the reseller - """ - discountRate: Decimal! - id: ID! - name: String! - organizationId: ID! - - """ - Revenue sharing percentage for the reseller - """ - revenueShare: Decimal! -} - -type ResellerRelationship { - activationLink: String - annualResoldPrice: Decimal - annualRevenue: Decimal - countryCode: String! - createdAt: ISO8601DateTime! - id: ID! - isTransferred: Boolean! - legalBusinessName: String - merchantEmail: String! - merchantPurchaseOrderNumber: String - monthlyResoldPrice: Money - organizationId: ID! - originalPlanPrice: Decimal - planCurrency: String - planName: String! - posProLocationsCount: Int! - - """ - The reseller associated with this relationship. - """ - reseller: Reseller - resellerPurchaseOrderNumber: String - resellerRemittancePrice: Decimal - shopifyShopId: ID! - status: ResellerRelationshipStatus! - supportedPlanName: ResellerRelationshipSupportedPlans - termLengthInMonths: Int - transferredAt: ISO8601DateTime -} - -enum ResellerRelationshipStatus { - """ - The reseller relationship has ended. - """ - ENDED - - """ - The associated store is in development. - """ - IN_DEVELOPMENT - - """ - The associated store has been transferred. - """ - TRANSFERRED - - """ - The associated store is pending transfer. - """ - TRANSFER_PENDING -} - -enum ResellerRelationshipSupportedPlans { - """ - The advanced plan. - """ - ADVANCED - - """ - The basic plan. - """ - BASIC - - """ - The grow plan. - """ - GROW - - """ - The professional plan. - """ - PROFESSIONAL - - """ - The unlimited plan. - """ - UNLIMITED -} - -type ResellerRelationshipUpdateResultField { - activationLink: String - annualResoldPrice: Decimal - annualRevenue: Decimal - countryCode: String! - id: ID! - isTransferred: Boolean! - legalBusinessName: String - merchantEmail: String! - merchantPurchaseOrderNumber: String - monthlyResoldPrice: Money - organizationId: ID! - originalPlanPrice: Decimal - planCurrency: String - planName: String! - posProLocationsCount: Int! - resellerPurchaseOrderNumber: String - resellerRemittancePrice: Decimal - shopId: ID! - termLengthInMonths: Int -} - -type ResellerRelationshipWithShop { - activationLink: String - annualResoldPrice: Decimal - annualRevenue: Decimal - countryCode: String! - createdAt: ISO8601DateTime! - id: ID! - isTransferred: Boolean! - legalBusinessName: String - merchantEmail: String! - merchantPurchaseOrderNumber: String - monthlyResoldPrice: Money - organizationId: ID! - originalPlanPrice: Decimal - planCurrency: String - planName: String! - posProLocationsCount: Int! - resellerPurchaseOrderNumber: String - resellerRemittancePrice: Decimal - shopName: String! - shopifyShopId: ID! - status: ResellerRelationshipStatus! - transferredAt: ISO8601DateTime -} - -""" -The connection type for ResellerRelationshipWithShop. -""" -type ResellerRelationshipWithShopConnection { - """ - A list of edges. - """ - edges: [ResellerRelationshipWithShopEdge!]! - - """ - A list of nodes. - """ - nodes: [ResellerRelationshipWithShop!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type ResellerRelationshipWithShopEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ResellerRelationshipWithShop! -} - -input ResetOrganizationUserTfaInput { - """ - The ID of the OrganizationUser to reset TFA enforcement. - """ - organizationUserId: OrganizationUserID! -} - -type ResetOrganizationUserTfaResult { - """ - The organization user with reset TFA enforcement. - """ - organizationUser: OrganizationUser - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Result of a legal entity match check: a verdict plus any matched legal entities. -""" -type ResolveLegalEntityMatchPayload { - """ - Matched legal entities. Empty for NO_MATCH; one for CONFIRMED_MATCH; one or - more for DISAMBIGUATION_CANDIDATES and MATCH_CONFLICT. - """ - legalEntities: [LegalEntity!]! - - """ - How the matcher classified the input against existing legal entities. - """ - verdict: EntityMatchVerdict! -} - -""" -Result of a person match check: a verdict plus any matched people. -""" -type ResolvePersonMatchPayload { - """ - Matched people. Empty for NO_MATCH; one for CONFIRMED_MATCH; one or more for DISAMBIGUATION_CANDIDATES and MATCH_CONFLICT. - """ - people: [Person!]! - - """ - How the matcher classified the input against existing records. - """ - verdict: EntityMatchVerdict! -} - -type ResyncUserDataAfterPartnerHandoffResult { - """ - Id of the shop that had data re-synced. - """ - shopId: ShopifyShopID -} - -""" -A retail access for a organization user. -""" -type RetailAccess { - """ - Whether the user has access to all locations. - """ - allLocationsAccess: Boolean! - - """ - Whether the user is currently logged in. - """ - currentlyLoggedIn: Boolean! - - """ - The employee identifier for the retail access. - """ - employeeIdentifier: String - - """ - Whether the user has POS access. - """ - hasPosAccess: Boolean! - - """ - The ID of the retail access. - """ - id: String! - - """ - Whether the user can initialize POS. - """ - initializePos: Boolean! - - """ - The location assignments for the retail access. - """ - locationAssignments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): RetailLocationAssignmentsConnection! - - """ - The ID of the organization user. - """ - organizationUserId: String! - - """ - The POS pin for the shop. - """ - posPin: String - - """ - The shop. - """ - shop: Shop! -} - -""" -The connection type for RetailAccess. -""" -type RetailAccessConnection { - """ - A list of edges. - """ - edges: [RetailAccessEdge!]! - - """ - A list of nodes. - """ - nodes: [RetailAccess!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type RetailAccessEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: RetailAccess! -} - -type RetailConfig { - posChannelInstalled: Boolean! - roleSelectionEnabled: Boolean! -} - -type RetailData { - canInitializePos: Boolean! - posAccess: Boolean! - retailRole: RetailRole -} - -type RetailEmployeeIdentifierValidatorResult { - """ - Whether the POS PIN is valid. - """ - success: Boolean! - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type RetailLocation { - """ - The location address - """ - address: RetailLocationAddress! - - """ - The location name - """ - name: String! - - """ - The location id - """ - shopifyLocationId: ID! -} - -type RetailLocationAddress { - """ - The formatted address - """ - formatted: [String!] -} - -type RetailLocationAssignments { - """ - The ID of the retail location assignment. - """ - id: String! - - """ - The Shopify location ID. - """ - shopifyLocationId: String! -} - -""" -The connection type for RetailLocationAssignments. -""" -type RetailLocationAssignmentsConnection { - """ - A list of edges. - """ - edges: [RetailLocationAssignmentsEdge!]! - - """ - A list of nodes. - """ - nodes: [RetailLocationAssignments!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type RetailLocationAssignmentsEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: RetailLocationAssignments! -} - -""" -Available plans for retail locations -""" -enum RetailLocationPlan { - """ - Locations that have the Lite Plan. - """ - LITE - - """ - Locations that have the Pro Plan. - """ - PRO - - """ - Locations that have the Pro Plan until the end of the trial. - """ - TRIAL -} - -type RetailLocationsResult { - """ - The cursor - """ - cursor: String! - - """ - The retail locations - """ - locations: [RetailLocation!]! - - """ - The page info - """ - pageInfo: PageInfo! - - """ - The total count - """ - totalCount: Int! -} - -""" -The input fields used to update a retail only organization user. -""" -input RetailOnlyOrganizationUserUpdateInput { - """ - List of group_ids to add the retail only organization user to. - """ - groupIdsToAdd: [GroupID!] - - """ - List of group_ids to remove the retail only organization user from. - """ - groupIdsToRemove: [GroupID!] - - """ - The location assignments to create for the retail user. - """ - locationAssignments: [RetailUserLocationAssignmentsInput!] - - """ - The ID of the organization user to update. - """ - organizationUserId: OrganizationUserID! - - """ - List of role assignments to update or create to the retail only organization user. - """ - roleAssignmentsToUpdate: [RoleAssignmentInput!] - - """ - List of roles_ids to unassign from the retail only organization user. - """ - rolesToUnassign: [AccessRoleID!] - - """ - The user attributes to update. - """ - userAttributes: RetailOnlyOrganizationUserUpdateUserAttributesInput -} - -type RetailOnlyOrganizationUserUpdateResult { - """ - The updated organization user. - """ - organizationUser: OrganizationUserInterface - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -The user attributes to update a retail user. -""" -input RetailOnlyOrganizationUserUpdateUserAttributesInput { - """ - The email of the user to be updated. - """ - email: String - - """ - The first name of the user to be updated. - """ - firstName: String - - """ - The last name of the user to be updated. - """ - lastName: String - - """ - The phone number of the user to be updated. - """ - phoneNumber: String - - """ - The pos pins of the user to be updated. - """ - posPins: [PosPinInput!] -} - -""" -The input fields used to create a retail user. -""" -input RetailOnlyOrganizationUsersCreateInput { - """ - The array of IDs of the groups to add the user to. - """ - groupIds: [GroupID!] - - """ - The location assignments to create for the retail user. - """ - locationAssignments: [RetailUserLocationAssignmentsInput!] - - """ - The role assignments to create for the retail user. - """ - roleAssignments: [RoleAssignmentInput!] - - """ - The users attributes to create. - """ - usersAttributes: [RetailOnlyUserAttributesInput!]! -} - -type RetailOnlyOrganizationUsersCreateResult { - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] - - """ - The data of the added users. - """ - usersDetails: [RetailUserDetailsResult!] -} - -""" -The user attributes to create a retail user. -""" -input RetailOnlyUserAttributesInput { - """ - The email of the user to be created. - """ - email: String - - """ - The first name of the user to be created. - """ - firstName: String! - - """ - The last name of the user to be created. - """ - lastName: String! - - """ - The phone number of the user to be created. - """ - phoneNumber: String - - """ - The pos pins of the user to be created. - """ - posPins: [PosPinInput!]! -} - -type RetailRole { - """ - Whether the role is the shop's default role. - """ - default: Boolean! - id: ID! - - """ - Kind for the retail role. - """ - kind: RetailRoleKind! - - """ - The name of the retail role. - """ - name: String! - - """ - Permission settings for the retail role. - """ - retailRolePermissions: [RetailRolePermission!]! -} - -enum RetailRoleKind { - """ - Account owner kind. - """ - ACCOUNT_OWNER - - """ - Full permissions kind. - """ - FULL_PERMISSIONS - - """ - Limited permissions kind. - """ - LIMITED_PERMISSIONS - - """ - POS user kind. - """ - POS_USER -} - -type RetailRolePermission { - access: String! - retailPermissionTag: String! -} - -""" -A shop with retail/POS-specific data for user management purposes -""" -type RetailShop { - """ - The name of the shop - """ - name: String! - - """ - Get the Retail specific data for the current shop. - """ - retailData: ShopRetailData! - - """ - Get the retail pro locations for the current shop - """ - retailLocations(after: String, before: String, first: Int, last: Int, plan: RetailLocationPlan, shopifyLocationIds: [ID!], shopifyUserId: ID): RetailLocationsResult! - - """ - The ID of the shop in Shopify - """ - shopifyShopId: ID! -} - -type RetailUserDetailsResult { - """ - The email of the created user. - """ - email: String - - """ - The first name of the created user. - """ - firstName: String - - """ - The last name of the created user. - """ - lastName: String - - """ - The IDs of the created organization users. - """ - organizationUserIds: [OrganizationUserID!] - - """ - The phone number of the created user. - """ - phoneNumber: String -} - -""" -The input fields used to determine which locations a retail user has access to. -""" -input RetailUserLocationAssignmentsInput { - """ - Whether the retail user should have access to all locations. - """ - allLocationsAccess: Boolean = false - - """ - The locations to add to the retail user, i.e. ['gid://shopify/Location/11']. - """ - shopifyLocationIdsToAdd: [ID!] - - """ - The locations to remove from the retail user, i.e. ['gid://shopify/Location/12']. - """ - shopifyLocationIdsToRemove: [ID!] - - """ - The shopify shop id to assign locations to, i.e. 'gid://organization/ShopifyShop/10'. - """ - shopifyShopId: ID! -} - -type Role implements Node { - administrativePermissions: [String!]! - - """ - The ID for an object. - """ - id: GlobalID! - name: String! - queryComplexity: Int! - queryDepth: Int! - shopRoles( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ShopRoleConnection! - usersCount: Int! -} - -input RoleAssignmentInput { - """ - The ID of the role to change. - """ - roleId: AccessRoleID! - - """ - The array of Shopify shop IDs to assign the role to. - """ - shopIdsToAssign: [PropertyPublicID!] - - """ - The array of Shopify shop IDs to unassign the role from. - """ - shopIdsToUnassign: [PropertyPublicID!] - targetType: AccessRoleAssignmentTarget! -} - -""" -The connection type for Role. -""" -type RoleConnection { - """ - A list of edges. - """ - edges: [RoleEdge!]! - - """ - A list of nodes. - """ - nodes: [Role!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type RoleEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Role! -} - -""" -Represents a single filter option for access roles queries. -""" -input RoleFilterInput { - field: AccessRoleFilterField! - operator: AccessRoleFilterOperator! - value: String! -} - -""" -The ID for a Role. -""" -scalar RoleID - -""" -Sort options for role queries. -""" -enum RoleSort { - """ - Sort by category ascending. - """ - CATEGORY_ASC - - """ - Sort by category descending. - """ - CATEGORY_DESC - - """ - Sort by name ascending. - """ - NAME_ASC - - """ - Sort by name descending. - """ - NAME_DESC -} - -""" -The result of deleting roles. -""" -type RolesDeleteResult { - """ - The deleted role id. - """ - deletedIds: [AccessRoleID!] - - """ - Indicates whether the mutation was successful. - """ - success: Boolean - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type SamlConfiguration implements Node { - """ - The ID for an object. - """ - id: GlobalID! - idpCertificate: String - idpCertificateFingerprint: String - idpEntityId: String - idpMetadataUrl: String! - idpSsoTargetUrl: String - queryComplexity: Int! - queryDepth: Int! -} - -""" -Scopes for the requester's ability to manage role assignments across stores. -""" -type ScopesForManagingRoleAssignments { - canAssignRolesToAllCollaboratorStores: Boolean! - canAssignRolesToAllOwnedStores: Boolean! - canAssignRolesToAllOwnedStoresForGroups: Boolean! -} - -input SetOrganizationShopBillingAccountIdInput { - """ - The ID of the billing account to set. - """ - billingAccountId: Int! - - """ - The GID of the shop to update. - """ - shopifyShopId: ShopifyShopID! -} - -type SetOrganizationShopBillingAccountIdResult { - """ - The shop that was updated. - """ - shop: Shop - - """ - The collection of user errors. - """ - userErrors: [UserError!] -} - -type SetShopTestDriveStatusResult { - success: Boolean! -} - -input SetupSamlIntegrationInput { - """ - The SAML configuration metadata URL. - """ - idpMetadataUrl: String! -} - -type SetupSamlIntegrationResult { - """ - The organization object. - """ - organization: Organization - - """ - List of user errors of setup integration operation. - """ - userErrors: [UserError!] -} - -type Shop implements PropertyInterface { - apps( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ShopAppConnection - - """ - The billing account ID for the shop - """ - billingAccountId: String - - """ - The currency the shop is billed in - """ - billingCurrency: String - - """ - Check if the current user can access the shop. - """ - canCurrentUserAccess: Boolean! - - """ - Check if the shop can be transferred to a new owner outside of the requester's current organization. - """ - canTransferExternally: Boolean! - - """ - Check if the shop can be transferred to an existing organization owned by the requester. - """ - canTransferInternally: Boolean! - channels( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): ShopChannelConnection - - """ - The client transfer request for this shop, if one exists. - """ - clientTransferRequest: ClientTransferRequest - - """ - The collaborator relationship for the current organization (if this is a collaborator shop) - """ - collaboratorRelationship: CollaboratorRelationship - - """ - The date and time the shop was created - """ - createdAt: ISO8601DateTime! - - """ - The active developer preview handle for the shop - """ - developerPreviewHandle: String - - """ - Property public identifier. - """ - externalId: PropertyPublicID - - """ - A pending transfer exists. - """ - hasPendingTransfer: Boolean - - """ - Property global identifier. - """ - id: PropertyId! - identificationSettings: ShopIdentificationSettings! - isMainShop: Boolean! - - """ - Whether the shop can rollback from Markets Home - """ - marketsHomeRollbackCompatible: MarketsHomeRollbackCompatibleResult! - - """ - Whether the shop is ready to rollout Markets Home - """ - marketsHomeRolloutCompatible: MarketsHomeRolloutCompatibleResult! - name: String! - - """ - The offering for this property. - """ - offering: Offering - - """ - The organization this property belongs to. - """ - organization: Organization - ownerDetails: PrivateData - - """ - Returns pending transfer if one exists. - """ - pendingExternalTransfer: ExternalShopTransferRequest - - """ - The name of the shop's plan. - """ - planName: String - - """ - The variant name of the shop's plan - """ - planVariantName: String - primaryDomain: String - queryComplexity: Int! - queryDepth: Int! - - """ - The reseller relationship for the shop - """ - resellerRelationship: ResellerRelationship - - """ - Get the Retail specific data for the current shop. - """ - retailData: ShopRetailData! - - """ - Get the retail pro locations for the current shop - """ - retailLocations(after: String, before: String, first: Int, last: Int, plan: RetailLocationPlan, shopifyLocationIds: [ID!], shopifyUserId: ID): RetailLocationsResult! - - """ - The ID of the shop in Shopify - """ - shopifyShopId: ID - shortName: String - status: ShopPropertyStatus! - storeAdditionRequest: StoreAdditionRequest - storeType: Store - testDriveStatus(handle: String!): TestDriveShopStatus! - themes: [ShopTheme!] - - """ - Whether the shop is a transferrable client store - """ - transferrableClientStore: Boolean! - url: URL - - """ - The user limits for the shop. - """ - userLimits: UserLimits! - usersCount: Int! -} - -type ShopAccess { - accessConditions: [String!] - accessLevel: ShopUserAccessLevel! - appPermissions: [String!] - collaborator: Boolean! - collaboratorTeamMember: Boolean! - - """ - Returns all permissions that can be managed by the current user for this shop access. - """ - editablePermissions: [String!] - hasPosAccess: Boolean! - hasPosAccessEnforced: Boolean! - initializePosEnforced: Boolean! - permissions: [String!] - shopProperty: PropertyInterface! - shopifyUserId: String - status: ShopUserStatus! -} - -""" -The connection type for ShopAccess. -""" -type ShopAccessConnection { - """ - A list of edges. - """ - edges: [ShopAccessEdge!]! - - """ - A list of nodes. - """ - nodes: [ShopAccess!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type ShopAccessEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ShopAccess! -} - -input ShopAccessInput { - """ - List of access conditions. - """ - accessConditions: [String!] - - """ - List of Shopify app id's to permit access i.e. ["gid://shopify/App/123123"] - """ - appPermissions: [ID!] - - """ - Whether this role grants POS access to the shop. - """ - hasPosAccess: Boolean - - """ - Whether this role grants the ability to initialize POS. - """ - initializePos: Boolean - - """ - List of shop permissions. - """ - permissions: [String!] - shopifyShopId: PropertyPublicID! -} - -type ShopApp implements Node { - handle: String - iconUrl: String - - """ - The ID for an object. - """ - id: GlobalID! - name: String - queryComplexity: Int! - queryDepth: Int! - shopifyGid: ID! -} - -""" -The connection type for ShopApp. -""" -type ShopAppConnection { - """ - A list of edges. - """ - edges: [ShopAppEdge!]! - - """ - A list of nodes. - """ - nodes: [ShopApp!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type ShopAppEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ShopApp! -} - -type ShopChannel implements Node { - iconUrl: String - - """ - The ID for an object. - """ - id: GlobalID! - name: String - queryComplexity: Int! - queryDepth: Int! - shopifyGid: ID! -} - -""" -The connection type for ShopChannel. -""" -type ShopChannelConnection { - """ - A list of edges. - """ - edges: [ShopChannelEdge!]! - - """ - A list of nodes. - """ - nodes: [ShopChannel!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type ShopChannelEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ShopChannel! -} - -""" -The connection type for Shop. -""" -type ShopConnection { - """ - A list of edges. - """ - edges: [ShopEdge!]! - - """ - A list of nodes. - """ - nodes: [Shop!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -type ShopDetails { - """ - The name of the shop. - """ - name: String! - - """ - The primary domain of the shop. - """ - primaryDomain: String - - """ - The ID of the shop in Shopify. - """ - shopifyShopId: ID! -} - -""" -An edge in a connection. -""" -type ShopEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: Shop! -} - -""" -Field options for filtering shop queries. -""" -enum ShopFilterField { - """ - The phase of the client transfer process. Requires - `store_type=client_transfer`. Values: `in_development`, `pending`, `completed`. - """ - CLIENT_TRANSFER_PHASE - - """ - The status of the collaborator relationship. Requires - `store_type=collaborator`. Values: `active`, `access_pending`, `expired`. - """ - COLLABORATOR_RELATIONSHIP_STATUS - - """ - The GID of the counterpart organization. Requires `store_type=client_transfer` or `store_type=collaborator`. - """ - COUNTERPART_ORGANIZATION_ID - - """ - The GID of the owning organization of the shop. - """ - OWNER_ORGANIZATION_ID - - """ - The plan of the shop. Values: `basic`, `grow`, `plus`, `frozen`, `advanced`, - `inactive`, `cancelled`, `client_transfer`, `plus_client_transfer`, - `development_legacy`, `custom`, `fraudulent`, `staff`, `trial`, - `plus_development`, `retail`, `shop_pay_commerce_components`, `non_profit`. - With the `In` operator, use raw plan names (e.g. "professional,shopify_plus"). - """ - SHOP_PLAN - - """ - The active/inactive status of the shop. Values: `active`, `inactive`. - """ - STORE_STATUS - - """ - The type of the shop. Does not support the `In` operator. Values: - `development`, `production`, `app_development`, `development_superset`, - `client_transfer`, `collaborator`. - """ - STORE_TYPE -} - -""" -Represents a single filter option for shop queries. When using the `In` -operator, pass a comma-separated string of values (e.g. "value1,value2"). -Maximum 20 values. -""" -input ShopFilterInput { - field: ShopFilterField! - operator: Operator! - value: String! -} - -""" -The ID for a Shop. -""" -scalar ShopID - -type ShopIdentificationSettings { - code: String! - internalName: String! - logoImageUrl: String -} - -type ShopIdentificationSettingsDuplicationCheck { - code: ShopIdentificationSettingsErrorCode! - field: [String!]! - message: String! -} - -enum ShopIdentificationSettingsErrorCode { - """ - A matching code already exists within the orgnanization. - """ - DUPLICATE_CODE - - """ - A matching internal name already exists within the organization. - """ - DUPLICATE_INTERNAL_NAME -} - -type ShopIdentificationSettingsUpdateResult { - """ - Mutated shopify shop id. - """ - shopifyShopId: ShopifyShopID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Field options for filtering shop property queries. -""" -enum ShopPropertyFilterField { - """ - The active/inactive status of the shop. - """ - STORE_STATUS - - """ - The type of the shop. - """ - STORE_TYPE - - """ - The test drive handle which is active. - """ - TEST_DRIVE_HANDLE_IS_ACTIVE - - """ - The test drive handle which is is inactive. - """ - TEST_DRIVE_HANDLE_IS_INACTIVE -} - -""" -Represents a single filter option for shop property queries. -""" -input ShopPropertyFilterInput { - field: ShopPropertyFilterField! - operator: Operator! - value: String! -} - -""" -Sort options for shop property queries. -""" -enum ShopPropertySort { - """ - Sort by shop name ascending. - """ - NAME_ASC - - """ - Sort by shop name descending. - """ - NAME_DESC -} - -enum ShopPropertyStatus { - ACTIVE - INACTIVE -} - -type ShopRetailData { - hasPosProSubscription: Boolean! -} - -type ShopRole implements Node { - accessConditions: [String!] - appPermissions: [String!] - hasPosAccess: Boolean - - """ - The ID for an object. - """ - id: GlobalID! - initializePos: Boolean - permissions: [String!] - queryComplexity: Int! - queryDepth: Int! - shop: Shop! -} - -""" -The connection type for ShopRole. -""" -type ShopRoleConnection { - """ - A list of edges. - """ - edges: [ShopRoleEdge!]! - - """ - A list of nodes. - """ - nodes: [ShopRole!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type ShopRoleEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: ShopRole! -} - -""" -Sort options for accessible shop queries. -""" -enum ShopSort { - """ - Sort by client transfer phase ascending (in_development, pending, completed). - """ - CLIENT_TRANSFER_PHASE_ASC - - """ - Sort by client transfer phase descending (completed, pending, in_development). - """ - CLIENT_TRANSFER_PHASE_DESC - - """ - Sort by collaborator approved at ascending. - """ - COLLABORATOR_APPROVED_AT_ASC - - """ - Sort by collaborator approved at descending. - """ - COLLABORATOR_APPROVED_AT_DESC - - """ - Sort by collaborator relationship status ascending (pending, active, expired). - """ - COLLABORATOR_RELATIONSHIP_STATUS_ASC - - """ - Sort by collaborator relationship status descending (expired, active, pending). - """ - COLLABORATOR_RELATIONSHIP_STATUS_DESC - - """ - Sort by developer preview handle ascending. - """ - DEVELOPER_PREVIEW_HANDLE_ASC - - """ - Sort by developer preview handle descending. - """ - DEVELOPER_PREVIEW_HANDLE_DESC - - """ - Sort by store name ascending. - """ - NAME_ASC - - """ - Sort by store name descending. - """ - NAME_DESC - - """ - Sort by plan name ascending. - """ - PLAN_NAME_ASC - - """ - Sort by plan name descending. - """ - PLAN_NAME_DESC - - """ - Sort by shop created at ascending. - """ - SHOP_CREATED_AT_ASC - - """ - Sort by shop created at descending. - """ - SHOP_CREATED_AT_DESC - - """ - Sort by shop organization name ascending. - """ - SHOP_ORGANIZATION_NAME_ASC - - """ - Sort by shop organization name descending. - """ - SHOP_ORGANIZATION_NAME_DESC - - """ - Sort by shop plan active status ascending (active first). - """ - SHOP_PLAN_ACTIVE_STATUS_ASC - - """ - Sort by shop plan active status descending (inactive first). - """ - SHOP_PLAN_ACTIVE_STATUS_DESC - - """ - Sort by transfer target organization name ascending. - """ - TRANSFER_TARGET_ORGANIZATION_NAME_ASC - - """ - Sort by transfer target organization name descending. - """ - TRANSFER_TARGET_ORGANIZATION_NAME_DESC -} - -type ShopTheme { - isCurrentTheme: Boolean - name: String! - shopifyThemeId: String! - shopifyUpdatedAt: String! -} - -enum ShopUserAccessLevel { - """ - The shop user is the owner of the shop. - """ - ACCOUNT_OWNER - - """ - The shop user has full access. - """ - FULL_ACCESS - - """ - The shop user has limited access. - """ - LIMITED_ACCESS - - """ - The shop user has no access. - """ - NO_ACCESS - - """ - The shop user has POS access. - """ - POS_ACCESS -} - -enum ShopUserStatus { - """ - The shop user is active. - """ - ACTIVE - - """ - The shop user is pending. - """ - PENDING - - """ - The shop user is inactive. - """ - SUSPENDED -} - -type ShopifyShop { - retailConfig: RetailConfig - retailRoles: [RetailRole!] -} - -""" -The ID for a ShopifyShop. -""" -scalar ShopifyShopID - -type StaffMember { - authorizedApplications: [AuthorizedApplication!] - bio: String - hasDefaultName: Boolean - hasPin: Boolean! - id: ID! - initials: [String!] - phone: String - posEligible: Boolean - receiveAnnouncements: Boolean - recentAdminBrowserSessions: [AdminBrowserSession!] - retailData: RetailData - shopifyShop: ShopifyShop - url: String -} - -input StageOrganizationUserImportCsvUploadInput { - """ - Metadata for the CSV file to be uploaded. - """ - fileMetadata: OrganizationUserImportFileMetadataInput! -} - -type StageOrganizationUserImportCsvUploadResult { - directUploadParams: OrganizationUserImportDirectUploadParams - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input StageSupportingDocumentUploadInput { - """ - The attachments to be uploaded. - """ - attachments: [FileAttachmentInput!]! - - """ - The country code of the entity the document is applicable to. - """ - countryCode: CountryCode - - """ - The specific type of localized document being uploaded. - """ - documentType: Document! - - """ - The name of the document. - """ - name: String - - """ - The entity the document is applicable to. Optional to support pre-staging documents before entity creation. - """ - supportedEntityId: SupportedEntityId -} - -type StageSupportingDocumentUploadResult { - directUploadParams: [DirectUploadParams!] - supportingDocument: SupportingDocument - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -enum Store { - APP_DEVELOPMENT - CLIENT_TRANSFER - COLLABORATOR - DEVELOPMENT - DEVELOPMENT_SUPERSET - PRODUCTION -} - -""" -A summary of current store access for the user. -""" -type StoreAccessSummary { - """ - Shop ids of the shop user has access to collectively. - """ - shopifyShopIds: [ShopifyShopID!] -} - -type StoreAdditionRequest implements Node { - """ - The ID for an object. - """ - id: GlobalID! - owner: PrivateData! - queryComplexity: Int! - queryDepth: Int! - shopProperty: PropertyInterface - shopifyShopExists: Boolean! - shortName: String - status: StoreAdditionRequestStatus! - storeCopyRequest: StoreCopyRequest - storeDomain: String - storeName: String! - storeType: Store -} - -""" -The connection type for StoreAdditionRequest. -""" -type StoreAdditionRequestConnection { - """ - A list of edges. - """ - edges: [StoreAdditionRequestEdge!]! - - """ - A list of nodes. - """ - nodes: [StoreAdditionRequest!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type StoreAdditionRequestEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: StoreAdditionRequest! -} - -""" -The ID for a StoreAdditionRequest. -""" -scalar StoreAdditionRequestID - -""" -Sort options for store addition requests. -""" -enum StoreAdditionRequestSort { - """ - Sort by shop name ascending. - """ - NAME_ASC - - """ - Sort by shop name descending. - """ - NAME_DESC -} - -enum StoreAdditionRequestStatus { - APPROVED - PENDING - REJECTED -} - -type StoreCopyChoice implements Node { - choiceType: String! - completedObjectCount: Int - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! - totalObjectCount: Int - value: String! -} - -""" -The connection type for StoreCopyChoice. -""" -type StoreCopyChoiceConnection { - """ - A list of edges. - """ - edges: [StoreCopyChoiceEdge!]! - - """ - A list of nodes. - """ - nodes: [StoreCopyChoice!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type StoreCopyChoiceEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: StoreCopyChoice! -} - -input StoreCopyCreationInput { - """ - Whether files should be copied to the new store. - """ - fileCopyingSelected: Boolean - - """ - Whether merchandising data should be copied to the new store. - """ - merchandisingDataCopyingSelected: Boolean - - """ - The source Shopify shop ID from which to copy data. - """ - sourceShopifyShopId: PropertyPublicID! - - """ - The theme IDs to copy from the source shop. - """ - themesToCopy: [String!] -} - -type StoreCopyRequest implements Node { - choices( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): StoreCopyChoiceConnection! - completedAt: ISO8601DateTime - - """ - The ID for an object. - """ - id: GlobalID! - queryComplexity: Int! - queryDepth: Int! - sourceShopProperty: PropertyInterface! - status: StoreCopyRequestStatus! -} - -enum StoreCopyRequestStatus { - """ - The store copy failed. - """ - FAILED - - """ - The store copy is currently in progress. - """ - IN_PROGRESS - - """ - The store copy has not started yet. - """ - PENDING - - """ - The store copy succeeded. - """ - SUCCEEDED -} - -input StoreCreatePayloadExtraInput { - """ - The Ironclad contract ID to associate with the shop at signup time. - """ - contractId: String - - """ - The app selected by the merchant during signup. - """ - selectedApp: String - - """ - The domain selected by the merchant during signup. - """ - selectedDomain: String - - """ - The plan selected by the merchant during signup. - """ - selectedPlan: String - - """ - The theme selected by the merchant during signup. - """ - selectedTheme: String -} - -input StoreCreatePayloadInput { - """ - The primary street address of the merchant where they signed up. - """ - address1: String - - """ - The secondary street address of the merchant where they signed up. - """ - address2: String - - """ - The city of the merchant where they signed up. - """ - city: String - - """ - Extra parameters associated with the store creation. - """ - extra: StoreCreatePayloadExtraInput - - """ - The number of stores owned by the user. Used for generating unique store names. - """ - ownedStoreCount: Int - - """ - The state/province/region of the merchant where they signed up. - """ - province: String - - """ - The signup types associated with the store creation. - """ - signupTypes: [String!] - - """ - Tracking information associated with the store creation. - """ - trackingInformation: StoreCreatePayloadTrackingInformationInput - - """ - The postal code of the merchant where they signed up. - """ - zip: String -} - -input StoreCreatePayloadShopConversionParamsInput { - """ - Multitrack token - unique cookie for unauthenticated sites like shopify.com - """ - _y: String - - """ - To support Shopify GO during Signup, each Shopify GO promotional program has a code to identify itself. - """ - promotionalProgramCode: String - - """ - Partners distribute this promo code to their qualifying merchants under Shopify Go promotional programs. - """ - promotionalProgramPromoCode: String - ref: String - - """ - Essential token - unique cookie for unauthenticated sites like shopify.com - """ - shopifyEssential: String - - """ - The compliance zone of the merchant during the signup. - """ - signupComplianceZone: String - - """ - The consent state of the merchant during the signup. - """ - signupConsentAnalytics: Boolean - - """ - The consent state of the merchant during the signup. - """ - signupConsentMarketing: Boolean - - """ - Signup flow started on this page. - """ - signupPage: String - - """ - Page view before signup_page. - """ - signupPageReferer: String - - """ - A unique ID to link a shop with the Signup Questionnaire (SQ) or Commerce - Questionnaire (CQ) while the shop is being created. - """ - signupSessionId: String - signupSource: String - source: String - - """ - First brochure page viewed. - """ - sourceUrl: String - sourceUrlReferer: String - - """ - SSID of source or ref. - """ - ssid: String - - """ - Analytics info for merchant marketing. - """ - utmz: String -} - -input StoreCreatePayloadTrackingInformationInput { - """ - The shop conversion tracking parameters. - """ - shopConversionParams: StoreCreatePayloadShopConversionParamsInput -} - -type StoreCreation { - shopifyPermanentDomain: String - status: StoreCreationStatus! -} - -enum StoreCreationStatus { - AWAITING_CORE_STORE_READY - CALLING_CORE - COMPLETE - FAILED - FINALIZING - TIMED_OUT - USER_ERROR -} - -input StoreIdentifierInput @oneOf { - """ - Permanent domain of a shop to lookup. - """ - domain: String - - """ - ID of a store to lookup. - """ - id: ShopID -} - -""" -A summary of the permissions for a store role. -""" -type StoreRoleSummary { - accessConditions: [String!] - permissions: [AccessRolePermission!] - pointOfSaleAccess: AccessPointOfSaleAccess - recordPermissions: [AccessRoleRecordPermission!] - shopifyShopIds: [ShopifyShopID!] -} - -type StoresList { - remainingCount: Int! - selectedStores: [Shop!] - stores: [String!]! @deprecated(reason: "Use `selectedStores` instead.") -} - -scalar SupportedEntityId - -type SupportingDocument implements Node { - """ - Returns the URL of the supporting document attachment by the specified ID. - """ - attachmentUrl(id: DocumentAttachmentID!): URL - attachments( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): DocumentAttachmentConnection - countryCode: CountryCodeWithDefault! - - """ - OCR-extracted field data from this document. - """ - documentFields( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - ): DocumentFieldConnection! - documentType: Document! @deprecated(reason: "Use the 'supporting_document_type' field instead") - - """ - The ID for an object. - """ - id: GlobalID! - name: String - queryComplexity: Int! - queryDepth: Int! - supportingDocumentType: SupportingDocumentType! -} - -input SupportingDocumentAttachmentInput { - """ - The entity the document is applicable to. - """ - directUploadToken: String! - - """ - The linked attachment id as part of the supporting document - """ - documentAttachmentId: DocumentAttachmentID! -} - -""" -The connection type for SupportingDocument. -""" -type SupportingDocumentConnection { - """ - A list of edges. - """ - edges: [SupportingDocumentEdge!]! - - """ - A list of nodes. - """ - nodes: [SupportingDocument!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An edge in a connection. -""" -type SupportingDocumentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of the edge. - """ - node: SupportingDocument! -} - -""" -The ID for a SupportingDocument. -""" -scalar SupportingDocumentID - -enum SupportingDocumentPagesTypeEnum { - MULTI_PAGE - SINGLE_SIDED - TWO_SIDED -} - -type SupportingDocumentType { - """ - Whether multiple documents of this type can be associated (e.g., licenses from different states). - """ - allowsMultiple: Boolean - countryCode: CountryCodeWithDefault! - governmentIssued: Boolean - handle: Document! - hasPhoto: Boolean - hasSignature: Boolean - name: String! - nativeName: String - pages: SupportingDocumentPagesTypeEnum! - - """ - The purposes for this document type (e.g., proof of identity, proof of address). - """ - purposes: [DocumentPurpose!]! - - """ - The field handles representing data physically present on this document (e.g., name, date_of_birth). - """ - schema: [String!] -} - -type SyncShopTestDriveStatusResult { - success: Boolean! -} - -type Tag { - """ - Tag handle - """ - handle: String! - - """ - Tag name - """ - name: String! -} - -input TestDriveBulkUpdateInput { - """ - The handle for the test drive that is being updated. - """ - handle: String! - - """ - The mapping of a shop to its desired state for the test drive. - """ - shopStatus: [TestDriveShopStatusInput!] -} - -type TestDriveBulkUpdateResult { - """ - The affected shopify shop ids. - """ - shopifyShopIds: [ShopifyShopID!] - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type TestDriveFeature { - autoEnableForFutureShops: Boolean! - - """ - The date and time when the feature will be automatically released. - """ - autoReleaseDate: ISO8601DateTime! - changelogUrl: URL - description: String! - editionsUrl: URL - endDate: ISO8601DateTime! - handle: String! - helpdocsUrl: URL - limitationsUrl: URL - name: String! - shopCount(storeType: Store): TestDriveShopCount! - startDate: ISO8601DateTime! - supportDocumentUrl: URL -} - -type TestDriveShopCount { - activeShops: Int! - totalShops: Int! -} - -enum TestDriveShopStatus { - ACTIVATING - ACTIVE - DEACTIVATING - INACTIVE -} - -input TestDriveShopStatusInput { - """ - The ID of the shop. - """ - shopifyShopId: PropertyPublicID! - - """ - The desired state of the shop for the test drive. - """ - status: TestDriveShopStatus! -} - -enum TfaEnforcement { - """ - TFA enforcement is fully enforced. - """ - fully_enforced - - """ - TFA enforcement is in progress. - """ - in_progress - - """ - TFA enforcement is manually enforced. - """ - manually_enforced -} - -input ToggleTestDriveForAllShopsInput { - """ - Whether all existing shops in an organization will be opted into a test drive feature. - """ - active: Boolean! - - """ - The handle of the target test drive feature. - """ - handle: String! - - """ - The store type that will be impacted by the change. - """ - storeType: Store -} - -type ToggleTestDriveForAllShopsResult { - """ - The affected shopify shop ids. - """ - shopifyShopIds: [ShopifyShopID!] - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -An RFC 3986 and RFC 3987 compliant URI string. -""" -scalar URL - -input UpdateAddressInput { - """ - The first line of the address. Typically the street address or PO Box number. - """ - addressLine1: String - - """ - The second line of the address. Typically the number of the apartment, suite, or unit. - """ - addressLine2: String - - """ - The address variants. - """ - addressVariants: [AddressVariantInput!] - - """ - The name of the city, district, village, or town. - """ - city: String - - """ - The id of the address to update. - """ - id: AddressID - - """ - The zip or postal code of the address. - """ - postalCode: String - - """ - The code for the region of the address. - """ - stateOrProvince: String -} - -""" -Inputs for updating government identifiers. -""" -input UpdateGovernmentIdentifierInput { - """ - The country code of the GovernmentIdentifier. - """ - countryCode: CountryCode! - - """ - The ID of the GovernmentIdentifier to update. - """ - id: GovernmentIdentifierID! - - """ - The type of the GovernmentIdentifier. - """ - identifierType: GovernmentIdentifierTypeInput! - - """ - The value of the GovernmentIdentifier. - """ - value: String! -} - -input UpdateLegacyPartnerUserPermissionsInput { - """ - The ID of the Partner business user. - """ - businessUserId: BusinessUserID! - - """ - The permissions to disable for the Partner business user. - """ - propertyProvidersToDisable: [String!]! - - """ - The permissions to enable for the Partner business user. - """ - propertyProvidersToEnable: [String!]! -} - -type UpdateLegacyPartnerUserPermissionsResult { - """ - The ID of the updated business user. - """ - businessUserId: BusinessUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input UpdateLegalEntityInput { - """ - The updated address attributes. The country code is immutable. - """ - address: UpdateAddressInput - - """ - The category of the entity. - """ - category: ValidLegalEntityCategoryInput - id: LegalEntityID! - - """ - The individual attributes when specifying an individual entity. - """ - individual: IndividualInput - - """ - Whether the entity is registered. - """ - isRegistered: Boolean - - """ - The specific type of legal entity. - """ - legalEntityType: LegalEntityTypeInput - - """ - The legal name of the entity. - """ - legalName: String - - """ - The nickname of the entity. - """ - nickname: String - - """ - The phone number associated with the entity. - """ - phoneNumber: String - - """ - The trade name of the entity. - """ - tradeName: String @deprecated(reason: "Trade name is deprecated from Legal Entity scope and will be replaced with a shop scope field.") -} - -input UpdateOrganizationTfaEnforcementInput { - """ - The state of TFA enforcement. - """ - tfaEnforcement: String! -} - -type UpdateOrganizationTfaEnforcementResult { - """ - The organization with updated TFA enforcement. - """ - organization: Organization - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type UpdateOrganizationUserAccessResult { - """ - The organization user IDs which were updated successfully. - """ - organizationUserIds: [OrganizationUserID!] - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input UpdateOrganizationUserInput { - """ - List of updated administrative permissions. - """ - administrativePermissions: [String!] - - """ - The ID of the OrganizationUser to update. - """ - organizationUserId: OrganizationUserID! - - """ - The updated shop access. - """ - shopAccess: ShopAccessInput - - """ - Whether or not TFA is enforced for the OrganizationUser. - """ - tfaEnforced: Boolean -} - -type UpdateOrganizationUserResult { - """ - ID of the mutated organization user. - """ - organizationUserId: OrganizationUserID - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input UpdateOrganizationUserRoleInput { - """ - The ID of the Organization User who is assigned a Role. - """ - organizationUserId: OrganizationUserID! - - """ - The ID of the Role to assign. - """ - roleId: RoleID! -} - -type UpdateOrganizationUserRoleResult { - """ - The organization user with the updated role. - """ - organizationUser: OrganizationUser - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input UpdatePartnerOrganizationInput { - """ - Organization name - """ - name: String! - - """ - Organization ID. - """ - organizationId: OrganizationID! -} - -input UpdatePersonAliasInput { - """ - The alias variants of the person alias. - """ - aliasVariants: [NameVariantInput!] - - """ - The first name of the person alias. - """ - firstName: String - - """ - The ID of the person alias to update. - """ - id: PersonAliasID! - - """ - The last name of the person alias. - """ - lastName: String - - """ - The middle name of the person alias. - """ - middleName: String - - """ - The prefix of the person alias. - """ - prefix: String - - """ - The suffix of the person alias. - """ - suffix: String -} - -input UpdatePersonInput { - """ - The address of the person. - """ - address: AddressInput @deprecated(reason: "Use the `updateAddress` field instead.") - - """ - The date of birth of the person. - """ - dateOfBirth: ISO8601Date - - """ - The email associated with the person. - """ - email: String - - """ - The first name of the person. - """ - firstName: String - - """ - The id of the person. - """ - id: PersonID! - - """ - The last name of the person. - """ - lastName: String - - """ - The middle name of the person. - """ - middleName: String - - """ - The name variants of the person. If not provided, name variants are unchanged. - If provided as an empty array, all name variants are removed. - If provided with items, all name variants are replaced with the provided ones. - """ - nameVariants: [NameVariantInput!] - - """ - The nationalities of the person. - """ - nationalities: [CountryCode!] - - """ - The phone number associated with the person. - """ - phoneNumber: String - - """ - The prefix of the person. - """ - prefix: String - - """ - The suffix of the person. - """ - suffix: String - - """ - The address of the person. - """ - updateAddress: AssignOrCreateAddressInput -} - -input UpdatePrincipalInput { - """ - The address associated with the principal. - """ - applicableAddress: AssignOrCreateAddressInput - - """ - The attributes that relate to a person within the context of a business category entity. - """ - businessAttributes: BusinessPrincipalInput - - """ - The contact information associated with the principal. - """ - contactInformation: PrincipalContactInformationInput - - """ - The ID of the principal to update. - """ - id: PrincipalID! -} - -type UpdatePrincipalResult { - principal: Principal - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -input UpdateResellerRelationshipInput { - """ - The activation link for the merchant to accept the store transfer. - """ - activationLink: String - - """ - The annual resold price (required for Plus). - """ - annualResoldPrice: Decimal - - """ - The annual revenue (required for Plus). - """ - annualRevenue: Decimal - - """ - The country code. - """ - countryCode: String - - """ - Whether the relationship has been transferred to the client. - """ - isTransferred: Boolean - - """ - The legal business name (required for Plus). - """ - legalBusinessName: String - - """ - The merchant email address. - """ - merchantEmail: String - - """ - The original price of the plan. - """ - originalPlanPrice: Decimal - - """ - The currency of the plan. - """ - planCurrency: String - - """ - The name of the plan. - """ - planName: String - - """ - The number of POS Pro locations. - """ - posProLocationsCount: Int - - """ - The ID of the reseller relationship to update. - """ - resellerRelationshipId: String! - - """ - The reseller remittance price. - """ - resellerRemittancePrice: Decimal - - """ - The term length in months (required for Plus). - """ - termLengthInMonths: Int -} - -type UpdateResellerRelationshipResult { - """ - The reseller relationship that was updated. - """ - resellerRelationship: ResellerRelationshipUpdateResultField - - """ - Errors that occurred while updating the reseller relationship. - """ - userErrors: [UserError!] -} - -input UpdateRoleInput { - """ - List of updated administrative permissions. - """ - administrativePermissions: [String!] - - """ - The ID of the Role to update. - """ - id: RoleID! - - """ - The updated name of the role. - """ - name: String! - - """ - List of updated shop accesses. - """ - shopAccess: [ShopAccessInput!] -} - -type UpdateRoleResult { - """ - The updated role. - """ - role: Role - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type UpdateSamlCertificateResult { - """ - The organization object. - """ - organization: Organization - - """ - List of user errors of update certificate operation. - """ - userErrors: [UserError!] -} - -input UpdateShopAccessProfileInput { - bio: String - canInitializePos: Boolean - - """ - The ID of the OrganizationUser whose shop access is to be updated. - """ - organizationUserId: OrganizationUserID! - - """ - The user's POS PIN for the shop. - """ - pin: String - posAccess: Boolean - posAccessEnforced: Boolean - receiveAnnouncements: Boolean - retailRoleId: ID - - """ - The ID of the shop. - """ - shopifyShopId: PropertyPublicID! - url: String -} - -type UpdateShopAccessProfileResult { - """ - ID of the mutated organization user. - """ - organizationUserId: OrganizationUserID! - - """ - ID of the updated shop access. - """ - shopifyShopId: ShopifyShopID! - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -""" -Headers of a signed file upload request. -""" -type UploadHeader { - """ - Header name. - """ - name: String! - - """ - Header value. - """ - value: String! -} - -""" -Input for upserting a government identifier -""" -input UpsertGovernmentIdentifierInput { - """ - The country code for this identifier. Required when creating a new identifier. - """ - countryCode: CountryCode - - """ - The ID of the government identifier to update. If not provided, a new identifier will be created. - """ - id: GovernmentIdentifierID - - """ - The type of government identifier. - """ - identifierType: GovernmentIdentifierTypeInput - - """ - Whether to set this government identifier as the tax filing preference for the - legal entity. Only one government identifier can be marked as the tax filing - preference at a time. - """ - taxFilingPreference: Boolean - - """ - The value of the government identifier. - """ - value: String -} - -""" -Input for upserting a legal entity with all related entities -""" -input UpsertLegalEntityInput { - """ - The address of the entity. - """ - address: AssignOrCreateAddressInput - - """ - The category of the entity (BUSINESS, INDIVIDUAL, or UNSPECIFIED). - """ - category: ValidLegalEntityCategoryInput - - """ - The country where the entity is registered. Required for create, immutable on update. - """ - countryCode: CountryCode - - """ - IDs of government identifiers to delete. - """ - deletedGovernmentIdentifierIds: [GovernmentIdentifierID!] - - """ - IDs of principals to delete. - """ - deletedPrincipalIds: [PrincipalID!] - - """ - IDs of supporting documents to delete. - """ - deletedSupportingDocumentIds: [SupportingDocumentID!] - - """ - Government identifiers for the legal entity (business types only). - """ - governmentIdentifiers: [UpsertGovernmentIdentifierInput!] - - """ - The ID of the legal entity to update. If not provided, a new entity will be created. - """ - id: LegalEntityID - - """ - The specific type of legal entity. Required for BUSINESS category. - """ - legalEntityType: LegalEntityTypeInput - - """ - The legal name of the entity. - """ - legalName: String @deprecated(reason: "Use registered_business_name instead.") - - """ - Legal name variants by alphabet (e.g. kana/kanji for Japan). Supplying an empty list clears all variants on the entity. - """ - legalNameVariants: [LegalNameVariantInput!] - - """ - The nickname of the entity. - """ - nickname: String - - """ - The phone number associated with the entity. - """ - phoneNumber: String - - """ - Principals linked to the legal entity, each with a person. - """ - principals: [UpsertPrincipalInput!] - - """ - The registered business name of the entity. - """ - registeredBusinessName: String - - """ - IDs of pre-staged supporting documents to link to this legal entity. - """ - supportingDocumentIds: [SupportingDocumentID!] -} - -""" -Input for upserting a person alias -""" -input UpsertPersonAliasInput { - """ - Name variants for the alias (e.g., kanji/kana for Japan). - """ - aliasVariants: [NameVariantInput!] - - """ - The first name for the alias. - """ - firstName: String - - """ - The ID of the person alias to update. If not provided, a new alias will be created. - """ - id: PersonAliasID - - """ - The last name for the alias. - """ - lastName: String - - """ - The middle name for the alias. - """ - middleName: String - - """ - The name prefix for the alias. - """ - prefix: String - - """ - The name suffix for the alias. - """ - suffix: String -} - -""" -Input for upserting a person -""" -input UpsertPersonInput { - """ - The address of the person. - """ - address: AssignOrCreateAddressInput - - """ - Aliases for the person. - """ - aliases: [UpsertPersonAliasInput!] - - """ - The date of birth of the person. - """ - dateOfBirth: ISO8601Date - - """ - IDs of person aliases to delete. - """ - deletedAliasIds: [PersonAliasID!] - - """ - IDs of government identifiers to delete. - """ - deletedGovernmentIdentifierIds: [GovernmentIdentifierID!] - - """ - IDs of supporting documents to delete. - """ - deletedSupportingDocumentIds: [SupportingDocumentID!] - - """ - The personal email of the person. - """ - email: String - - """ - The first name of the person. Required for create. - """ - firstName: String - - """ - Government identifiers for the person (personal types only). - """ - governmentIdentifiers: [UpsertGovernmentIdentifierInput!] - - """ - The ID of the person to update. If not provided, a new person will be created. - """ - id: PersonID - - """ - The last name of the person. Required for create. - """ - lastName: String - - """ - The middle name of the person. - """ - middleName: String - - """ - Name variants (e.g., kanji/kana for Japan). - """ - nameVariants: [NameVariantInput!] - - """ - The nationalities of the person. - """ - nationalities: [CountryCode!] - - """ - The personal phone number of the person. - """ - phoneNumber: String - - """ - The name prefix (e.g., Mr., Mrs., Dr.). - """ - prefix: String - - """ - The name suffix (e.g., Jr., Sr., III). - """ - suffix: String - - """ - IDs of pre-staged supporting documents to link to this person. - """ - supportingDocumentIds: [SupportingDocumentID!] -} - -""" -Input for upserting a principal with nested person -""" -input UpsertPrincipalInput { - """ - The ID of an existing address to use for this principal. - """ - applicableAddressId: AddressID - - """ - The business email of the principal. - """ - email: String - - """ - The equity ownership percentage (0-100). - """ - equityOwnership: Float - - """ - The ID of the principal to update. If not provided, a new principal will be created. - """ - id: PrincipalID - - """ - The job title of the principal. - """ - jobTitle: String - - """ - The person associated with this principal. - """ - person: UpsertPersonInput - - """ - The business phone number of the principal. - """ - phoneNumber: String - - """ - The roles assigned to this principal. - """ - roles: [PrincipalRoleTypeEnum!] -} - -input UpsertTestDriveBusinessFeatureSettingInput { - """ - Whether future shops will be automatically opted into a test drive feature. - """ - autoEnableForFutureShops: Boolean - - """ - The UTC datetime when the test drive feature will be auto released for all shops in the organization - """ - autoReleaseDate: ISO8601DateTime - - """ - The handle of the target test drive feature. - """ - handle: String! -} - -type UpsertTestDriveBusinessFeatureSettingResult { - """ - Boolean indicating whether future shops will be automatically opted into a test drive. - """ - autoEnableForFutureShops: Boolean - - """ - The UTC datetime when the test drive feature will be auto released for all shops in the organization - """ - autoReleaseDate: ISO8601DateTime - - """ - The collection of errors. - """ - userErrors: [UserError!] -} - -type UserError { - """ - Error code - """ - code: String - - """ - Path to the input field which caused the error - """ - field: [String!]! - - """ - The error message - """ - message: String! -} - -""" -Field options for filtering groups queries. -""" -enum UserGroupFilterField { - """ - The store the group has access to via a role. - """ - ACCESSIBLE_STORE - - """ - The role assigned to the group. - """ - ASSIGNED_ROLE - - """ - The id of the group. - """ - ID - - """ - Whether the group uses legacy access. - """ - USES_LEGACY_ACCESS -} - -""" -Represents a single filter option for user group queries. -""" -input UserGroupFilterInput { - field: UserGroupFilterField! - operator: UserGroupFilterOperator! - value: String! -} - -""" -Operators for filtering groups queries. -""" -enum UserGroupFilterOperator { - """ - Equals operator. - """ - EQUALS - - """ - In operator. - """ - IN - - """ - Not equals operator. - """ - NOT_EQUALS -} - -""" -Sort options for user group queries. -""" -enum UserGroupSort { - """ - Sort by name ascending. - """ - NAME_ASC - - """ - Sort by name descending. - """ - NAME_DESC - - """ - Sort by user count ascending. - """ - USER_COUNT_ASC - - """ - Sort by user count descending. - """ - USER_COUNT_DESC -} - -type UserLimits { - """ - Whether the user limit is enforced. - """ - enforced: Boolean - - """ - The maximum number of users allowed. - """ - maxAllowed: Int! - - """ - The number of used users seats in the organization. - """ - used: Int! -} - -enum UserSamlEnforcementState { - """ - This user cannot use SAML. - """ - OFF - - """ - This user is required to use SAML. - """ - REQUIRED - - """ - This user may be required to use SAML. - """ - SPECIFIC_USERS - - """ - This user is updating to be unable to use SAML. - """ - UPDATING_TO_OFF - - """ - This user is updating to be required to use SAML. - """ - UPDATING_TO_REQUIRED -} - -type UserShopAccessDetails { - shopAccess: ShopAccess - staffMember: StaffMember -} - -enum ValidLegalEntityCategoryInput { - BUSINESS - INDIVIDUAL - UNSPECIFIED -} - -type ValidateVibeTransferReadinessResult { - """ - Whether the shop is ready for a Vibe transfer. - """ - readyToTransfer: Boolean! - - """ - The collection of errors. - """ - userErrors: [UserError!] -}